Installing Software on Routing Devices (Junos OS)
Routing devices are delivered with Junos OS preinstalled on them. As new features and software fixes become available, you must upgrade Junos OS to use them. You can install software on single and redundant routing engines.
Installing the Software Package on a Router with a Single Routing Engine (Junos OS)
Before you install a new software release on a device, you should back up the current system.
Starting in Junos OS release 20.3R1, ACX710 routers support limited images.
To upgrade the software on a router or switch:
See Also
Installing the Software Package on a Device with Redundant Routing Engines (Junos OS)
If the device has two Routing Engines, perform a Junos OS installation on each Routing Engine separately to minimize disruption to network operation.
To upgrade redundant Routing Engines, you first install the new Junos OS release on the backup Routing Engine while keeping the currently running software version on the primary Routing Engine. After making sure that the new software version is running correctly on the backup Routing Engine, you switch device control to the backup Routing Engine. Finally, you install the new software on the new backup Routing Engine. For detailed procedures, see the following subsections:
- Preparing the Device for the Installation (Junos OS)
- Installing Software on the Backup Routing Engine (Junos OS)
- Installing Software on the Remaining Routing Engine (Junos OS)
- Finalizing the Installation (Junos OS)
Preparing the Device for the Installation (Junos OS)
Determine if this is the best procedure for upgrading your device:
If your EX8200 switch is running Junos OS Release 10.4R3 or later, you can upgrade the software packages on both Routing Engines with a single command and with minimal network disruption by using nonstop software upgrade (NSSU) instead of this procedure. See Upgrading Software on an EX6200 or EX8200 Standalone Switch Using Nonstop Software Upgrade (CLI Procedure).
To upgrade two different Junos OS releases with no disruption on the control plane and with minimal disruption of traffic, you can use In-Service Software Upgrade, see Getting Started with Unified In-Service Software Upgrade for routers and switches, and Upgrading a Chassis Cluster Using In-Service Software Upgrade for SRX Series Firewalls.
To upgrade the software running on EX Series Ethernet Switches with redundant Routing Engines and all member switches in EX Series Virtual Chassis with a single command, you can use Nonstop Software Upgrade, see Understanding Nonstop Software Upgrade on EX Series Switches.
To upgrade the software package on an EX6200 switch or an EX8200 switch with one installed Routing Engine, see Installing Software on an EX Series Switch with a Virtual Chassis or Single Routing Engine (CLI Procedure).
If graceful Routing Engine switchover (GRES) or nonstop active routing (NSR) is enabled when you initiate a software installation, the software does not install properly. Make sure you deactivate GRES (if it is enabled). By default, NSR is disabled. If NSR is enabled, remove the nonstop-routing statement from the [edit routing-options] hierarchy level to disable it.
To ensure GRES and NSR are disabled:
Log in to the primary Routing Engine’s console.
For more information about logging in to the Routing Engine through the console port, see the specific hardware guide for your device.
From the CLI operational prompt, enter configuration mode:
{master} user@host> configure Entering configuration mode {master} [edit] user@host#
Disable nonstop active routing (NSR) (supported on switches running Junos OS Release 10.4 or later):
{master}[edit] user@host# delete routing-options nonstop-routing
Disable nonstop-bridging if it is enabled:
{master}[edit] user@host# delete protocols layer2-control nonstop-bridging
Disable Routing Engine redundancy if enabled:
{master}[edit] user@host# (delete | deactivate) chassis redundancy graceful-switchover
Save the configuration change on both Routing Engines:
{master}[edit] user@host# commit synchronize re0: configuration check succeeds re1: commit complete re0: commit complete
Note:To ensure the most recent configuration changes are committed before the software upgrade, perform this step even if nonstop active routing and graceful Routing Engine switchover were previously disabled.
Exit the CLI configuration mode:
[edit] user@host# exit
Installing Software on the Backup Routing Engine (Junos OS)
After the device has been prepared, you first install the new Junos OS release on the backup Routing Engine, while keeping the currently running software version on the primary Routing Engine. This enables the primary Routing Engine to continue operations, minimizing disruption to your network.
Before you start this procedure, decide which software package you need and download it to the /var/tmp directory of the primary Routing Engine. For information on which packages to use for which upgrades, see Junos OS Installation Package Names.
To install software on the backup Routing Engine:
Log in to the console port on the current primary Routing Engine in slot 0.
Install the new software package on the backup Routing Engine (re1) using the
request system software add
command:user@host> request system software add re1 validate /var/tmp/jinstall-9.2R1.8–domestic-signed.tgz
Installation and validation take about 15 minutes.
CAUTION:Do not include the
re0
orre1
option when you install a package using therequest system software add
command if the Routing Engine on which the package is located and the Routing Engine on which you want to install the package are the same. In such cases, the package gets deleted after a successful upgrade.For M Series, MX Series, and T Series routers running Junos OS Release 12.2 and later, you can use the
request system software add set
command to install multiple software packages at the same time:user@host> request system software add set re1 /var/tmp/installation-package
For more information about the
request system software add set
command, see request system software add (Junos OS) or the CLI Explorer.Reboot the backup Routing Engine to start the new software:
user@host> request system reboot other-routing-engine Rebooting re1 user@host>
You must reboot the device to load the new installation of Junos OS on the device. You can combine steps 2 and 3 by adding reboot to the
request system software add
command. But if you do the steps separately, make sure you reboot the Routing Engine you just added system software to.Note:To terminate the installation, do not reboot your device. Instead, finish the installation and then issue the
request system software delete software-package-name
command. This is your last chance to stop the installation.All the software is loaded when you reboot the device. Installation can take between 5 and 10 minutes. The device then reboots from the boot device on which the software was just installed. When the reboot is complete, the device displays the login prompt.
While the software is being upgraded, the Routing Engine on which you are performing the installation is not routing traffic.
Issue the
show version invoke-on other-routing-engine
command to verify the new software is installed.user@host> show version invoke-on other-routing-engine re1: -------------------------------------------------------------------------- Hostname: host1 Model: mx240 Junos: package-name . . . user@host>
(Optional) Add the jweb package using the
request system software add
command. Before you can add this package, you must first download the software as you did the installation package. For more information about downloading the jweb package, see Downloading Software (Junos OS).The jweb installation module adds a router management graphical user interface that you can use to view and configure your router.
Installing Software on the Remaining Routing Engine (Junos OS)
Once the software is installed on the backup Routing Engine, you are ready to switch routing control to the backup Routing Engine, and then upgrade or downgrade the software on the remaining Routing Engine in slot 0.
To install software on the primary Routing Engine:
Transfer routing control from the primary to the backup Routing Engine:
user@host> request chassis routing-engine master switch warning: Traffic will be interrupted while the PFE is re-initialized Toggle mastership between routing engines ? [yes,no] (no) yes Resolving mastership... Complete. The other routing engine becomes the master.
For more information about the
request chassis routing-engine master
command, see the CLI Explorer.Verify that the Routing Engine in slot 1 is now the primary Routing Engine:
user@host> show chassis routing-engine Routing Engine status: Slot 0: Current state Backup Election priority Master (default) Routing Engine status: Slot 1: Current state Master Election priority Backup (default)
-
Install the new software package on the Routing Engine in slot 0 using the
request system software add
command:user@host> request system software add validate re0 /var/tmp/jinstall-9.2R1.8–domestic-signed.tgz
Installation and validation take about 15 minutes.
CAUTION:Do not include the
re0
orre1
option when you install a package using therequest system software add
command if the Routing Engine on which the package is located and the Routing Engine on which you want to install the package are the same. In such cases, the package gets deleted after a successful upgrade.For M Series, MX Series, and T Series routers running Junos OS Release 12.2 and later, you can use the
request system software add set
command to install multiple software packages at the same time:user@host> request system software add set re0 /var/tmp/installation-package
For more information about the
request system software add set
command, see request system software add (Junos OS) or the CLI Explorer. Reboot the Routing Engine using the
request system reboot
command:user@host> request system reboot Reboot the system? [yes, no] (no) yes
You must reboot the device to load the new installation of Junos OS on the device. You can combine steps 3 and 4 by adding reboot to the
request system software add
command. But if you do the steps separately, make sure you reboot the Routing Engine you just added system software to.Note:To terminate the installation, do not reboot your device. Instead, finish the installation and then issue the
request system software delete software-package-name
command. This is your last chance to stop the installation.The software is loaded when you reboot the system. Installation can take between 5 and 10 minutes. The device then reboots from the boot device on which the software was just installed. When the reboot is complete, the device displays the login prompt.
While the software is being upgraded, the Routing Engine on which you are performing the installation does not route traffic.
Log in to the current backup Routing Engine (slot 0) and issue the
show version
command to verify the version of the software installed.user@host> show version
-
(Optional) Add the jweb package using the
request system software add
command. Before you can add this package, you must first download the software as you did the installation package. For more information about downloading the jweb package, see Downloading Software (Junos OS).The jweb installation module adds a router management graphical user interface that you can use to view and configure your router.
Finalizing the Installation (Junos OS)
Once the software is installed on both Routing Engines, you return the router back to its original configuration and back up the new installation.
To finalize the redundant Routing Engines upgrade:
Restore the configuration that existed before you started this procedure (from Preparing the Device for the Installation (Junos OS)):
user@host> configure [edit] user@host# rollback 1
Note:The number on the
rollback
command should match the number of commits you did in preparing the router for the installation. For example, if you did a separate commit for disabling Routing Engine redundancy and disabling nonstop-bridging, you need to userollback 2
in this step.Save the configuration change on both Routing Engines:
[edit] user@host# commit synchronize and-quit
Transfer routing control back to the original primary Routing Engine in slot 0:
{backup} user@host> request chassis routing-engine master switch warning: Traffic will be interrupted while the PFE is re-initialized Toggle mastership between routing engines ? [yes,no] (no) yes Resolving mastership... Complete. The other routing engine becomes the master.
For more information about the
request chassis routing-engine master
command, see the CLI Explorer.Verify that the Routing Engine (slot 0) is indeed the primary Routing Engine:
{master} user@host> show chassis routing-engine Routing Engine status: Slot 0: Current state Master Election priority Master (default) Routing Engine status: Slot 1: Current state Backup Election priority Backup (default)
After you have installed the new software and are satisfied that it is successfully running, back up the new software on both the primary and the backup Routing Engines.
For backing up Junos OS with upgraded FreeBSD, use the
request system snapshot recovery
command. To find which platforms in which releases use Junos OS with upgraded FreeBSD, see Feature Explorer and enter Junos kernel upgrade to FreeBSD 10+. For more information, see Changes in Use of Snapshots for Junos OS with Upgraded FreeBSD.For Junos OS, use the
request system snapshot
command:{master} user@host> request system snapshot {master} user@host> request routing-engine login other-routing-engine {backup} user@host-re1> request system snapshot {backup} user@host-re1> request routing-engine login other-routing-engine {master} user@host>
The root file system is backed up to /altroot, and /config is backed up to /altconfig. The root and /config file systems are on the router’s CompactFlash card, and the /altroot and /altconfig file systems are on the router’ s hard disk or solid-state drive (SSD).
For more information about the
request system snapshot
command, see the CLI Explorer .Note:After you issue the
request system snapshot
command, you cannot return to the previous version of the software because the running copy and backup copy of the software are identical.