JUNOS
JUNOS
MINZAT ALEXANDRU
INTRODUCTION TO JUNOS
1. JUNIPER DEVICE LINEUP
2. JUNIPER DEVICE COMPONENTS
3. TRAFFIC HANDLING
4. JunOS
5. JUNIPER INITIAL CONFIGURATION
INTRODUCTION TO JUNOS
JUNIPER DEVICES LINEUP
SWITCHING ROUTING SECURITY
FPC 0 FPC 1
FPC IS THE NETWORK CARD THAT
AGGREGATES PORTS, SOME FPCs MAY
HAVE PICs OTHERS DON'T PIC 0 PIC 1 PIC 0 PIC 1
PORTS ARE USED TO RECEIVE AND SEND TRAFFIC, INTERFACES ARE NAMED AS FOLLOWS:
[port-type]-[fpc X]/[]pic X]/[port X] - xe-0/0/1; et-0/0/1 ; ge-0/0/0
INTRODUCTION TO JUNOS
TRAFFIC HANDLING
ROUTING ENGINE
LOCAL TRAFFIC IS CONSIDERED TRAFFIC DESTINED TO
ROUTING ENGINE, IF YOU PING PORT 1.1.1.1 THE TRAFFIC
WILL BE PROCESSED BY ROUTING ENGINE.
LOCAL
ISIS BGP PING
OSPF
UPDATE UPDATE UPDATE 1.1.1.1
fi
INTRODUCTION TO JUNOS
TRAFFIC HANDLING
ROUTING ENGINE
HOST A HOST B
fi
fi
fl
INTRODUCTION TO JUNOS
JunOS
- JunOS IS A MODULAR OS
- DEVICE FUNCTIONALITY IS MANAGED BY DIFFERENT ISOLATED PROCESSES
THAT CAN BE RESTARTED SEPARATELY
- IF A PROCESS IS FAILING JunOS MODULARITY IS ENSURING THAT IT WILL NOT
INTERFERE WITH OTHER PROCESSES
INTRODUCTION TO JUNOS
JunOS
IN JUNOS, CLI IS ORGANIZED AN VERY EASY TO USE, EACH COMMAND IS INTUITIVE TO ISSUE AND EASY TO FIND.
JUNOS CLI HAVE 2 OPERATING MODES:
- OPERATION MODE
- CONFIGURATION MODE
OPERATIONAL MODE
root@:RE:0% cli
{master:0}
root> DEFAULT MODE WHEN LOGGINNG TO JUNOS, USED TO ISSUE OPERATIONL COMMANDS: PING, TELNET, SHOW
HELP CHARACTER “?” CAN BE USED TO FIND THE COMMAND YOU ARE LOOKING FOR:
root> ?
Possible completions:
clear Clear information in the system
configure Manipulate software configuration information
file Perform file operations
help Provide help information
load Load information from file
monitor Show real-time debugging information
mtrace Trace multicast path from source to receiver
op Invoke an operation script
ping Ping remote target
quit Exit the management session
request Make system-level requests
restart Restart software process
save Save information to file
set Set CLI properties, date/time, craft interface message
INTRODUCTION TO JUNOS
JunOS
CONFIGURATION MODE
root@:RE:0% cli
{master:0}
root> edit
Entering configuration mode
{master:0}[edit]
root# USED TO ISSUE CONFIGURATION COMMANDS
HELP CHARACTER “?” CAN BE USED TO FIND THE COMMAND YOU ARE LOOKING FOR, TO ADD A CONFIGURATION START WITH “set” COMMAND:
root# set ?
Possible completions:
> access Network access configuration
> access-profile Access profile for this instance
> accounting-options Accounting data configuration
> applications Define applications by protocol characteristics
+ apply-groups Groups from which to inherit configuration data
> chassis Chassis configuration
> class-of-service Class-of-service configuration
> diameter Diameter protocol layer
> event-options Event processing configuration
> firewall Define a firewall configuration
> forwarding-options Configure options to control packet forwarding
> groups Configuration groups
> interfaces Interface configuration
INTRODUCTION TO JUNOS
JunOS
YOU CAN USE PIPE TO FILTER INFORMATION IN BOTH MODES:
Possible completions:
append Append output text to file
compare Compare configuration changes with prior version
count Count occurrences
display Show additional kinds of information
except Show only text that does not match a pattern
find Search for first occurrence of pattern
hold Hold text without exiting the --More-- prompt
last Display end of output only
match Show only text that matches a pattern
no-more Don't paginate output
request Make system-level requests
save Save output text to file
tee Write to standard output and file
trim Trim specified number of columns from start of line
YOU ARE IN CONFIGURATION MODE AND WANT TO ACCESS OPERATION MODE COMMANDS? NO PROBLEM USE “run”:
root# run show route
{master:0}[edit]
root# set interfaces ge-0/0/0.0 family inet address 192.168.0.1/24
{master:0}[edit]
root# show | compare
[edit interfaces]
+ ge-0/0/0 {
+ unit 0 {
+ family inet {
+ address 192.168.0.1/24;
+ }
+ }
+ }
{master:0}[edit]
root# commit
configuration check succeeds
commit complete
}
syslog {
user * {
any emergency;
}
file messages {
any notice;
authorization info;
}
file interactive-commands {
interactive-commands any;
}
}
}
interfaces {
em1 {
unit 0 {
family inet {
address 169.254.0.2/24;
}
}
}
INTRODUCTION TO JUNOS
JunOS
VIEWING THE CONFIGURATION
{master:0}[edit]
root# show | save /var/tmp/config.txt OR root> show configuration | save /var/tmp/config.txt
Wrote 33 lines of output to '/var/tmp/config.txt'
IN JUNOS UPGRADE CAN BE PERFORMED IN MULTIPLE WAYS, MOST POPULAR IS THE NORMAL UPGRADE.
ACCORDING TO JUNIPER BEST PRACTICES, WHEN PERFORMING A NORMAL UPGRADE, IT IS RECOMMENDED NOT TO SKIP MORE THAN 2 MAJOR
RELEASES.
WITH THIS METHOD ALL OF THE CONFIGURATION, LOG FILE OR ANY OTHER FILES ON THE DEVICE WILL REMAIN UNTOUCHED.
DEVICE WILL BOOT DIRECTLY INTO NEW VERSION.
LETS SAY WE WANT TO UPGRADE JUNOS FROM 18.3 TO 22.1, WE WILL HAVE TO MAKE A FEW STOPS: 18.3 -> 20.1 -> 22.1
Junos OS 22.1
Junos OS 21.4
Junos OS 21.3
Junos OS 21.2 THINK OF A NETWORK DEVICE AS OF FANCY PC AND THAT YOU ARE JUST INSTALLING THE WINDOWS ON IT.
Junos OS 21.1
Junos OS 20.3 1. COPY THE IMAGE ON THE DEVICE VIA SFTP OR DOWNLOAD IT DIRECTLY: le copy “URL” /var/tmp/junos-vmhost-
Junos OS 20.2 install-mx-x86-64-20.4R3-S5.4-limited.tgz
Junos OS 20.1 2. ISSUE: >request system software add /var/tmp/junos-vmhost-install-mx-x86-64-20.4R3-S5.4-limited.tgz
Junos OS 19.4 3. WAIT FOR IT TO FISNISH THE INSTALATION THEN IT WILL ASK FOR A REBOOT, REBOOT IT
Junos OS 19.3 4. DEVICE WILL REBOOT WITH THE NEW VERSION
Junos OS 19.2 5. CHECK IF THE VERSION WAS INSTALLED: show version
Junos OS 19.1
Junos OS 18.4
Junos OS 18.3
fi
INTRODUCTION TO JUNOS
SOFTWARE VERSIONS AND UPGRADE/DOWNGRADE
IN JUNOS UPGRADE CAN BE PERFORMED IN MULTIPLE WAYS, MOST POPULAR IS THE NORMAL UPGRADE, THE OTHER ONE IS FORMAT INSTALL.
DURING FORMAT INSTALL YOU CAN JUMP STRAIGHT TO THE DESIRED VERSION, BUT ALL THE CONFIGURATION AND THE DATA ON THE DEVICE
HDD/SSD WILL BE WIPED.
A SPECIAL IMAGE IS USED FOR FORMAT INSTALL OR USB INSTALL: THE KEYWORDS ARE jinstall-media/install-usb : junos-vmhost-install-usb-mx-
x86-64-20.4R3-S5.4-limited.img.gz
UPON COMMITTING ANY CONFIGURATION ON THE NEW BOX, JUNOS WILL REQUIRE A ROOT PASSWORD:
[edit]
[edit]
'system'
root@SRX# set system root-authentication plain-text-password
Missing mandatory statement: 'root-authentication'
New password:
error: commit failed: (missing mandatory statements)
Retype new password:
[edit]
root@SRX# commit
commit complete
INTRODUCTION TO JUNOS
INITIAL CONFIGURATION
SETTING UP A HOSTNAME:
#set system hostname JUNIPER
MINZAT ALEXANDRU