Operational Monitoring and Maintenance · Topic 3 of 4

Junos OS Installation and Upgrades

Learn how to upgrade Junos OS for JNCIA-Junos JN0-106: check the release, free storage, copy and verify the package, then software add and reboot.

  • 5 min
In a nutshell
  • Install with request system software add <package>; add reboot to restart automatically.
  • Packages are normally copied to /var/tmp with file copy.
  • Verify the file with file checksum md5 (or sha1, sha-256) against the published value.

What it is

Upgrading Junos OS means installing a new software package on the Routing Engine and rebooting the device into it. The same steps also install an older release when you need to downgrade.

The process is the same across Juniper platforms: check what runs now, make room, copy the package to the device, verify it, install it with request system software add, and reboot. Only the package file name differs by platform.

Check releaseshow versionFree spacestorage cleanupCopy packageto /var/tmpInstallsoftware addRebootnew release

How it works

Step 1: Check the current state

CommandWhy
show versionConfirms the current Junos OS release and the model, so you download the right package
show system storageShows free space; the package and the install need room
show chassis alarms and show system alarmsConfirms the device is healthy before you start

You download the package from the Juniper support site for your exact platform. A package built for one platform family will not install on another.

Step 2: Back up first

Before an upgrade, save a known good state you can return to:

  • request system configuration rescue save saves the current active configuration as the rescue configuration.
  • request system snapshot copies the current software and configuration to alternate storage on platforms that support it, so the device can still boot if the primary media fails.
  • Copy the configuration off the box, for example with file copy, or rely on your configuration archival setup.

The Configuration Basics chapter covers the rescue configuration and archival in detail.

Step 3: Make room and copy the package

If storage is tight, clean it up:

user@router> request system storage cleanup dry-run
user@router> request system storage cleanup

dry-run lists the files that would be deleted, such as old logs, crash files and temporary files, without deleting anything. Without it, the device asks for confirmation and then deletes them.

Copy the package into /var/tmp, the usual location for packages, with file copy. The source can be an FTP, HTTP or SCP URL:

user@router> file copy ftp://[email protected]/junos-package.tgz /var/tmp/

Step 4: Verify the package

Compare the checksum on the device with the one published on the download page, so you know the file was not damaged in transit:

user@router> file checksum md5 /var/tmp/junos-package.tgz

file checksum also supports sha1 and sha-256.

Step 5: Install and reboot

user@router> request system software add /var/tmp/junos-package.tgz reboot
OptionEffect
rebootReboots automatically when the installation finishes
validateChecks the active configuration against the new release before installing
no-validateSkips that check
unlinkDeletes the package file after installation to save space

If you leave out reboot, the new release is installed but does not run until you reboot with request system reboot. The device keeps running the old release in the meantime.

software addpackage installedreboot optionAutomaticrebootNew Junos OSrunningsoftware addwithout rebootOld releasestill runningrequest system rebootNew Junos OSrunning

Step 6: Confirm

After the reboot, log in and run show version to confirm the new release. Then check alarms, interfaces and routing neighbors to make sure everything came back.

On platforms that keep the previous software set, request system software rollback returns to the release that ran before the upgrade, again followed by a reboot.

Release numbers

Choose the target release by its number. A release such as 21.2R3-S2 means release 21.2, maintenance release R3 and service release S2. Within one release, a higher R or S number carries more fixes.

A worked example

An EX switch runs an older release and needs 21.2. The engineer runs show version to confirm the model, then show system storage and sees /var nearly full. request system storage cleanup dry-run lists old log files, so the engineer runs the cleanup.

The engineer saves a rescue configuration with request system configuration rescue save, copies the package to /var/tmp with file copy, and checks it with file checksum md5. The value matches the download page. request system software add /var/tmp/<package> reboot installs it, and after the reboot show version shows the new release.

How the exam asks about this

  • "Which command installs a new Junos OS package?" → request system software add.
  • "Which option makes the device restart automatically after the install?" → reboot.
  • "Which command frees disk space before an upgrade?" → request system storage cleanup.

Common mistakes

Expecting the new release to run straight after the install. Junos OS runs the new software only after a reboot. Without the reboot option you must reboot yourself.

Downloading the wrong package. Each package is built for a platform family, so check the model with show version first. Copy the package to /var/tmp, check the checksum, and install from the local file.

Skipping the backup. An upgrade can fail or change behaviour. Save a rescue configuration and, where supported, a snapshot before you start.

What to remember for the exam

  • Install with request system software add <package>; add reboot to restart automatically.
  • Packages are normally copied to /var/tmp with file copy.
  • Verify the file with file checksum md5 (or sha1, sha-256) against the published value.
  • request system storage cleanup frees space; dry-run only lists what it would delete.
  • Confirm the result with show version after the reboot.
Exam tip

The upgrade commands all start with request system: software add to install, storage cleanup to free space, snapshot to back up the software, and reboot to restart. Learn them as one family.

Check yourself

  • Which command installs a Junos OS package and restarts the device automatically?

    request system software add /var/tmp/<package> reboot.

  • How do you see which files a storage cleanup would delete without deleting them?

    Run request system storage cleanup dry-run.

  • Why do you run file checksum md5 on the package?

    To compare its checksum with the published value and confirm the file is complete and undamaged.

Topic 3 of 4 in Operational Monitoring and Maintenance

Test yourself on Operational Monitoring and Maintenance

The full Juniper JNCIA-Junos JN0-106 question bank has 1,155 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Juniper. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.