Configuring Mastership of the Virtual Chassis (CLI Procedure)
You can designate the role (master, backup, or linecard) that a member switch performs within a virtual chassis whether you are using a preprovisioned or a nonprovisioned configuration.
![]() |
Note: A multimember virtual chassis has two Routing Engines, one in the master and the other in the backup. Therefore, we recommend that you always use commit synchronize rather than simply commit to save configuration changes made for a virtual chassis. This ensures that the configuration changes are saved in both Routing Engines. |
- Configuring Mastership Using a Preprovisioned Configuration File
- Configuring Mastership Using a Nonprovisioned Configuration File
Configuring Mastership Using a Preprovisioned Configuration File
To configure mastership using a preprovisioned configuration:
- Note the serial numbers of the switches that you want to function in the master role and backup role.
- Power on only the switch (SWA-0) that you want to function in the master role.
- Edit the configuration to specify the preprovisioned
configuration mode:
[edit virtual-chassis]
user@SWA-0# set preprovisioned
- List the serial numbers of the member switches
that you want to function as master and backup, specifying their role
as routing-engine:
[edit]
user@SWA-0# set virtual-chassis member 0 serial-number abc123 role routing-engine
user@SWA-0# set virtual-chassis member 2 serial-number def456 role routing-engine

Note: You cannot directly modify the mastership priority value when you are using a preprovisioned configuration. The mastership priority values are generated automatically and controlled by the role that is assigned to the member switch in the configuration file. The two routing engines are assigned the same mastership priority value (129). However, the member that was powered on first has higher prioritization according to the master election algorithm. See Understanding How the Master in a Virtual Chassis Is Elected. Only two members can be specified with the routing-engine role.
- List the serial numbers of any other member switches that you want to include in the virtual chassis. You may also specify their role as linecard, if desired.
Configuring Mastership Using a Nonprovisioned Configuration File
To configure mastership of the virtual chassis through a nonprovisioned configuration:
- Power on only the switch that you want to function in the master role (SWA-0).
- Configure the highest possible mastership priority
value (255) for the member that you want to function in the
master role:
[edit virtual-chassis]
user@SWA-0# set member 0 mastership-priority 255 - Configure the same mastership priority value (continue
to edit the virtual chassis configuration on the master) for the member
that you want to be the backup (SWA-1):
[edit virtual-chassis]
user@SWA-0# set member 1 mastership-priority 255
Note: We recommend that the master and backup have the same mastership priority value to prevent toggling back and forth between master and backup status in failover conditions
- Use the default mastership priority value (128) for the remaining member switches or configure the mastership priority to a value that is lower than the value specified for members functioning in the master and backup roles.




