13 Sept 2023

A Step-by-Step Guide to Upgrading Junos OS on EX Series Switches

Will go through the process of upgrading the Junos version on an EX-Series switch with a Virtual Chassis or a Single Routing Engine using the Command Line Interface (CLI). Specifically, we'll demonstrate this process for an EX3400 series switch, but the steps are applicable to several other EX Series models as well.

This procedure can be used to upgrade the following switches or Virtual Chassis:
EX2200 switch
EX2300 switch
EX3200 switch
EX3300 switch
EX3400 switch
EX4100 switch
EX4200 switch
EX4300 switch
EX4500 switch
EX4550 switch
EX6200 switch (single Routing Engine upgrade only)
EX8200 switch (single Routing Engine upgrade only)
All Virtual Chassis except EX8200 Virtual Chassis

Pre-Task

Before you begin the upgrade process, ensure that you've completed the following pre-task steps:


Download the Firmware: Download the desired Junos OS firmware version from the official Juniper Networks support page and copy it onto a USB stick formatted with FAT32.

Backup Configuration: Take a backup of the device's configuration using the CLI. You can use below commands to back up your configuration.
show configuration | no-more
show configuration | display set | no-more
show configuration | display set | save /var/tmp/CONFIG-dd/mm/yyyy.txt 

Create a Snapshot: Make a snapshot of the existing Junos configuration using show system snapshot and request system snapshot.

Disk Space Validation and Cleanup: Validate the available disk space on the device using show system storage and run request system storage cleanup to free up space if necessary.

Health Check: Perform a health check on the Juniper device by examining SNMP logs, log time settings, hardware status, system status, interface status, route summary, and other relevant parameters. Use the provided CLI commands to gather this information.
#SNMP logs
run show snmp health-monitor alarms | no-more
run show snmp health-monitor logs | no-more
#Log Time
set cli timestamp
set cli screen-width 200
show ntp associations no-resolve | no-more
show ntp status no-resolve | no-more
## Hardware Status
show chassis hardware | no-more
show chassis hardware clei-models | no-more
show chassis hardware detail | no-more
show chassis fpc detail | no-more
show chassis fpc pic-status | no-more
show chassis environment | no-more
show chassis routing-engine | no-more
show version invoke-on all-routing-engines | no-more
## Based on Platform
show chassis fabric reachability | no-more
show chassis fabric fpcs | no-more
show chassis fabric plane | no-more
show chassis fabric plane-location | no-more
show chassis fabric summary | no-more
## System Status
show chassis alarms | no-more
show system alarms | no-more
show system commit | no-more
show system core-dumps | no-more
## Interfaces Status
show arp no-resolve expiration-time | no-more
show interfaces diagnostics optics | no-more
show interfaces redundancy | no-more
show interfaces terse | match “up up” | count | no-more
show interfaces terse | match down | count | no-more
show interfaces terse | match down | no-more
show interfaces descriptions | match up | count | no-more
show interfaces descriptions | match down | count | no-more
show interface terse | no-more
show interfaces extensive | no-more
## Route Summary
show krt queue | no-more
show route summary | no-more
show route forwarding-table summary | no-more
## LACP
show lacp interfaces | no-more
show ppm adjacencies detail | no-more
## BFD
show bfd session detail | no-more
show bfd session extensive | no-more
show ppm adjacencies detail | no-more
## VRRP
show vrrp | no-more
## LDP
show ldp interface | no-more
show ldp neighbor | no-more
show ldp session | no-more
## VLAN and IRB
show vlans |no-more
show interfaces irb terse |no-more
## Storage
show system storage invoke-on all-routing-engines | no-more
## Configuration backup and RSI
show system commit | no-more
show configuration | no-more
show configuration | display set | no-more
request support information | no-more
## SLM/SLC
show log messages | no-more
show log chassisd | no-more

Upgrade Steps


Here is an example of upgrading the Junos on an EX3400 switch to 20.4R3-S4

Step 1: Mounting the USB Stick

1.1. Enter shell mode: start shell.
1.2. Identify USB device: Type ls /dev/da* and press ENTER to list available storage devices. (Do not plug in the USB stick yet.)

Step 2: Plugging in the USB Stick

2.1. Plug in the USB stick.
2.2. Identify USB device: Type ls /dev/da* and press Enter. Note the new folder /dev/da1s1. This represents the USB stick. It may differ, but this is the most common.

Step 3: Creating a Mount Point

3.1. Create a directory for mounting: Type mkdir /var/tmp/usb and press ENTER.
3.2. Mount the USB stick: Type mount_msdosfs /dev/da1s1 /var/tmp/usb and press ENTER.

Step 4: Copying Junos from USB to Mount Point

4.1. Copy the Junos package from the USB stick to the mount point: Type cp /var/tmp/usb/jinstall-ex-2200-12.3R12-S21-domestic-signed.tgz /var/tmp and press ENTER.

Step 5: Verifying MD5 Checksum

5.1. Exit shell mode by cli
5.2. Calculate the MD5 checksum for the copied file: Run the following CLI command: file checksum md5 /var/tmp/jinstall-ex-2200-12.3R12-S21-domestic-signed.tgz. Ensure that the calculated MD5 value matches the MD5 value provided by Juniper.

