HON’s Wiki # Juniper Junos OS
Home / Networking
Contents
TODO Clean up, reorganize and add remaining stuff.
Resources
Initial Setup
Common setup for MX, SRX, QFX, EX.
- Connect to the switch using serial:
- RS-232 w/ RJ45, baud 9600, 8 data bits, no parity, 1 stop bits, no flow control.
- Log in:
- It should say “Amnesiac” above the login prompt as the name of the switch, to show that it’s factory reset.
- Login as
root
with no password to enter the shell.
- Enter the Junos operational CLI by typing
cli
.
- (EX) (Optional) Free virtual chassis ports (VCPs) for normal use:
- Enter op mode.
- Show VCPs:
show virtual-chassis vc-port
- Remove VCPs:
request virtual-chassis vc-port delete pic-slot <pic-slot> port <port-number>
- Show again to make sure they disappear. This may take a few seconds.
- (Note) Enter configuration mode:
- Enter:
configure
- Commit:
commit
- Exit:
exit
- Set host name:
set system host-name <host-name>
set system domain-name <domain-name>
- (Not MX) Enable auto snapshotting and restoration on corruption:
set system auto-snapshot
- Disable DHCP auto image upgrade:
delete chassis auto-image-upgrade
- Set new root password:
set system root-authentication plain-text-password
(prompts for password)
- Set idle timeout:
set system login idle-timeout 60
(60 minutes)
- (Optional) Commit new config:
commit
- Setup a non-root user:
set system login user <user> [full-name <full-name>] class super-user authentication plain-text-password
(prompts for password)
- (SRX) Enable IPv6 forwarding (SRX):
- Enable:
set security forwarding-options family inet6 mode flow-based
- (Info) Verify (after commit):
show security flow status
- Setup SSH:
- Enable server:
set system services ssh
- Disable root login from SSH:
set system services ssh root-login deny-password
- (Note) Do not use
ssh root-login deny
, it may cause FPCs to go unresponsive and offline for Junos v21 and later (link).
- (Maybe) Disable licensing and phone-home (for grey-market devices):
delete system license
delete system phone-home
- Set DNS servers:
- Delete default:
delete system name-server
- Set new (for each one):
set system name-server <addr>
- Set time:
- Set time zone:
set system time-zone Europe/Oslo
(example)
- (Optional) Set time manually (UTC):
run set date <YYYYMMDDhhmm.ss>
- (Deprecated) Set server to use while booting (forces initial time):
set system ntp boot-server <address>
- Set server to use periodically (for tiny, incremental changes):
set system ntp server <address>
- (Info) After committing, use
show ntp associations
to verify NTP.
- (Info) After committing, use
set date ntp
to force it to update. This may be required if the delta is too large and the NTP client refuses to update.
- Set misc system options:
- Setup loopback as default address:
set system default-address-selection
- Enable PMTUD:
set system internet-options path-mtu-discovery
- Configure LLDP:
- (Optional) Enable for all interfaces:
set protocols lldp interface all
- (Optional) Enable for specific interfaces:
set protocols lldp interface xe-0/1/0
- (Optional) Disable for specific interfaces:
set protocols lldp interface xe-0/1/0 disable
- Configure SNMP:
- (Info) SNMP is extremely slow on the Juniper devices I’ve tested it on.
- Enable public RO access (or generate a secret community string):
set snmp community public authorization read-only
- (Optional) Set loopback addresses (if using routing):
set interfaces lo0.0 family inet address <address>/32
set interfaces lo0.0 family inet6 address <address>/32
- (Optional) Setup static IP routes (if not using dynamic routing):
- IPv4 default gateway:
set routing-options rib inet.0 static route 0.0.0.0/0 next-hop <next-hop>
- IPv6 default gateway:
set routing-options rib inet6.0 static route ::/0 next-hop <next-hop>
- (Optional) Setup null routes for site prefixes.
- Disable management port link-down alarm:
- Disable alarm:
set chassis alarm management-ethernet link-down ignore
- Disable management port:
- (Note) This port goes by many names:
fxp0
, me0
, em0
, em1
, vme
, …
- Delete interface:
delete int <port>
- Disable interface:
set int <port> disable
- (If exists) Disable RA:
delete protocols router-advertisement interface <port>.0
- (Optional) Set PIC interface speed/mode (if applicable):
- (Info) E.g. the device has 40G/100G ports and you need to configure the ports for them to show up in
sh int terse
.
- (Info) Some devices have a maximum capacity that can’t be oversubscribes, e.g. 400G for the MX204.
- Show FPCs and PICs:
run show chassis fpc pic-status
- Set speed (example):
set chassis fpc 0 pic 0 port 0 40g
- (EX/QFX/SRX) Create VLANs:
- Create:
set vlans <name> vlan-id <VID>
- (Optional) Set RVI:
set vlans <name> l3-interface irb.<VID>
- Setup interfaces: See section below.
- (EX/QFX/SRX) Configure RSTP:
- (Note) RSTP is enabled for all interfaces by default.
- Enter config section:
edit protocols rstp
- Set interfaces:
set interfaces all
(example)
- Set priority:
set bridge-priority <priority>
(default 32768/32k, should be a multiple of 4k, use e.g. 32k for access, 8k for distro and 4k for core)
- (Optional) Set hello time:
set hello-time <seconds>
(default 2s)
- (Optional) Set maximum age:
set max-age <seconds>
(default 20s)
- (Optional) Set forward delay:
set forward-delay <seconds>
(default 15s)
- Set edge ports:
wildcard range set protocols rstp interface ge-0/0/[2-5] edge
(example)
- Enable BPDU guard on all edge ports:
set protocols rstp bpdu-block-on-edge
- (SRX) Setup security stuff (zones, policies, NAT, screens).
delete security
- Setup as desired.
- Commit configuration:
commit [confirmed]
- Exit config CLI:
exit
- Save the rescue config:
request system configuration rescue save
- (SRX) Save the autorecovery info:
request system autorecovery state save
- (SRX) Reboot the device to change forwarding mode and stuff (if changed):
request system reboot
Interfaces
- (Optional) Delete default interfaces configs (example):
wildcard range delete interface ge-0/0/[0-7]
- (EX/QFX/SRX) (Optional) Disable default VLAN RVI:
- (Note) The interface is called
vlan
for older devices and irb
for newer ones.
- Delete config:
delete int irb.0
- Disable:
set int irb.0 disable
- (Optional) Disable unused interfaces (example):
wildcard range set interface ge-0/0/[0-7] disable
set interface cl-1/0/0 disable
set interface dl0 disable
- (Optional) Setup interface-ranges (apply config to multiple configured interfaces):
- Declare range:
edit interfaces interface-range <name>
- Add member ports:
member-range <begin-if> to <end-if>
- Configure it as a normal interface, which will be applied to all members.
- (Optional) Setup LACP toward upstream/downstream switch:
- (Info) Make sure you allocate enough LAG interfaces and that the interface numbers are below some arbitrary power-of-2-limit for the device model. Maybe the CLI auto-complete shows a hint toward the max.
- Set number of available LAG interfaces:
set chassis aggregated-devices ethernet device-count <0-64>
- Delete old configs for member interface:
wildcard range delete interfaces ge-0/0/[0-1]
(example)
- Add member interfaces:
wildcard range set interfaces ge-0/0/[0-1] ether-options 802.3ad ae<n>
- Add some description to member interfaces:
wildcard range set interfaces ge-0/0/[0-1] description link:switch
- Enter LAG interface:
edit interface ae<n>
- Set description:
set desc link:switch
- Set LACP active:
set aggregated-ether-options lacp active
- Set LACP fast:
set aggregated-ether-options lacp periodic fast
- (Optional) Set minimum links:
aggregated-ether-options minimum-links 1
- (EX/QFX/SRX) Setup switch trunk ports:
- (Note)
vlan members
supports both numbers and names. Use the [VLAN1 VLAN2 <...>]
syntax to specify multiple VLANs.
- (Note) Instead of specifying which VLANs to add, specify
vlan members all
and vlan except <excluded-VLANs>
.
- (Note)
vlan members
should not include the native VLAN (if any).
- Enter unit 0 and
family ethernet-switching
of the physical/LACP interface.
- Set mode:
set port-mode trunk
- Set VLANs:
set vlan members <VLANs>
- (Optional) Set native VLAN:
set native-vlan-id <VID>
- (EX/QFX/SRX) Setup access ports:
- Enter unit 0 and
family ethernet-switching
of the physical/LACP interface.
- Set access VLAN:
set vlan members <VLAN-name>
- (EX/QFX/SRX) Setup VLAN L3 interfaces:
- (VLAN) Set L3-interface:
set vlans <name> l3-interface irb.<VID>
- Enter unit 0 of physical/LACP interface or
irb.<VID>
for VLAN interfaces.
- Set IPv4 address:
set family inet address <address>/<prefix-length>
- Set IPv6 address:
set family inet6 address <address>/<prefix-length>
- (Optional) Disable/enable Ethernet flow control:
- (Note) Junos uses the symmetric/bidirectional PAUSE variant of flow control.
- (Note) This simple PAUSE variant does not take traffic classes (for QoS) into account and will pause all traffic for a short period (no random early detection (RED)) if the receiver detects that it’s running out of buffer space, but it will prevent dropping packets within the flow control-enabled section of the L2 network. Enabling it or disabling it boils down to if you prefer to pause (all) traffic or drop (some) traffic during congestion. As a guideline, keep it disabled generally (and use QoS or more sophisticated variants instead), but use it e.g. for dedicated iSCSI networks (which handle delays better than drops). Note that Ethernet and IP don’t require guaranteed packet delivery.
- (Note) It may be enabled by default, so you should probably enable/disable it explicitly (the docs aren’t consistent with my observations).
- (Note) Simple/PAUSE flow control (
flow-control
) is mutually exclusive with priority-based flow control (PFC) and asymmetric flow control (configured-flow-control
).
- Disable on Ethernet interface (explicit):
set interface <if> [aggregated-]ether-options no-flow-control
- Enable (explicit):
... flow-control
- (Optional) Enable EEE (Energy-Efficient Ethernet, IEEE 802.3az):
- (Note) For reducing power consumption during idle periods. Supported on RJ45 copper ports.
- (Note) There generally is no reason to not enable this on all ports, however, there may be certain devices or protocols which don’t play nice with EEE (due to poor implementations).
- Enable on RJ45 Ethernet interface:
set interface <if> ether-options ieee-802-3az-eee
Commands
TODO Cleanup. Combine with SRX- and QFX-setup?
Usage
- Controlling the CLI:
- Auto-complete: Tab or space.
- Show allowed tokens/help:
?
- Pipe output:
<cmd> | <filter>
- Regex match output:
<cmd> | match <regex>
- Count lines (e.g. after matching):
<cmd> | count
- Watch command:
<cmd> | refresh <seconds>
(e.g. show x | match y | refresh 5
)
- Supports GNU readline (Emacs-like) keybinds (some examples below).
- Jump to start or end of line:
Ctrl+A
(start) and Ctrl+E
(end)
- Cut or paste entire line:
Ctrl+U
(cut) and Ctrl+Y
(paste)
- Search command history:
Ctrl+R
+ search
- Copy last word from last command:
Meta+.
(typically Alt+.
)
- Long outputs (less/more):
- Long output is typically showed with less and supports less keybinds (use
h
for help).
- Show long output without more hold:
<cmd> | no-more
- Jump to start or end:
g
(start) or G
(end)
- Search:
/
(forwards) or ?
(backwards)
- Show only matching lines (supports regex):
m
- Clear searching etc.:
c
- Help:
- Show topic:
help topic <topic>
- Show reference:
help reference <reference>
- Show syslog symbol description:
help syslog <symbol>
- Show general information:
- Show time and uptime:
show system uptime
- Show version (and haiku):
show version [and haiku]
- Show system resource usage:
show system processes brief
- Show RE info and usage:
show chassis routing-engine
- Open CLI in operational mode (from shell):
cli
- Open shell (from op mode):
- Local:
start shell user root
- VC:
request session member <vc-member-id>
- CLI settings:
- Show:
show cli
- Enable timestamp for commands:
set cli timestamp
- Enter configuration mode (from op mode):
configure {<omit>|exclusive|private}
- By default, a shared config mode session is used where multiple users may edit the same candidate config. Be careful when committing in this mode to avoid accidentally applying changes from the other users.
- Specify
exclusive
to avoid having other users make changes in config mode at the same time.
- Specify
private
to start a separate/private config mode session, independent of other users. This is weird and rarely used.
- TODO Certain restrictions of committing for exclusive mode.
- Exit any mode:
exit
- Show configuration:
- (Note) You can only see config elements and changes you have permissions to see. Chekc the
system login
section to check.
- From (op mode):
show configuration [statement]
- From (conf mode):
show [statement]
- Show changes (conf mode):
show | compare
- Show as set-statements (op mode):
show configuration | display set
- Hide secret data:
show configuration | except SECRET-DATA
- Show commit log:
show system commit
- Show older config:
show system rollback <n>
(1 is the last etc.)
- Compare active with older version:
show configuration | compare rollback <n>
- Compare two older versions:
show system rollback <n> compare <m>
- Show details and defaults:
show configuration | display detail
(add | except "##$"
to omit empty comment lines)
- Show with inherited properties from apply groups:
show | display inheritance
- Config files:
- Revisions: The most recent are stored in
/config/
, the rest (up to some count) are stored in /var/db/config/
.
- Configs are gzip-compressed.
- The active configuration is
/config/juniper.conf.gz
.
- Run op command in config mode:
run <command>
- Navigate config mode:
- The config is structures as nested container statements and leaf statements.
- Change context to container statement:
edit <path>
- Go up in context:
up
or top
- Show configuration for current level:
show
- Perform operation on multiple interfaces or similar:
wildcard range set int ge-0/0/[0-47] unit 0 family ethernet-switching
(example)
- Rename a config element:
rename <a> to <b>
- Move config element to before another element:
insert <b> before <b>
- Copy config element:
copy <a> to <b>
- Delete config element:
delete <element>
- Search and replace (global):
replace pattern <a> with <b>
- Add comment to element:
annotate <element> "<comment>"
- Deactivate element (instead of deleting it):
deactivate <element>
- Use
activate <...>
to undo.
- Prevent changes to element:
protect <element>
- Use
unprotect
to undo.
- User privileges may be set such that certain users are not allowed to unprotect, as a sort of access control to certain config sections.
- Hide section for
show configuration
: Set apply-flags omit
inside the section
- Use
show configuration | display omit
to override and show omitted sections too.
- Commit config changes:
- Commit candidate to active:
commit [comment <comment>] [confirmed <minutes>] [synchronize]
confirmed
automatically rolls back the commit if it is not confirmed within a time limit. Run commit check
(or commit
to also create a new commit) to confirm changes and prevent rollback.
and-quit
will quit configuration mode after a successful commit.
synchronize
will apply the change to all REs. It can be configured as the default.
- Check without committing:
commit check
- Use
at <time>
to commit at a later time. Use commit check
first to avoid config errors when it happens.
- Rollback changes: Go to top level,
rollback <n>
(use ?
to show log), then commit
- Discard changes in candidate config:
rollback 0
- Apply groups:
- Apply groups are a form of object-oriented templating.
- The template/group are set under
groups <name>
.
- They may use wildcards like
<ge-*>
instead of ge-0/0/0
etc.
- Apply the group to some section:
apply-groups <name>
- Avoid inheriting the group in some child section:
apply-groups-except <name>
- Local elements override the template.
- Show config with inherited properties:
show | display inheritance
- Apply path:
- Used to reference a value from another element, e.g. to reference a singly defined IP address instead of specifying it every time.
- Example:
set policy-options prefix-list RADIUS_SERVERS apply-path "system radius-server <*>"
- Load changes (from terminal typically):
- Load config section from terminal:
load merge terminal [relative]
, paste, Ctrl+D
(relative
for relative path)
- Load set format (
set
’s and delete
’s etc.): load set terminal
, etc.
- Load diff format (with config section,
+
‘es and -
‘es etc.): load patch terminal
, etc.
- Delete all existing configuration while in config mode:
load override terminal
, then Ctrl+D
without typing anything.
- Typical show command granularities (suffix):
terse
(very brief)
brief
detail
extensive
(very verbose)
- Send command output to remote (SCP or FTP, no TFTP):
<cmd> | save <destination>
- Log:
- Most stuff is logged in
/var/log/messages
- Some hardware stuff is logged in
/var/log/chassisd
.
- Show other file:
show log <log>
(for file /var/log/<log>
)
- Show entered commands (if configured for syslog):
show log interactive-commands
- Show commit log:
show system commit
- Print log to console (tail-like):
monitor start
(stop with monitor stop
)
- Ping:
- Basic:
ping <target> [options]
- Specify source:
... source <address>
- Send rapidly:
... rapid
- Set count:
... count <n>
- Set payload size:
... size <n>
(might fragment, max ICMPv4 size is MTU minus 28)
- Avoid fragmentation:
... do-not-fragnent
- Change hashing to debug LAG interfaces:
... pattern <something>
- Etc.
- Traceroute:
traceroute [monitor] <target>
- Show stats:
- Show traffic stats (general):
minitor interface <...>
(use keyboard shortcuts for bits/bytes, rate/delta, etc.)
- Show stats for all interfaces:
minitor interface traffic
- Show stats for specific interfaces:
minitor interface <interface>
- Dump traffic:
- Basic:
monitor traffic interface <interface> [...]
- Example: monitor traffic interface ge-0/0/4 no-resolve size 1500 count 20 matching "ip proto ospf"
- Only shows “local” traffic (to/from the system, not forwarded).
- Supports standard tcpdump-like PCAP filtering as the (quoted) matching
argument.
- Write to PCAP file: <...> write-file <file>
- Files:
- General file command:
file <...>
- The working directory is
/var/home/
.
- Temporary stuff can be stores in
/var/tmp/
(not /tmp/
, it’s tiny).
- Scripting:
- Supports events like scheduled actions.
- Supports XML scripting. And Python for newer devices.
- Supports commit scripts to e.g. require descriptions on interfaces.
Port Mirroring (SPAN)
Booting
The devices have two partitions; the primary and the backup.
One of them will be designated as active and that choice will be remembered across reboots.
When the active partition is damaged, the device will boot into the other partition.
When the backup partition is the active partition, an alarm will be set and a banner shown.
Change active partition and reboot: request system reboot slice alternate media internal
Shutting It Down
The devices should be shut down gracefully instead of just pulling the power.
This will prevent corrupting the file system.
- Oper CLI:
request system <halt|power-off> [local|all-members|member <member-id>]
- Shell:
shutdown -h now
or halt
Wait for the “The operating system has halted.” text before pulling the power, so that system processess are stopped and disks are synchronized. The system LED turning off and the LCD saying “HALTING…” does not mean that the halting process is finished yet.
Basics
TODO Move this.
- Shut down or reboot:
request system <halt|reboot> [local|all-members]
- For
halt
, it will print “please press any key to reboot” when halted.
- Erase all data and reboot fresh:
request system zeroize
- Show system alarms:
show system alarms
- Show chassis alarms:
show chassis alarms
- Show temperatures and fan speeds:
show chassis environment
- Show routing engine usage:
show chassis routing-engine
- Show effective configuration (with inheritance):
show <configuration> | display inheritance
Move Config
- Copy config from host to device over SCP:
- Copy (host):
scp <config> <device>:/config/juniper.conf.new
- Load (conf mode):
load override /config/juniper.conf.new
- Show changes and commit.
- Delete tmp config (op mode):
file delete /config/juniper.conf.new
Interfaces
- Show interfaces:
- Overview:
show interfaces terse
- Simple overview:
show interfaces routing
- Some details:
show interfaces brief
- Statistics:
show interfaces statistics
- All details:
show interfaces detail
- Physical details:
show interfaces media
- Show switching/VLAN details for interface:
show ethernet-switching interface
- Show LLDP neighbors:
show lldp neighbors
- Show DHCP client:
- Show binding:
show dhcp client binding
- Show stats:
show dhcp client statistics
IPv6 Neighbor Discovery (ND)
- Disallow solicitations from remote prefixes (config):
set protocols neighbor-discovery onlink-subnet-only
DHCPv4 Server
- Note that newer Junos versions use a different DHCP setup (JDHCP), with pool settings inside
access address-asignment
.
- Show clients:
show dhcp server binding
- Show client detauls:
show dhcp server binding <address> detail
- Show stats:
show dhcp server statistics
Events
- Show event type info:
help syslog SNMP_TRAP_LINK_DOWN
(op mode) (example)
- Show available event attributes: Use ?-completion.
- Show log:
run show log escript.log | last
- From docs: “Do not use the change-configuration statement to modify the configuration on dual Routing Engine devices that have nonstop active routing (NSR) enabled, because both Routing Engines might attempt to acquire a lock on the configuration database, which can cause the commit to fail.”
Rescue Configuration
- The rescue config is a copy of the config, which the system attempts to use if it detects that the main config is corrupted.
- Show rescue config:
show system configuration rescue
- Save current committed config to rescue config:
request system configuration rescue save
- Delete rescue config:
request system configuration rescue delete
- Rollback to rescue config (config CLI):
rollback rescue
Autorecovery
- Only supported in some dual-partitioned with newer software.
- Shows an alarm about autorecovery information that needs to be saved if you’re configuring a factory reset device.
- Autorecovery stores disk partitioning, configuration and license information, then validates and attempts to recover corruption during bootup.
- Show autorecovery status:
show system autorecovery state
- Save autorecovery info:
request system autorecovery state save
- Delete autorecovery info:
request system autorecovery state clear
Miscellanea
- Set
system auto-snapshot
on single-flash devices to make them automatically rebuild the alternate partition in case of corruption.
Tasks
Reset Config or Root Password
- Power on the device and prepare for the next step.
- Wait for the “Hit [Enter] to boot immediately, or space bar for command prompt.” message to be shown and then press space. You should immediately enter a prompt (typically
loader>
).
- Run
boot -s
to boot into single-user mode.
- When prompted for a shell, enter
recovery
.
- Wait for the device to fully boot.
- (Alternative 1) Zeroize the system by running
request system zeroize
(this will delete all configuration).
- (Alternative 2) Set a new root password and commit (there should be instructions before the prompt). Reboot the device afterwards.
Mount a USB Drive
Note: USB3 drives may not work properly. Use USB2 drives.
- Make sure the drive is MBR-partitioned and that the partition is formatted as FAT32 (
mkfs.fat -F32
).
- To make it easier to find the device path in Junos, don’t insert the USB drive just yet.
- Show current storage devices:
ls -l /dev/da*
- Insert the drive. It should print a few lines to the console.
- Show current storage devices again and find the new device. (
df -h
may also be used to see which one is in use.)
- Mount it:
mkdir /var/tmp/usb0 && mount_msdosfs <device> /var/tmp/usb0
(arbitrary path)
- Check that it’s mounted properly:
ls -l /var/tmp/usb0
- Do stuff with it.
- Unmount it:
umount /var/tmp/usb0 && rmdir /var/tmp/usb0
Upgrade Junos
Normal Method
This should work in most cases and is the most streamlined version, but may not work for major version hops and stuff.
- (Info) For virtualized boxes like EX4600 and QFX5100, skip the
request system snapshot
parts as these boxes are built differently wrt. Junos.
- Cleanup old files:
request system storage cleanup
- Do this before mounting the USB or downloading the files, as the upgrade files may get wiped.
- Make sure the alternate partition contains a working copy of the current version: See Validate the Partitions.
- If downloading from a remote location:
- Get the file:
file copy <remote-url> /var/tmp/
- If it says it ran out of space, add
staging-directory /var/tmp
. By defaults it’s buffered on the root partition, which may be tiny.
- Alternatively, copy the file into the device from the remote device, using SCP.
- If copying from a USB drive:
- Format the USB drive using FAT32 and copy the software file to the drive.
- Enter shell mode on the device:
start shell user root
- Mount the USB drive:
mkdir /var/tmp/usb0 && mount_msdosfs /dev/da1s1 /var/tmp/usb0
- Check the contents (copy the filename for later):
ls -l /var/tmp/usb0
- Copy the file to internal storage:
cp /var/tmp/usb0/jinstall* /var/tmp/
- Unmount and remove the USB drive:
umount /var/tmp/usb0 && rmdir /var/tmp/usb0
- Enter operational CLI again:
exit
(or cli
)
- Prepare upgrade:
request system software add /var/tmp/<file> no-copy unlink reboot [no-validate] [force-host]
(supports auto-complete)
no-copy
prevents copying the file first (in this case it’s pointless).
unlink
removes the file afterwards.
reboot
reboots the device, so the upgrade can begin when booting.
- If it complains about certificate problems, consider disabling verification using
no-validate
.
- For virtualized devices, add
force-host
to upgrade the host too.
- If the date is significantly wrong on the device and NTP isn’t used/synced, set it manually with
set date <YYYYMMDDhhmm>
first so validation doesn’t fail.
- It may produce some insignificant errors in the process (commands not found etc.).
- See Validate the Partitions to copy the upgraded partition to the other partition.
From the Loader
If the normal method did not work, try this instead.
- Copy the file to the device disk using the “normal” USB method.
- Connect using a serial cable.
- Reboot the device and press space at the right time to enter the loader.
- The message to wait for should look like this:
Hit [Enter] to boot immediately, or space bar for command prompt.
- Format and flash:
install --format file:///jinstall-whatever.tgz
(with correct name, no /var/tmp/
)
- See Validate the Partitions to copy the upgraded partition to the other partition.
Validate the Partitions
Do this before as a check and after to make sure the new image is working and copied to both partitions.
- Log into the CLI.
- Verify that the system is booted from the active partition of the internal media:
show system storage partitions
(should show Currently booted from: active
)
- Verify that the current Junos version for the primary partition is correct:
show system snapshot media internal
- Copy to the alternate root partition, so both have the same version (may take several minutes):
request system snapshot slice alternate
- Verify that the primary and backup partitions have the same Junos version:
show system snapshot media internal
- If the command fails, wait a bit and try again. The copy may still be happening in the background.
- (Info) To boot from the alternative partition:
request system reboot slice alternate media internal
ISSU and NSSU
Just info, no instructions here.
- ISSU and NSSU may be used for upgrade without downtime, if the hardware supports it.
- If using redundant hardware (multiple REs), ISSU may be use for upgrades without downtime. It may blow up. One RE is upgraded first, then state is transferred to it. Normal upgrade with reboot is more reliable if short downtime is acceptable.
- If using virtual chassis, NSSU is similar to ISSU but doesn’t require the same kind of state sync.
Fix a Corrupt Root Partition
If one of the root partitions get corrupted (e.g. due to sudden power loss),
the device will boot to the alternate root partition.
This can be fixed by cloning the new active partition to the alternate, corrupt partition.
See Validate the Partitions or [EX] Switch boots from backup root partition after file system corruption occurred on the primary root partition (Juniper).
Info
Junos OS
- Based on FreeBSD.
- Used on all Juniper devices.
- Juniper’s next-generation OS “Junos OS evolved” (not “Junos OS”) is based on Linux.
Versions
- Example:
20.4R3-S1.3
- Format:
<year>.<quarter>[R1-3][-S...]
- There is one main release for each quarter of the year. They may be a bit delayed such that they don’t perfectly match the quarter.
- There are zero to three extra cumulative bug patches
R1
to R3
(no suffix for the initial release).
- Each release is supported for exactly three years.
Interfaces
Interface name structure:
- Physical interfaces:
- Format:
<type>-<fpc>/<pic>/<port>
- Example:
ge-0/0/0
- See the table for interface types.
- The Flexible PIC Concentrator (FPC) is typically 0 for single devices or equal to the member ID if using VC.
- The Physical Interface Card (PIC) refers to the line card within a physical chassis, and is typically always 0 for fixed-format devices.
- Logical interfaces:
- Format:
<phys-if>.<unit>
- Example:
ge-0/0/0.0
- The unit number is a non-negative number, often just 0 for physical interfaces that just need one logical interface, or corresponding to subinterface numbers for VLAN trunks.
- Channelized interfaces (aka breakout interfaces):
- Format:
<phys-if>:<channel>
- Example parent:
et-0/0/0
- Example channel:
xe-0/0/0:0
(0-3)
- Channelized interfaces allows for splitting e.g. a 40G interface into four 10G interfaces using a breakout cable.
Physical interfaces:
Prefix |
Type |
Example |
fe |
100M Ethernet |
fe-0/0/0 |
ge |
1G Ethernet |
ge-0/0/0 |
xe |
10G Ethernet |
xe-0/0/0 |
et |
25G/40G/100G Ethernet |
et-0/0/0 |
mge |
Multi-rate Ethernet |
|
fxp |
Mgmt. interface on RE (0-1) (SRX) |
|
me |
Management Ethernet |
|
em |
Management Ethernet |
|
fc |
Fibre Channel (FC) |
|
at |
ATM |
|
pt |
VDSL2 |
|
cl |
3G/LTE |
|
dl |
Dialer for LTE (cl) |
dl0.0 |
se |
Serial |
|
e1 |
E1 |
|
e3 |
E3 |
|
t1 |
T1 |
|
t2 |
T2 |
|
wx |
WXC ISM |
|
reth |
Chassis cluster traffic |
|
Special interfaces:
Prefix |
Type |
Example |
lo |
Loopback (some are internal) |
lo0 |
ae |
Aggregated Ethernet (LAG) |
ae0 |
irb |
IRB |
irb.0 |
dsc |
Discard (internal) |
dsc |
tap |
Tap (internal) |
tap |
fti |
Flexible Tunnel Interface (FTI) |
fti0 |
gr |
GRE tunnel |
gr-0/0/0 |
ip |
IP-over-IP tunnel |
ip-0/0/0 |
lsq |
Link services queueing interface (MLPPP, MLFR, CRTP) |
lsq-0/0/0 |
lt |
Logical tunnel (SRX) |
lt-0/0/0 |
mt |
Multicast tunnel |
mt-0/0/0 |
sp |
Adaptive services (unit 16383 is internal) |
sp-0/0/0 |
hon.one
| HON95/wiki
| Edit page