Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Installing Software on MX Series Routers Using a USB Flash Drive

You can install or upgrade Junos OS on an MX Series router using a USB flash drive.

Note:

This topic describes overall MX Series router information.

For details about specific MX Series routers, see the Hardware Guide for that device.

To access the Hardware Guide for a specific device, review Junos OS by Product and select the device. A link to the Hardware Guide for the device is displayed, along with links to other device specific guides.

Before you begin, determine which software package you need and download it onto the USB flash drive. For information on which packages to use for which upgrades, see Junos OS and Junos OS Evolved Installation Package Names.

Note:

This topic describes a standard Junos OS installation and upgrade with a Junos OS installation package.

For information about a Junos OS recovery installation, see Recovery of Junos OS.

For information about upgrading to Junos OS with upgraded FreeBSD, see Upgrading and Downgrading to Junos with Upgraded FreeBSD.

Pre-Installing Junos OS on a USB Flash Drive

A USB flash drive must have Junos OS stored on it before using the software to install on or upgrade the router.

To pre-install the software on a USB flash drive, ensure the following:

  • The USB flash drive meets the MX Series router USB port specifications.

  • The USB flash drive is empty and formatted as FAT-32.

  • The USB flash drive capacity is large enough to accommodate the size of the desired Junos OS package.)

  • A computer to download the software package from the download site and copy it to the USB flash drive.

To download a Junos OS package onto a USB flash drive:

  1. Insert the USB flash drive into your computer.
  2. Navigate to the download site to download the desired Junos OS package to the USB flash drive.

    Recommended download site: MX Series Software Downloads.

  3. Choose your router model and version and select a software package to download from the Install Media menu.
  4. Download the software package.

    (Optional) Rename the software package for identification purposes.

  5. Eject the USB flash drive when the download has completed.

Installing Junos OS from a USB Flash Drive

Note:

As a best practice, save a system snapshot of the installed Junos OS image and configuration files for backup purposes before starting the installation procedure.

For details about saving a system snapshot, see request system snapshot (Junos OS with FreeBSD Prior to Release 10).

Use the following steps to install a Junos OS package from a USB flash drive.

  1. Ensure that the router has been powered off.
  2. Insert the USB flash drive into the USB port on the router.
  3. Power on the router.

    Powering on the router starts the loader script and checks for a Junos OS package on the USB flash drive.

  4. When the install prompt appears, enter Yes.
  5. When the installation has completed, reboot the router:
  6. After the reboot has completed, log in and verify that the new version of the software has been properly installed.

Upgrading Junos OS using a USB Flash Drive

The procedure to upgrade Junos OS on an MX Series router using a USB flash drive is different than installing Junos OS from a USB flash drive. The install procedure includes booting the device from a USB flashdrive and installing a fresh image of Junos OS without preserving configuration files or data files. The upgrade procedure includes replacing the existing Junos OS with a different version of Junos OS on the device while preserving existing configuration files and data files.

The procedure to upgrade includes:

  1. On the router, enter the shell as the root user:
  2. List the existing devices on the router.

    For example:

  3. Insert the USB flash drive into the USB port on the router.

    The console messages describe the device ID of the USB flash drive.

    You can use the results of the ls directory name command to determine the device ID of the USB flash drive by comparing it to the list of device IDs of the previous step.

    Note:

    If the console session is not available while inserting the USB, check the /var/log directory for messages related to da. For example, use the show log messages | match da command to display the messages.

    In this example, /dev/da2s1 is the device ID of the USB flash drive.

  4. Create a directory for the USB drive to mount to.

    For example:

  5. Mount the USB drive to the new directory and check the contents of the directory.

    For example:

  6. Copy the Junos OS package from the USB flash drive to the /var/tmp/ directory of the router's internal storage.
    Note:

    Use the ls directory name command to verify the Junos OS package was copied to the router's internal storage.

    In the example, the MX_image.tgz file on the USB flash drive is copied to the /var/tmp directory on the router.

  7. Unmount the USB flash drive after the Junos OS package has been copied to the router's internal storage.

    For example:

Proceed to the next section to continue upgrading Junos OS.

Note:

For devices with Routing Engines with VMhost support, you can use the USB device as an emergency boot device. For more information, see Creating an Emergency Boot Device for Routing Engines with VM Host Support. After the junos-vmhost-install-usb image is written to the USB drive using the dd command, you can boot to the USB using the request vmhost reboot usb command.

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.

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:

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

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:

  3. Disable nonstop active routing (NSR) (supported on switches running Junos OS Release 10.4 or later):

  4. Disable nonstop-bridging if it is enabled:

  5. Disable Routing Engine redundancy if enabled:

  6. Save the configuration change on both Routing Engines:

    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:

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:

    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:

    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:

    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.

  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:

    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:

  3. Install the new software package on the Routing Engine in slot 0 using the request system software add command:

    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:

    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:

    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.

  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)):

    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:

  3. Transfer routing control back to the original primary Routing Engine in slot 0:

    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:

  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.

    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.