Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Install, Upgrade, and Downgrade Software

SUMMARY Devices are delivered with Junos OS Evolved already installed on them. As new features and software fixes become available, you must upgrade Junos OS Evolved to use them. You can install software on devices that have either single or redundant routing engines. Before you install a software release on a device, you should make any necessary changes to the configuration and back up the current system.

Junos OS Evolved ensures that all Routing Engines (Routing Engines) and FPCs in the system are running the same software version. When you issue the request system software add image-name operational mode command on the primary Routing Engine, the system installs the new version of software on both Routing Engines. Once you reboot the system after a software package installation, all the Routing Engines and FPCs in the system run the new version of the software.

Junos OS Evolved supports storing multiple versions of software on the storage media. You can view the installed versions on the device with the show system software list operational mode command. Each version of the software is stored in a distinct area in the /soft directory, ensuring that a software package installation does not impact the other software versions installed in the system. We recommend you keep no more than 5 versions of software in the system.

In Junos OS, you must first upgrade the software on the standby Routing Engine and then switch control to the standby Routing Engine to run the new software version. After you are sure the software upgrade on the original standby Routing Engine is successful, you can upgrade the original primary Routing Engine to the new software version and switch control back to the original primary Routing Engine. However, with Junos OS Evolved, you do not need to upgrade the standby Routing Engine first. You upgrade both Routing Engines using a single command issued on the primary Routing Engine.

During a successful installation, the installation package completely re-installs the existing software. It retains configuration files and similar information, such as secure shell and host keys, from the previous version. The previous software package is preserved in a separate area, and you can manually roll back to it if necessary. If the software installation fails for any reason, such as loss of power during the installation process, the system returns to the originally active installation when you reboot. For more background information on software installation, see Software Installation and Upgrade Overview (Junos OS Evolved).

Junos OS Evolved allows you to roll back to any of the releases stored in the system with the request system software rollback image-name operational mode command. The system also stores with each release the last configuration that was running when the release was running. Junos OS Evolved supports rolling back to an alternate image with the currently-running configuration or with the saved configuration that corresponds to the rollback software image, with the request system software rollback with-old-snapshot-config operational mode command.

If the system does not function properly after the upgrade and reboot, the previous version can be restored by rolling back to the previous version. See the roll back step in the Recover from a Failed Installation Attempt If the CLI Is Working procedure.

For dual-Routing Engine devices, if a Routing Engine inserted into the device has a different software version, the new Routing Engine is kept out of the system. We recommend that you configure the software to synchronize automatically to the new Routing Engine, by configuring the auto-sw-sync enable statement at the [edit system] hierarchy level. When this configuration is present, the Routing Engine that is in the system copies over all the images to the new Routing Engine and reboots the new Routing Engine so that it automatically comes up with the correct software. You can also choose to synchronize the software to the new Routing Engine manually each time you have to replace a Routing Engine, by using the request system software sync all-versions operational mode command, which synchronizes the software versions and configurations. For more information about replacing Routing Engines, see Replace a Routing Engine in a Dual-Routing Engine System.

Prepare to Install Software

Follow these steps to prepare to install your Junos OS Evolved software:

  1. Using a Web browser, navigate to the All Junos Platforms software download URL on the Juniper Networks webpage: https://www.juniper.net/support/downloads/
  2. In the Find a Product box, enter the Junos OS platform for the software that you want to download.
  3. Select Junos Evolved from the OS drop-down list.
  4. Select the relevant release number from the Version drop-down list.
  5. In the Install Package section, select the software package for the release.
  6. Log in to the Juniper Networks authentication system using the username (generally your e-mail address) and password supplied by a Juniper Networks representative.
  7. Review and accept the End User License Agreement.
  8. Download the software to a local host.
    Note:

    Download the Services Profile 1 image to use the lean rpd profile. For more information about the types of Junos OS installation package prefixes, see Junos OS Evolved Installation Packages.

  9. For a dual-Routing Engine device, ensure that both Routing Engines are participating in the system, and are running the same software. See Prepare both Routing Engines to Join the System.
  10. Ensure enough disk space is available to install the package, ensure that a system backup is available, and gather information about the system and how it is currently handling traffic by following the procedure in Before You Upgrade or Reinstall Junos OS Evolved.
  11. Copy the software image to the /var/tmp/ directory of the device running Junos OS Evolved using the scp command.
  12. Validate the configuration against the installation image before upgrading or downgrading your software by following the procedure in Validate the Configuration against the Installation Image.
  13. Install the new package on the device.

    Choose one of the following procedures:

    Note:

    We recommend that you upgrade all software packages out of band using the console port, because in-band connections are lost during the installation process.