Step 6: Installing the New Package on the Switch

6.1. Install the new Junos package on the switch: Run the following CLI command: request system software add /var/tmp/jinstall-ex-2200-12.3R12-S21-domestic-signed.tgz.

Step 7: Reloading the Switch

7.1. Reload the switch to apply the changes: Run the following CLI command: request system reboot.


After the reboot, it's essential to verify that the upgrade was successful:

Check the Version: Run the following CLI commands to check the new version:
show version
show system information


In case any issues arise after the upgrade, you can roll back to the previous version:

Run the following CLI command to initiate a rollback:
request system software rollback


14 Jul 2023

Working with Cisco Boot Modes: INSTALL and BUNDLE

Working with Cisco Boot Modes: INSTALL and BUNDLE

Cisco switches can be booted in two different modes: Install mode and Bundle mode. Each mode has its own advantages and disadvantages, so it's important to choose the right mode for your specific needs.

Install Mode

Install mode is the default mode for most modern Cisco switches. It uses a "package provisioning" file named packages.conf to boot the switch. Additionally, there are several .pkg files in the flash that are used. This mode is more memory efficient than Bundle mode, as the packages are not extracted from the bundle and copied to RAM.

Bundle Mode

Bundle mode is the traditional way in which Cisco IOS operates using a single monolithic .bin file. During bootup, this file is "unbundled" and moved into RAM from where it operates. This mode uses more RAM than Install mode, but it is also more flexible, as you can add or remove packages without having to rebuild the entire image.

Restrictions of Each Mode

  • The Install and Bundle modes have some restrictions:Booting from a USB driver or TFTP is not supported because INSTALL mode relies on the packages.conf file, which references several .pkg files stored in the flash memory. Due to this dependency, booting from a USB stick is not possible in INSTALL mode.
  • The memory consumption in Bundle mode is higher than in Install mode. In Bundle mode, the packages are extracted from the bundle and copied to RAM. As a result, the total size of the image increases with each new package, consuming more space in RAM.
  • Auto-upgrade feature is disabled by default and is not available in Bundle mode.


How to Check the Current Mode

You can use the show version command to check the current boot mode of your Cisco switch. The output of this command will show you the mode of the current device.

Here are examples of the show version output for both modes:

For INSTALL Mode:

SWITCH# show version

< TRUNCATED > 

System image file is "flash:/packages.conf"

< TRUNCATED > 

Switch Ports Model              SW Version        SW Image              Mode

------ ----- -----              ----------        ----------            ----

*    1 32    WS-C3850-24T       Denali 16.1.1     CAT3K_CAA-UNIVERSALK9 INSTALL

< TRUNCATED > 


For BUNDLE Mode:

SWITCH# show version

< TRUNCATED > 

System image file is "flash:cat3k_caa-universalk9.BLD_V161_0_THROTTLE_LATEST_20151116_230450.SSA.bin"

< TRUNCATED >

Switch Ports Model              SW Version        SW Image              Mode

------ ----- -----              ----------        ----------            ----

*    1 32    WS-C3850-24T       Denali 16.1.1     CAT3K_CAA-UNIVERSALK9 BUNDLE

< TRUNCATED >


Converting from Install Mode to Bundle Mode

If you need to switch from INSTALL mode to BUNDLE mode, follow these steps:

Step 1: Verify the current mode of operation using the show version command.

Step 2: Check if the .bin file exists in the flash memory using the dir command. If the file is missing, copy the .bin file to the flash before proceeding to the next step.

Step 3: Verify the current boot statement using the show boot command.

Step 4: Remove the current boot statement from the device using the command no boot system in global configuration mode.

Step 5: Add the new boot statement pointing to the .bin file using the command boot system switch all flash:*.bin where *.bin is the image name.

Step 6: Save the configuration using the write mem command, and then reload the device using the reload command.

Step 7: After the reload, verify the new mode using the show version command.


Converting from Bundle Mode to Install Mode

To switch from BUNDLE mode to INSTALL mode, follow these steps:

Step 1: Verify the current mode of operation using the show version command.

Step 2: Check the current boot statement using the show boot command.

Step 3: Expand the Cisco software packages and the provisioning file from a specified bundle (*.bin) to the flash memory using the command request platform software package expand switch 1 file flash:*.bin to flash: retain-source-file auto-copy verbose where *.bin is the image name.

Step 4: Verify if the extracted files are in the flash memory using the dir command. You should see a packages.conf file and several .pkg files in the flash.

Step 5: Remove the current boot statement from the device using the no boot system command in global configuration mode.

Step 6: Add the new boot statement pointing to the packages.conf file using the command boot system switch all flash:packages.conf.

Step 7: Save the configuration using the write mem command, and then reload the device using the reload command.

Step 8: After the reload, verify the new mode using the show version command.


By following these steps, you can easily switch between INSTALL mode and BUNDLE mode on Cisco devices.

A Step-by-Step Guide to Upgrading Junos OS on EX Series Switches

Will go through the process of upgrading the Junos version on an EX-Series switch with a Virtual Chassis or a Single Routing Engine using th...