Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Installing Software on Routing Devices (Junos OS)

date_range 26-Feb-24

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.

Note:

Starting in Junos OS release 20.3R1, ACX710 routers support limited images.

To upgrade the software on a router or switch:

  1. Install the new software package using the request system software add command:
    content_copy zoom_out_map
    user@host> request system software add /var/tmp/installation-package

    The variable installation-package is the name of the installation package. Specify the absolute path on the local disk. For package name prefixes, see Junos OS Installation Package Names.

    Note:

    (Junos OS only) To install multiple software packages at one time, you can use the request system software add set command. For more information on this command, see the set option in request system software add (Junos OS).

    CAUTION:

    Do not include the re0 | re1 option when you install a package using the request 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.

  2. Reboot the device to start the new software:
    content_copy zoom_out_map
    user@host>  request system reboot
    Reboot the system ? [yes,no] (no) yes
    
    Note:

    You must reboot the device to load the new software release on the device.

    To terminate the installation, do not reboot the device. Instead, finish the installation and then issue the request system software delete 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.

  3. Log in and verify the release of the software installed:
    • To verify release for installation of a Junos OS release, use the show version command.

      content_copy zoom_out_map
      user@host>  show version
      

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)

Determine if this is the best procedure for upgrading your device:

Warning:

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:

  1. 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.

  2. From the CLI operational prompt, enter configuration mode:

    content_copy zoom_out_map
    {master}
    user@host> configure
    Entering configuration mode
      
    {master} [edit]
    user@host#
  3. Disable nonstop active routing (NSR) (supported on switches running Junos OS Release 10.4 or later):

    content_copy zoom_out_map
    {master}[edit] 
    user@host# delete routing-options nonstop-routing 
  4. Disable nonstop-bridging if it is enabled:

    content_copy zoom_out_map
    {master}[edit]
    user@host# delete protocols layer2-control nonstop-bridging
    
  5. Disable Routing Engine redundancy if enabled:

    content_copy zoom_out_map
    {master}[edit]
    user@host# (delete | deactivate) chassis redundancy graceful-switchover
    
  6. Save the configuration change on both Routing Engines:

    content_copy zoom_out_map
    {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.

  7. Exit the CLI configuration mode:

    content_copy zoom_out_map
    [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:

  1. Log in to the console port on the current primary Routing Engine in slot 0.

  2. Install the new software package on the backup Routing Engine (re1) using the request system software add command:

    content_copy zoom_out_map
    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 or re1 option when you install a package using the request 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:

    content_copy zoom_out_map
    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.

  3. Reboot the backup Routing Engine to start the new software:

    content_copy zoom_out_map
    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.

  4. Issue the show version invoke-on other-routing-engine command to verify the new software is installed.

    content_copy zoom_out_map
    user@host> show version invoke-on other-routing-engine
    re1:
    --------------------------------------------------------------------------
    Hostname: host1
    Model: mx240
    Junos: package-name
    . . .
    user@host>
  5. (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:

  1. Transfer routing control from the primary to the backup Routing Engine:

    content_copy zoom_out_map
    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.

  2. Verify that the Routing Engine in slot 1 is now the primary Routing Engine:

    content_copy zoom_out_map
    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)
  3. Install the new software package on the Routing Engine in slot 0 using the request system software add command:

    content_copy zoom_out_map
    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 or re1 option when you install a package using the request 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:

    content_copy zoom_out_map
    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.

  4. Reboot the Routing Engine using the request system reboot command:

    content_copy zoom_out_map
    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.

  5. Log in to the current backup Routing Engine (slot 0) and issue the show version command to verify the version of the software installed.

    content_copy zoom_out_map
    user@host> show version
  6. (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:

  1. Restore the configuration that existed before you started this procedure (from Preparing the Device for the Installation (Junos OS)):

    content_copy zoom_out_map
    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 use rollback 2 in this step.

  2. Save the configuration change on both Routing Engines:

    content_copy zoom_out_map
    [edit]
    user@host# commit synchronize and-quit
  3. Transfer routing control back to the original primary Routing Engine in slot 0:

    content_copy zoom_out_map
    {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.

  4. Verify that the Routing Engine (slot 0) is indeed the primary Routing Engine:

    content_copy zoom_out_map
    {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)
  5. 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:

      content_copy zoom_out_map
      {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.

footer-navigation