For more information about EOL releases and to review a list of EOL releases, see the Junos OS Evolved Dates and Milestones webpage.

Prepare both Routing Engines to Join the System

For dual-Routing Engine devices, both Routing Engines must be participating in the system to be able to install software on both Routing Engines. You must verify that both Routing Engines are in the system and which software versions are currently running in the system. You use the show system software list, show system nodes, and show system alarms operational mode commands to do so and to determine what course of action to take if one of the Routing Engines is not participating in the system.

Issue the show system software list and show system nodes commands on the primary Routing Engine to check the status of the Routing Engines. If information about both re0 and re1 appear in the output, and show a status of Status : online, apps-ready in the output of the show system nodes command, both Routing Engines are operational, part of the system, and are running the same software version. You can proceed to install the software. See Install the Software Package on a Device with Redundant Routing Engines. For example:

If both Routing Engines are present, but the status of one Routing Engine is not Status : online, apps-ready, you need to take action to bring that Routing Engine into the system. In these examples, re0 is the Routing Engine in the system and re1 is the other Routing Engine that needs to join the system:

  • If the status is Status : offline, configured-offline, issue the request node online node-name operational mode command on the Routing Engine in the system to bring the other Routing Engine back online. For example:

    Issue the show system nodes command to verify the Routing Engine has joined the system (both Routing Engines show Status : online, apps-ready).

    If the status is still Status : offline, configured-offline, the other Routing Engine is configured to be offline and you need to delete that part of the configuration and commit it. Use the show configuration system node operational mode command to check the configuration. Delete the configuration, and issue the show system nodes command to check the status. The Routing Engines should both be online.
  • If the status is Status : offline, configured-powered-off, the other Routing Engine has either been powered off or halted. Issue the request chassis cb slot slot-number offline operational mode command from the Routing Engine in the system to determine which is the case. For example:
    • If the Routing Engine was halted, the status message says Offline initiated:
    • If the Routing Engine was powered-off, the status message says CB is already Offline:

    In either case, you need to bring the other Routing Engine back online and verify the Routing Engine has joined the system:

    1. Issue the request chassis cb slot slot-number online operational mode command on the Routing Engine in the system to bring the other Routing Engine online:

      After issuing the command, please wait a few minutes for the other Routing Engine to come back online.

    2. Issue the show system software list operational mode command to verify that the Routing Engine has joined the system and that both Routing Engines are running the same software version:
  • If the output of the show system software list and show system nodes operational mode commands do not contain information for re1 and the show system alarms operational mode command shows that the software versions do not match (Software Version Mismatch on re1:package-name), issue the request system software sync all-versions operational mode command on the Routing Engine in the system to bring the other Routing Engine into the system and synchronize the software from the Routing Engine in the system to the other Routing Engine.

    Issue the show system software list operational mode command to verify that both Routing Engines are in the system and the Routing Engines are running the same software version:

Install the Software Package on a Device with Redundant Routing Engines

Unlike Junos OS, Junos OS Evolved ensures all nodes in a system are running the same software version. In Junos OS Evolved, the device can contain multiple releases of the software simultaneously if enough space exists. If the device does not have enough space, you must delete an older image of the software before installing a new one. We recommend that you store no more than 5 versions of software on the device.

Before you install a new software release on a device, you should back up the current system. See Back Up and Recover Software with Snapshots.

Before you upgrade the software, you must prepare for the installation. See Prepare to Install Software.

