Juniper Switch Upgrade

Rahul Agarwal
3 min readFeb 25, 2021

This document helps upgrading Junos version

Login to your switch and first check for any alarms: This is a test switch so there is no management port configured. In production environment, it’ll be up.

root@test-switch1.example.com> show system alarms2 alarms currently activeAlarm time               Class  Description2014-06-11 09:13:53 UTC  Major  Management Ethernet Link Down2014-06-11 09:02:48 UTC  Minor  Rescue configuration is not set

Check installed JunOS version:

root@test-switch1.example.com> show system snapshot media internalfpc0:--------------------------------------------------------------------------Information for snapshot on       internal (/dev/da0s1a) (backup)Creation date: Nov 15 13:34:22 2011JUNOS version on snapshot:jbase  : 11.4R1.6jkernel-ex-2200: 11.4R1.6jweb-ex: 11.4R1.6jcrypto-ex: 11.4R1.6jdocs-ex: 11.4R1.6jswitch-ex: 11.4R1.6jpfe-ex22x: 11.4R1.6jroute-ex: 11.4R1.6Information for snapshot on       internal (/dev/da0s2a) (primary)Creation date: May 21 15:38:49 2014JUNOS version on snapshot:jbase  : ex-12.3R6.6jkernel-ex-2200: 12.3R6.6jweb-ex: 12.3R6.6jcrypto-ex: 12.3R6.6jdocs-ex: 12.3R6.6jswitch-ex: 12.3R6.6jpfe-ex22x: 12.3R6.6jroute-ex: 12.3R6.6fips-mode-arm: 12.3R6.6

As Primary is running 12.3R6.6 and backup is running 11.4R1.6, we need to copy primary partition to backup partition:

root@test-switch1.example.com> request system snapshot slice alternate member 0fpc0:--------------------------------------------------------------------------Formatting alternate root (/dev/da0s1a)...Copying '/dev/da0s2a' to '/dev/da0s1a' .. (this may take a few minutes)The following filesystems were archived: /

Check to see if both partitions have same version:

> show system snapshot media internal

To Download Junos Software Service Release:

  1. Go to Junos Platforms — Download Software page
  2. Select your product
  3. From the Type/OS drop-down menu, select Junos SR
  4. From the Version drop-down menu, select your version
  5. Click the Software tab
  6. Select the Install Package as need and follow the prompts

Once download is completed, copy the Junos OS to USB flash drive.

Run below command to list files under /dev

root@test-switch1.example.com> start shell user rootroot@test-switch1:RE:0% ls /dev/da*/dev/da0        /dev/da0s1a     /dev/da0s2      /dev/da0s2c     /dev/da0s3c     /dev/da0s3e     /dev/da0s4c/dev/da0s1      /dev/da0s1c     /dev/da0s2a     /dev/da0s3      /dev/da0s3d     /dev/da0s4      /dev/da0s4droot@test-switch1:RE:0%

Now mount the USB flash drive to the switch using link https://kb.juniper.net/InfoCenter/index?page=content&id=KB12880&actp=METADATA

Create Directory and mount the flash drive:

root@test-switch1:RE:0% mkdir /var/tmp/usbroot@test-switch1:RE:0% mount_msdosfs /dev/da1s1 /var/tmp/usbroot@test-switch1:RE:0% ls /var/tmp/usb.Spotlight-V100                                         ._junos-srxsme-12.1X46-D65.4-domestic.tgz               jinstall-ex-2200-14.1X53-D44.3-domestic-signed.tgz.Trashes                                                .fseventsd._jinstall-ex-2200-14.1X53-D44.3-domestic-signed.tgz    System Volume Informationroot@test-switch1:RE:0%

Copy contents to /var/tmp and lis files to see .tgz file is there:

root@test-switch1:RE:0% cp /var/tmp/usb/jinstall-ex-2200-14.1X53-D44.3-domestic-signed.tgz /var/tmproot@test-switch1:RE:0% ls /var/tmp.snap                                                   install                                                 usbex_autod_config                                         jinstall-ex-2200-14.1X53-D44.3-domestic-signed.tgz      vi.recoverex_autod_rollback_cfg                                   picsgres-tp                                                 rtsdbroot@test-switch1:RE:0%

Umount USB drive and return to CLI:

root@test-switch1:RE:0% umount /var/tmp/usbroot@test-switch1:RE:0% cli{master:0}root@test-switch1.example.com>

Make sure date is correct on the switch. If not set it like below to avoid any Package signature validation failed Error.

root@test-switch1.example.com> set date YYYYMMDDHHMM.SS 

Run software using below command:

root@test-switch1.example.com> request system software add /var/tmp/jinstall-ex-2200-14.1X53-D44.3-domestic-signed.tgz[Jul 27 15:26:13]: Checking pending install on fpc0[Jul 27 15:26:15]: Validating on fpc0[Jul 27 15:27:21]: Done with validate on all virtual chassis membersfpc0:Verify the signature of the new packageVerified jinstall-ex-2200-14.1X53-D44.3-domestic.tgz signed by PackageProductionRSA_2017WARNING: A reboot is required to install the softwareWARNING:     Use the 'request system reboot' command immediately

`request system reboot all-members` (in case of VC)

Before Reboot, make sure you have copy of the running configuration. Once new version is loaded, get the configuration again and do “diff”. Only first line will be different with the new version number. All other lines and line number will be same.

If we want to boot device from backup partition use below command and reboot:

root@test-switch1.example.com> request system software rollbackfpc0:--------------------------------------------------------------------------Junos version '12.3R6.6' will become active at next reboot{master:0}root@test-switch1.example.com>root@test-switch1.example.com> request system rebootReboot the system ? [yes,no] (no) yesShutdown at Thu Jul 27 16:22:56 2017.[pid 1534]{master:0}root@test-switch1.example.com>*** System shutdown message from root@test-switch1.rdu.lulu.com ***System going down in 1 minuteSystem going down in 30 seconds*** FINAL System shutdown message from root@test-switch1.example.com ***System going down IMMEDIATELY

VC: to boot with backup partition:

request system reboot slice alternate all-members

--

--