JunOS : HowTO upgrade software on Juniper EX/QFX/MX series

By | April 18, 2018

Here is a step-by-step procedure how to upgrade the JunOS image on your Juniper EX, QFX or MX device.

You may get the JunOS software from the vendor, creating an account and adding your device serial number to it in order to access the software download. It is very important that you use the right image for the right device series, otherwise your device may not boot properly.

This example assume that you will temporary store your downloaded JunOS image on a USB memory, formatted as FAT/MSDOS. It may be SFTP to the switch filesystem as well.

0. If your device was previously used or configured and need to reset to factory, use the following command (else go to step 2, followed by step 7) :

request system zeroize

1. Login to the switch using “root” username (no password will be required).

2. Enter into configuration mode using the following commands :


3. Disable the automatic image upgrade feature using the following command :

delete chassis auto-image-upgrade

4. Set the root system password using the following command :

set system root-authentication plain-text-password

5. Commit the change to the running system and write to memory (synchronize statement is only useful with virtual chassis configuration and may be omitted on standalone device) :

commit synchronize

6. Return to the OS level prompt :


7. Insert the USB memory at the back of the switch aside the RJ-45 console port.

8. Mount the USB memory :

mkdir /tmp/usb
mount -t msdosfs /dev/da1s1 /tmp/usb/

8.1. Copy the JunOS image to a temporary location on the filesystem (replace source path/package name with yours) :

cp /tmp/usb/ex4300/jinstall-ex-4300-14.1X53-D45.3-domestic-signed.tgz /var/tmp/

8.2. Unmount the USB memory :

umount /tmp/usb/

9. Verify that the system date and time are accurate :


9.1. If the date and time are not current, set them using the following command :


9.2. Example assuming we would be on November 2nd, 2017 at 3:45 PM :

date 201711020345.00

10. Go to the JunOS folder that contain the software package and enter in cli mode :

cd /var/tmp/

11. Initiate the JunOS upgrade sequence (replace the package name with yours) :

request system software add jinstall-ex-4300-14.1X53-D45.3-domestic-signed.tgz no-validate no-copy

[This will take a while, between 1:30 to 2 minutes, on EX4300, may be longer or faster depending on your hardware serie]

11.1. Passed that point, the system will inform you that a reboot is required in order to apply the software, if this is not the case, please review your sequence. Else, issue the following command to reboot and apply the software upgrade :

request system reboot

[This step will take about 8 minutes (on EX4300) to complete, do not remove the USB memory or unplug the device from sector under any circumstances until the device has completely booted to the new system]

From that point, the switch should boot on your new version of JunOS. The following steps are optional, only to configure the out-of-band interface in order to access it from the network.

12. Disable the DHCP listner on the OOB virtual interface :

delete interfaces vme unit 0 family inet dhcp

13. Login to the system and configure the Out-Of-Band (OOB) interface with the specified IP address (replace with yours, the OOB interface name may vary depending on your model, such as me0 or fxp0. The vme interface is the virtual management interface on virtual chassis stacks) :

set interfaces vme unit 0 family inet address

13.1. Configure the default route for the OOB interface (adjust with your IP/environment) :

set routing-options rib inet.0 static route qualified-next-hop preference 251
set routing-options rib inet.0 static route qualified-next-hop interface vme.0

14. Configure the Fully Qualified Domain Name (FQDN) :

set system host-name SWITCH-NAME
set system domain-name domain.tld

15. Commit the change (the “synchronize statement is only useful on virtual chassis and may be omitted on single unit) :

commit synchronize comment "oob int config"

You are all set. If you need to shutdown the system, see the following command :

16. Graceful shutdown the system :

request system halt

[The system will take about 1:15 minute to shutdown]

17. You may pull the plug when you will see the following message :

[The operating system has halted. Please press any key to reboot.]
NOTE : Do not leave this step unsupervised, the system will automatically reboot if no action is taken at this point.