The request system software add operational mode command installs the software on both the Routing Engines. This command does not modify the currently running software stack. This command validates the current configuration using the new version of the software. Once validation succeeds, the install process checks for sufficient storage on both Routing Engines. Once the storage checks pass, the new software is installed on both Routing Engines. You need to reboot the system to run the new software. The software installation process only affects traffic for a short while; for more information, see Table 1.

Table 1: Software Installation Tasks and their Traffic Impact
Tasks Actions Traffic Impact
Add the software Validate the configuration, check for sufficient storage, install on both Routing Engines None
Verify the software installation Show image that will be the current image after the system reboots None
Reboot the system Reboot all Routing Engines and FPCs at the same time Impacted; resumes after the system reboots
Verify which software image is running Show image running after reboot None

To upgrade the software on a device:

  1. Install the new software package using the request system software add installation-package operational mode command on the primary Routing Engine:

    The variable installation-package is the name of the installation package. Specify the absolute path on the local disk; for example, /var/tmp/ptx.iso. In this example, the package junos-evo-install-ptx-x86-64-20.4R2.13-EVO was downloaded onto the local disk as /var/tmp/ptx.iso. To understand package name prefixes, see Junos OS Evolved Installation Packages.

    Note:

    Do not change the configuration before you reboot the device. If you make any configuration changes at this time, the system discards the changes.

  2. Use the show system software list operational mode command on the primary Routing Engine to verify the newly-added software package is now the next-boot version on both Routing Engines:

    In the example, the next-boot version on both Routing Engines is now junos-evo-install-ptx-x86-64-20.4R2.13-EVO. Note that junos-evo-install-ptx-x86-64-20.4R2.14-EVO is still the currently running version.

  3. Reboot the device from the primary Routing Engine to start the new software:

    The system reboots all nodes at the same time.

    Note:

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

    To prevent the newly added package from becoming the currently running software, do not reboot the device. Instead, answer no, and then issue the request system software delete package-name command. This prompt gives you the opportunity to stop the installation from finishing.

    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. After the reboot, Junos OS Evolved automatically saves the previous image of the software and configuration to create the rollback image.

    During the reboot, the Routing Engine on which you are performing the installation does not route traffic.

  4. Log in to the primary Routing Engine and verify the release of the software installed on both Routing Engines, using the show system software list operational mode command:

    The current version on both Routing Engines is now junos-evo-install-ptx-x86-64-20.4R2.13-EVO. junos-evo-install-ptx-x86-64-20.4R2.14-EVO is now the rollback version.

  5. Verify that the system is running properly and correctly handling traffic by repeating the steps in the procedure in Before You Upgrade or Reinstall Junos OS Evolved and compare the information to what you collected before you installed the software package.
  6. If you need to make any changes to the configuration as a result of the verification step, don't forget to back up the software and configuration using the request system snapshot operational mode command. See Back Up and Recover Software with Snapshots.

Install the Software Package on a Device with a Single Routing Engine

Before you install a new software release on a device, you should back up the current system. See Back Up and Recover Software with Snapshots.

In Junos OS Evolved, the device can contain multiple releases of the software simultaneously as long as the system has enough space. If the system does not have enough space, you must delete an older image of the software before installing a new one. We recommend that you store no more than 5 versions of software on the device.

Before you upgrade the software, you must prepare for the installation. See Prepare to Install Software.

