Juniper EX Switch Virtual Chassis Configuration and JUNOS Upgrade Tutorial

This tutorial will guide you through the processes of configuring a Juniper EX switch virtual chassis and upgrading JUNOS using a USB drive. This is one of the most common tasks in the Juniper networking world.

Environment

  • 2x Juniper EX-2300/3400/4300 switches with 10/40/40Gbps Juniper DAC cables
  • 1 x USB drive with the recommended JUNOS version (Service Request Version) in it. The filesystem format should be FAT32. The JUNOS version should be downloaded from Juniper KB21476. Note: Do not use the newest version.
  • Console cable
  • Virtual Chassis with a non-provisioned configuration file

Virtual Chassis Configuration

Non-Provisioned Configuration File Mode

  1. Check Current VC-Port Configuration

    bash
    show virtual-chassis vc-port
    Note
    If ports are configured with virtual chassis by default, you can use them directly without any additional configuration. This is called the “Non-provisioned config file” mode.
  2. Customize VC Port Configuration

    Use the following command to configure the VC port:

    bash
    request virtual-chassis vc-port set pic-slot x port x

    Replace x with the port number from the output of show chassis hardware.

    Example:

    bash
    request virtual-chassis vc-port set pic-slot 1 port 1
  3. Connect the Cables and Reboot

    Connect the DAC cables between the switches and reboot both switches:

    bash
    request system reboot

    Once both switches come up, they will elect a member as “Master” or “Backup”.

Provisioned Configuration File Mode

On top of the steps listed above for the “non-provisioned configuration file” mode, you can define which member will be the first switch (member 0) and which will be the second (member 1).

  1. Set Up the Configuration

    bash
    set system commit synchronize
    set chassis redundancy graceful-switchover
    set routing-options nonstop-routing
    set protocols layer2-control nonstop-bridging
    set virtual-chassis preprovisioned
    set virtual-chassis no-split-detection
    set virtual-chassis member 0 role routing-engine
    set virtual-chassis member 0 serial-number TA1111111111
    set virtual-chassis member 1 role routing-engine
    set virtual-chassis member 1 serial-number TA2222222222
  2. Check Virtual Chassis Status

    bash
    show virtual-chassis

JUNOS Upgrade via USB Drive

  1. List USB Devices

    bash
    ls /dev/da*
  2. Mount the USB Drive

    Mount the USB drive to the path /mnt. For example, if da1s1 is the USB device name:

    bash
    mount_msdosfs /dev/da1s1 /mnt
  3. Copy the JUNOS Tarball

    Copy the JUNOS tarball file to the local temp folder /var/tmp:

    bash
    cp /mnt/ju…..tgz /var/tmp
  4. Install the Software

    Install the software using the following command:

    bash
    request system software add /var/tmp/ju……tgz no-validation
  5. Reboot the Switches

    Reboot the switches to complete the installation:

    bash
    request system reboot
  6. Clean Up Storage

    Clean up the storage by removing the unused JUNOS tarball file in /var/tmp:

    bash
    request system storage cleanup

Reset Juniper Switch to Factory Default

  1. Load Factory Default Configuration

    bash
    load factory-default
  2. Delete System Commit Factory Settings

    bash
    delete system commit factory-settings
  3. Set Root Authentication

    bash
    set system root-authentication plain-text-password

Remove Virtual Chassis Configuration from Shell

This step is helpful when you want to start from scratch after messing up the virtual chassis configuration. Note that the factory default may not delete the virtual chassis configuration.

  1. Start Shell

    bash
    start shell
  2. Navigate to Virtual Chassis Configuration Directory

    bash
    cd /config/vchassis/
  3. List and Remove Files

    bash
    ls
    rm *


This guide should help you configure a Juniper EX switch virtual chassis and upgrade JUNOS using a USB drive. If you have any questions or run into issues, refer to the provided links for additional support.