High Availability · Topic 2 of 5
Virtual Chassis
Learn how an EX virtual chassis joins switches into one device: master, backup and linecard roles, election by priority, VC ports and verification.
- 6 min
- A virtual chassis presents up to 10 EX members as one switch with one management address.
- Roles: master, backup, linecard. The master and backup are the two Routing Engines.
- Election: highest mastership priority (default 128, range 0 to 255), then previous master, then longest member, then lowest MAC.
What it is
A virtual chassis connects several EX Series switches so they act as one logical switch with one management address and one configuration. Up to 10 members can join on most EX models. The members are linked by special virtual chassis ports (VC ports), which can be dedicated ports or ordinary uplink ports converted to VC ports.
The benefits are simpler management, and redundancy: if the master switch fails, the backup takes over. Links to a virtual chassis can also form a LAG that spans several members.
How it works
Roles
Each member has one of three roles.
| Role | Function |
|---|---|
| Master (primary) | Runs the control plane for the whole virtual chassis, holds the active configuration and manages all members |
| Backup | Stays in sync with the master and takes over if it fails |
| Linecard | Forwards traffic only; takes no part in control plane decisions |
The master and the backup are the two Routing Engine members. Every other member is a linecard. All members forward traffic in the data plane, so a linecard is not idle.
A member is identified by a member ID, which is part of its interface names. Interface ge-2/0/5 is port 5 on member 2.
Master election
The members elect the master with a fixed set of rules. The first rule that separates the candidates decides.
| Order | Rule |
|---|---|
| 1 | Highest mastership priority (0 to 255; default is 128) |
| 2 | The member that was master before |
| 3 | The member that has been in the virtual chassis longest |
| 4 | Lowest MAC address |
The second best priority becomes the backup. Set the intended master and backup to the highest value, 255, and keep the rest at the default. A value of 0 means the member can never become master or backup, so it is always a linecard.
Do not leave all members at the default 128. The election then falls back to uptime or MAC address, and a bad choice can become master after a reboot. Set priority 255 on the two Routing Engine members.
Members exchange control information using the Virtual Chassis Control Protocol (VCCP), a link state protocol similar to IS-IS. A ring of connections between members gives a backup path if one VC link fails.
Adding members
There are two ways to build a virtual chassis.
| Method | How it works |
|---|---|
| Non-provisioned (default) | Members join automatically when cabled, and the election chooses the roles |
| Preprovisioned | You list each member by serial number and assign its role; only listed switches can join |
Preprovisioned is the safe choice for production, because the roles are fixed and an unknown switch cannot join.
user@switch# set virtual-chassis preprovisioned
user@switch# set virtual-chassis member 0 serial-number ABC123456789 role routing-engine
user@switch# set virtual-chassis member 1 serial-number DEF987654321 role routing-engine
user@switch# set virtual-chassis member 2 serial-number GHI111222333 role line-card
user@switch# commit
With the default non-provisioned mode, set the priorities instead:
user@switch# set virtual-chassis member 0 mastership-priority 255
user@switch# set virtual-chassis member 1 mastership-priority 255
In preprovisioned mode, only members with the routing-engine role can become master or backup, and a line-card member never does. The role sets the priority: 129 for routing-engine and 0 for line-card.
Converting a port to a VC port
On models where uplink ports can serve as VC ports, convert them from operational mode. The request is applied on the member, and the port then carries VCCP.
user@switch> request virtual-chassis vc-port set pic-slot 1 port 0
user@switch> request virtual-chassis vc-port delete pic-slot 1 port 0
The first command makes the port a VC port, the second returns it to a normal network port. Which ports can be converted depends on the switch model, so do not assume it for every port.
GRES and NSB in a virtual chassis
When the backup is promoted, the virtual chassis keeps forwarding if graceful Routing Engine switchover is enabled. For fast, nondisruptive failover, enable GRES and NSB on the virtual chassis. The next page covers them. Without them, the control plane restarts on the new master and protocols reconverge.
Verification
user@switch> show virtual-chassis
Preprovisioned Virtual Chassis
Virtual Chassis ID: 0123.4567.89ab
Mstr Mixed Route Neighbor List
Member ID Status Serial No Model prio Role Mode Mode ID Interface
0 (FPC 0) Prsnt ABC123456789 ex4300-48t 129 Master* N VC 1 vcp-255/1/0
2 vcp-255/1/1
1 (FPC 1) Prsnt DEF987654321 ex4300-48t 129 Backup N VC 0 vcp-255/1/0
2 vcp-255/1/1
2 (FPC 2) Prsnt GHI111222333 ex4300-48t 0 Linecard N VC 0 vcp-255/1/1
1 vcp-255/1/0
Read the columns this way: Status Prsnt means the member is online, Mstr prio is the mastership priority, Role shows Master, Backup or Linecard (the asterisk marks the member you are on), and the neighbor list shows which VC ports lead to which members. A NotPrsnt status means a provisioned member is not connected.
| Command | Use |
|---|---|
show virtual-chassis | Members, roles, priorities and neighbors |
show virtual-chassis vc-port | Status of each VC port: up, down, and the speed |
Failure handling
When the master fails, the backup becomes master, and a linecard is elected as the new backup if one exists. A cut in the VC cabling can split the virtual chassis into two parts. Split detection stops both halves from running as master with the same addresses. It is on by default. In a two-member virtual chassis, set virtual-chassis no-split-detection turns it off so the remaining member keeps working if the other fails, at the risk of two masters if the VC link breaks.
Common mistakes
Leaving default priorities. The election then depends on uptime or MAC address.
What to remember for the exam
- A virtual chassis presents up to 10 EX members as one switch with one management address.
- Roles: master, backup, linecard. The master and backup are the two Routing Engines.
- Election: highest mastership priority (default 128, range 0 to 255), then previous master, then longest member, then lowest MAC.
- Priority 0 means the member never becomes master or backup.
- Preprovisioned mode binds roles to serial numbers.
- VCCP, a link state protocol, runs between members over VC ports.
show virtual-chassisshows roles and status;Prsntis online.- GRES and NSB give nondisruptive failover; split detection is on by default.
Check yourself
Three switches have mastership priority 128, 255 and 255, and one is already master. Which become master and backup?
The two switches with priority 255 are the Routing Engines; between them, the current master stays master and the other is the backup.
What does priority 0 do?
The member can never become master or backup, so it is always a linecard.
What does
request virtual-chassis vc-port set pic-slot 1 port 0do?It converts that uplink port into a VC port so it can connect members.
Topic 2 of 5 in High Availability
Test yourself on High Availability
The full Juniper JNCIS-ENT JN0-352 question bank has 846 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Juniper. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.