To upgrade the software on a device:

  1. Install the new software package using the request system software add operational mode command:

    The variable installation-package is the name of the installation package. Specify the absolute path on the local disk; for example, /var/tmp/junos-evo-install-ptx.iso. To understand package name prefixes, see Junos OS Evolved Installation Packages.

    Note:

    Do not change the configuration before you reboot the device. If you make any configuration changes at this time, the system discards the changes.

  2. Use the show system software list operational mode command to verify the newly-added software package is now the next-boot version:

    In the example, the next-boot version is now junos-evo-install-ptx-x86-64-20.4R2.13-EVO. Note that junos-evo-install-ptx-x86-64-20.4R2.14-EVO is still the currently running version.

  3. Reboot the device to start the new software:
    Note:

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

    To prevent the newly added package from becoming the currently running software, do not reboot the device. Instead, answer no, and then issue the request system software delete package-name command. This prompt gives you the opportunity to stop the installation from finishing.

    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. After the reboot, Junos OS Evolved automatically saves the previous image of the software and configuration to create the rollback image.

    During the reboot, the Routing Engine does not route traffic.

  4. Log in and verify the release of the software installed, using the show system software list operational mode command:
  5. Verify that the system is running properly and correctly handling traffic by repeating the steps in the procedure in Before You Upgrade or Reinstall Junos OS Evolved and compare the information to what you collected before you installed the software package.
  6. If you need to make any changes to the configuration as a result of the verification step, don't forget to back up the software and configuration using the request system snapshot operational mode command. See Back Up and Recover Software with Snapshots.

Recover from a Failed Installation Attempt If the CLI Is Working

If a Junos OS Evolved installation fails, and the CLI is working, use one of these procedures to install Junos OS Evolved, depending upon the situation:

  • Roll back to the previous version of software.

    Devices running Junos OS Evolved save the previous running image. The first time you upgrade the device, the new software package installs in next-boot position. When you finish the installation and reboot, the new image becomes the current image. The previous image becomes the rollback image. For early initialization failures, the Routing Engine automatically switches to the secondary SSD.

    You can rollback to the previously saved software version and configuration that was active when that version was running.

  • For early initialization failures, use the software stored on the inactive solid-state drive (SSD) to repair the software on the active SSD of the affected Routing Engine. If the active SSDs on both Routing Engines have failed, you must perform these steps on both Routing Engines.
    1. Reboot from the inactive SSD, typically the secondary SSD (disk2) on the primary Routing Engine (RE0).

      If the active SSD on the other Routing Engine has also failed, you must repeat this step for the other Routing Engine, typically RE1.

    2. Create a snapshot to install the rollback image onto the primary SSD.
      To restore the primary SSD, perform a snapshot to install the rollback image from the secondary SSD onto the primary SSD.
    3. Boot from the primary SSD, typically disk1 on the primary Routing Engine (re0).
      The system is now operational using the rollback software image.
  • If neither one of the previous steps is successful, then install the Image from a USB drive.

    The USB installation process deletes all configuration and other files. Therefore, after the USB installation process completes:

    • If your system contains only one Routing Engine, you need to re-create the configuration file. Hopefully, you previously stored a configuration file on a remote server or other off-box location. If you did not, you must start with the initial configuration steps as described in the hardware guide for your product, and then continue to add the configuration statements you need.

    • If your system contains two Routing Engines, the secondary Routing Engine boots up, but does not join the system formed by the primary Routing Engine and the FPCs, because the current software versions are different. To synchronize the software and configurations from the primary Routing Engine to the secondary Routing Engine, use the request system software sync all-versions operational mode command. The secondary Routing Engine then reboots and joins the system.

    If you have already created a USB drive with the correct software package, follow the instructions in Boot Junos OS Evolved from a Bootable USB Drive Using the CLI to install an image on the Routing Engine and boot the device. If you have not yet created a USB drive, then follow the instructions at Boot Junos OS Evolved by Using a Bootable USB Drive to create a USB drive using either a Windows or a Mac OS X device. Then use that USB drive to install the image.

Replace a Routing Engine in a Dual-Routing Engine System

Junos OS Evolved ensures all nodes in a system are running the same software version.

If you insert a Routing Engine that has the same current software version as the primary Routing Engine into the system, the new Routing Engine joins the system, and the configurations and the other software versions automatically synchronize from the existing Routing Engine to the new Routing Engine, even if you have not configured the auto-sw-sync statement.

If you insert a Routing Engine that has a different software version into the system and you have not configured the auto-sw-sync enable statement, the Routing Engine is kept outside the system and the system generates a software mismatch alarm. The alarm message displays the Routing Engine name and the version of software on the newly-inserted Routing Engine, similar to the following: Software Version Mismatch on re1:junos-evo-install-ptx-x86-64-20.4R2.6-EVO..

