Configuring a Virtual Chassis under Junos

Configuring a Virtual Chassis under Junos
Jérémie Kassianoff
December 15, 2014
6 min read

Discover Juniper Network's virtual chassis technology. Get hands-on with the solution using EX4200 and 3300 switches!

Certified inJunos Associate (JNCIA-Junos)

Real-world use case

You want to pool two Juniper switches into a single logical device: discover how to configure a virtual chassis under Junos.

Juniper Network's virtual chassis technology:

Virtual chassis technology lets you interconnect devices and manage them as a single logical device. The control plane (JunOS) distributes the same information to all the other switches. So the logical entity called Virtual chassis has the same information "as if it were a single physical entity" (source: SILICON.FR).

More information about Juniper's virtual chassis at the following address: understanding the virtual chassis.

Hardware prerequisites:

We're going to configure two chassis; in my case I have the following physical hardware available:

To create an EX4200 virtual chassis

  • Three dedicated VCP cables (to connect the EX4200 switches).
  • One switch: EX4200-24px.
  • Two switches: EX4200-24t.

To create an EX3300 virtual chassis

In this case, we have two different interconnection scenarios for our virtual chassis:

  • Connection via dedicated cables (VCPs).
  • Connection via the front-panel SFP+ ports.

The cabling method and virtual chassis configuration

Virtual chassis with 3x EX4200 (master/backup/linecard)

On the back of the switch panels (SW0/SW1/SW2), you have two VCP ports: 0 and 1, and we'll connect them to each other:

  1. SW0 port vcp 0 to port vcp 1 on SW1.
  2. SW0 port vcp 1 to port vcp 0 on SW2.
  3. SW1 port vcp 0 to port vcp 1 on SW2.

Each switch is connected to the next one, while the first and last form a loop.

Let's now display our virtual-chassis configuration in JunOS:

bash
show virtual-chassis vc-port 

fpc0:
--------------------------------------------------------------------------
Interface   Type              Trunk  Status       Speed        Neighbor
or                             ID                 (mbps)       ID  Interface
PIC / Port
vcp-0       Dedicated           2    Up           32000        1   vcp-1  
vcp-1       Dedicated           1    Up           32000        2   vcp-0  

fpc1:
--------------------------------------------------------------------------
Interface   Type              Trunk  Status       Speed        Neighbor
or                             ID                 (mbps)       ID  Interface
PIC / Port
vcp-0       Dedicated           2    Up           32000        2   vcp-1  
vcp-1       Dedicated           1    Up           32000        0   vcp-0  

fpc2:
--------------------------------------------------------------------------
Interface   Type              Trunk  Status       Speed        Neighbor
or                             ID                 (mbps)       ID  Interface
PIC / Port
vcp-0       Dedicated           2    Up           32000        0   vcp-1  
vcp-1       Dedicated           1    Up           32000        1   vcp-0

For a better understanding of the result, head to: show virtual chassis vcp port, and for a master/backup-only configuration, refer to the following article: EX4200 (master/backup).

You'll find other examples here: virtual chassis cabling example (EX4200).

Virtual chassis with 2x EX3300 (master/backup)

On the front of each switch's panel, we'll use the SFP+ DAC cable, note that the ports will then be named XE-0/1/0 through 0/3/0. Note that ports 2 and 3 are configured in the VCP by default on EX3300s.

Additional information: virtual chassis EX3300.

To make sure this is the case:

bash
show virtual-chassis vc-port    

fpc0:
--------------------------------------------------------------------------
Interface   Type              Trunk  Status       Speed        Neighbor
or                             ID                 (mbps)       ID  Interface
PIC / Port
1/2         Configured         -1    Up           10000        1   vcp-255/1/2
1/3         Configured               Absent  

fpc1:
--------------------------------------------------------------------------
Interface   Type              Trunk  Status       Speed        Neighbor
or                             ID                 (mbps)       ID  Interface
PIC / Port
1/2         Configured         -1    Up           10000        0   vcp-255/1/2
1/3         Configured               Absent

As a practical example, we want to drop ports 2 and 3 and only use port 1. Here's how to proceed:

  1. Delete the existing vc-port configuration locally:
    sql
    request virtual-chassis vc-port delete pic-slot 1 port 2
    request virtual-chassis vc-port delete pic-slot 1 port 3
    
  2. Delete the existing vc-port configuration on member 1 (second switch):
    sql
    request virtual-chassis vc-port delete pic-slot 1 port 2 member 1
    request virtual-chassis vc-port delete pic-slot 1 port 3 member 1
    
  3. Add our vc-port configuration on port 0 locally:
    bash
    request virtual-chassis vc-port set pic-slot 1 port 0
    
  4. Add our vc-port configuration on port 0 on member 1 (second switch):
    bash
    request virtual-chassis vc-port set pic-slot 1 port 0 member 1
    
  5. Verifying our virtual chassis:
    bash
    show virtual-chassis vc-port 
    
    fpc0:
    --------------------------------------------------------------------------
    Interface   Type              Trunk  Status       Speed        Neighbor
    or                             ID                 (mbps)       ID  Interface
    PIC / Port
    1/0         Configured         -1    Up           10000        1   vcp-255/1/0
    
    fpc1:
    --------------------------------------------------------------------------
    Interface   Type              Trunk  Status       Speed        Neighbor
    or                             ID                 (mbps)       ID  Interface
    PIC / Port
    1/0         Configured         -1    Up           10000        0   vcp-255/1/0
    

Roles and switch organization within a virtual chassis

Switches can have different roles in a VC, such as:

  1. Master: it's the master and holds the virtual chassis's configuration.
  2. Backup: it's ready to take over the master's role and backs up the VC's configuration.
  3. LineCard: it acts as a relay in case of a failure on the backup switch (a minimum of 3 switches).

More details are available on Juniper's official website at the following address.

Switches can be organized in two modes within a VC:

  1. Preprovisioned: assigned in a set way using its serial number:
    bash
    set virtual-chassis preprovisioned
    set virtual-chassis member 0 serial-number abc123 role routing-engine
    set virtual-chassis member 1 serial-number def456 role routing-engine
    set virtual-chassis member 2 serial-number ghi789 role line-card
    set virtual-chassis no-split-detection #only between two switches#
    
  2. Non-preprovisioned: assigned by the election algorithm using a priority number:
    bash
    set virtual-chassis member 0 mastership-priority 255
    set virtual-chassis member 1 mastership-priority 255
    set virtual-chassis member 2 mastership-priority 0
    

Otherwise, switches are elected by a default algorithm to choose each switch's role within the VC. I recommend method 1.

Several examples:

Management port in a Virtual chassis

Each switch has a management port, and within a VC we can add a fixed management IP to the VC. The interface used is called vme; if the connection with the master is broken, it moves to the newly elected master, and so on.

Here's a configuration example:

bash
set interfaces vme unit 0 family inet address 192.168.254.1/29

To wrap up, I invite you to finish your introduction with Juniper's VC best practices, you now know the basics of the Virtual chassis under JunOS.

Conclusion

Setting up the virtual chassis on EX4200 and EX3300 switches lets you manage several Juniper switches as a single logical entity, in ring topology or master/backup mode. I detailed the cabling, checking the VCP ports, assigning roles (master, backup, linecard), as well as configuring the management interface (vme). This technology greatly simplifies administering a network infrastructure made up of several physical switches.