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 (REs) 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 RE, the system installs the new version of software on both REs. Once you reboot the system after a software package installation, all the REs 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 RE and then switch control to the standby RE to run the new software version. After you are sure the software upgrade on the original standby RE is successful, you can upgrade the original primary RE to the new software version and switch control back to the original primary RE. However, with Junos OS Evolved, you do not need to upgrade the standby RE first. You upgrade both REs using a single command issued on the primary RE.

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

  9. For a dual-RE device, ensure that both REs 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-RE devices, both REs must be participating in the system to be able to install software on both REs. You must verify that both REs 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 REs is not participating in the system.

Issue the show system software list and show system nodes commands on the primary RE to check the status of the REs. 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 REs 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 REs are present, but the status of one RE is not Status : online, apps-ready, you need to take action to bring that RE into the system. In these examples, re0 is the RE in the system and re1 is the other RE 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 RE in the system to bring the other RE back online. For example:

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

    If the status is still Status : offline, configured-offline, the other RE 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 REs should both be online.
  • If the status is Status : offline, configured-powered-off, the other RE has either been powered off or halted. Issue the request chassis cb slot slot-number offline operational mode command from the RE in the system to determine which is the case. For example:
    • If the RE was halted, the status message says Offline initiated:
    • If the RE was powered-off, the status message says CB is already Offline:

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

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

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

    2. Issue the show system software list operational mode command to verify that the RE has joined the system and that both REs 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 RE in the system to bring the other RE into the system and synchronize the software from the RE in the system to the other RE.

    Issue the show system software list operational mode command to verify that both REs are in the system and the REs 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 (REs). 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 REs. Once the storage checks pass, the new software is installed on both REs. 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 REs None
Verify the software installation Show image that will be the current image after the system reboots None
Reboot the system Reboot all REs 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 RE:

    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 RE to verify the newly-added software package is now the next-boot version on both REs:

    In the example, the next-boot version on both REs 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 RE 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 RE on which you are performing the installation does not route traffic.

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

    The current version on both REs 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 RE 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 RE. If the active SSDs on both REs have failed, you must perform these steps on both REs.
    1. Reboot from the inactive SSD, typically the secondary SSD (disk2) on the primary RE (RE0).

      If the active SSD on the other RE has also failed, you must repeat this step for the other RE, 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 RE (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 RE, 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 REs, the secondary RE boots up, but does not join the system formed by the primary RE and the FPCs, because the current software versions are different. To synchronize the software and configurations from the primary RE to the secondary RE, use the request system software sync all-versions operational mode command. The secondary RE 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 RE and boot the device. If you have not yet created a USB drive, then follow the instructions at Booting 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-RE System

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

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

If you insert an RE that has a different software version into the system and you have not configured the auto-sw-sync enable statement, the RE is kept outside the system and the system generates a software mismatch alarm. The alarm message displays the RE name and the version of software on the newly-inserted RE, 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 RE into the system, manually synchronize the primary RE to the new RE 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 RE into the system. When you do so, the RE in the system detects the newly-inserted RE and automatically synchronizes the software to the new RE. All images are synchronized to the new RE and the system reboots the newly-inserted RE. When the newly-inserted RE 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 RE to the backup RE. Configurations stored with the rollback and other images are also synchronized to the backup RE when you configure the auto-sw-sync enable statement on the primary RE.

To replace an RE in a dual-RE 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 RE.
  3. Allow several minutes for the software and configurations to synchronize and for the newly-inserted RE to reboot.
  4. Verify that the newly-inserted RE is now part of the system and that the software versions on both REs 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 RE to ensure that the newly-inserted RE does not remove any images from the existing RE.

  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 RE, by issuing the request system software sync all-versions operational mode command from the primary RE.

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

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

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

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

    If the newly-inserted RE then does not become the primary RE, issue the request chassis routing-engine master release command on the newly-inserted RE to release control, remove the newly-inserted RE, get a different RE 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.