To clear the alarms and bring the Routing Engine into the system, manually synchronize the primary Routing Engine to the new Routing Engine with the request system software sync all-versions operational mode command.

We recommend that you configure the auto-sw-sync enable configuration statement at the [edit system] hierarchy level before inserting a new Routing Engine into the system. When you do so, the Routing Engine in the system detects the newly-inserted Routing Engine and automatically synchronizes the software to the new Routing Engine. All images are synchronized to the new Routing Engine and the system reboots the newly-inserted Routing Engine. When the newly-inserted Routing Engine comes back up, it joins the system. Each software image has the configuration used when the image ran stored with it. The configuration associated with the current running image is synchronized from the primary Routing Engine to the backup Routing Engine. Configurations stored with the rollback and other images are also synchronized to the backup Routing Engine when you configure the auto-sw-sync enable statement on the primary Routing Engine.

To replace a Routing Engine in a dual-Routing Engine system:

  1. Configure the auto-sw-sync enable statement.

    Enter configuration mode, configure the auto-sw-sync enable statement, commit the configuration, and exit configuration mode to get back to operational mode:

  2. Replace the Routing Engine.
  3. Allow several minutes for the software and configurations to synchronize and for the newly-inserted Routing Engine to reboot.
  4. Verify that the newly-inserted Routing Engine is now part of the system and that the software versions on both Routing Engines are the same, by issuing the show system software list operational mode command.

    You must make sure that the system has finished synchronizing all of the images in the background before you switch control to the newly-inserted Routing Engine to ensure that the newly-inserted Routing Engine does not remove any images from the existing Routing Engine.

  5. If the software was not automatically synchronized or if you decided not to configure the auto-sw-sync enable statement, manually synchronize the software versions and configurations to the newly-inserted Routing Engine, by issuing the request system software sync all-versions operational mode command from the primary Routing Engine.

    All software images and configurations stored with the images are synchronized to the new Routing Engine and the new Routing Engine is rebooted. When the new Routing Engine comes back up, it joins the system.

  6. (Required if you have a rescue configuration) Synchronize the rescue configuration from the primary Routing Engine to the secondary Routing Engine with the file copy rescue-config-filenamesecondary-re-name:/config/ command on the primary Routing Engine.

    For a dual-Routing Engine system, when the secondary Routing Engine boots with a different current image than the primary Routing Engine's current image and the auto-sw-sync enable statement is configured, the primary Routing Engine synchronizes the current image to the secondary Routing Engine. The primary Routing Engine also synchronizes the rollback software image and the other images to the secondary Routing Engine. If the current configuration file (juniper.conf.gz) from the primary Routing Engine matches the current configuration file on the secondary Routing Engine, then the primary Routing Engine does not synchronize the rescue configuration (rescue.conf.gz) to the secondary Routing Engine. For example:

  7. Verify that the newly-inserted Routing Engine can function properly with the request chassis routing-engine master release operational mode command on the primary Routing Engine to release control to the newly-inserted Routing Engine.

    If the newly-inserted Routing Engine then does not become the primary Routing Engine, issue the request chassis routing-engine master release command on the newly-inserted Routing Engine to release control, remove the newly-inserted Routing Engine, get a different Routing Engine and insert it, and repeat this procedure.

For more information about node synchronization, see request system software sync and auto-sw-sync.

Not Enough Disk Space for Software Installation

The software installation process requires a certain amount of unused disk space. If the system does not have enough space, you receive an error message similar to the following:

WARNING: The /soft filesystem is low on free disk space.

WARNING: This package requires 1075136k free, but there is only 666502k available.

If you need to create enough disk space for the software installation to be successful, you can do the following:

  • Identify and delete older images by using the show system software list and request system software delete operational mode commands.
  • Identify and delete unnecessary files by using the show system storage and request system storage cleanup operational mode commands.

For more information on how to create enough disk space for a software installation, see Ensure Sufficient Disk Space for Upgrades.