Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Understanding How the Primary in a Virtual Chassis Is Elected

All switches that are interconnected in a Virtual Chassis configuration are member switches of that Virtual Chassis. Each Virtual Chassis configuration has one member that functions as the primary in a Routing Engine role and controls the Virtual Chassis configuration. A second member functions as the backup in the Routing Engine role, and takes control if the primary fails.

When a Virtual Chassis configuration boots, it automatically runs a primary-role election algorithm to determine which member switch assumes the primary role. A Virtual Chassis also applies the same algorithm to choose a new primary or backup member if the member in either role fails.

The first factor the Virtual Chassis considers when choosing the primary member is the primary-role priority. On all members, the primary-role priority value is 128 by default. That value can change based on how you provision the Virtual Chassis, as follows:

  • In a nonprovisioned Virtual Chassis, you can manually assign primary-role priority values from 0 to 255. A member with primary-role priority 0 will never be elected as primary (or backup), and always stays in the linecard role. In this way, you configure higher primary-role priority values to specify which members can take on the primary (or backup) role.

  • In a preprovisioned Virtual Chassis, you can't manually set the primary-role priority on any members. Instead, you assign the Routing Engine role to two member switches. The Virtual Chassis automatically changes the default primary-role priority (128) to 129 on those two members. Then the Virtual Chassis assigns the primary operate in the linecard role by default (you can also explicitly configure them with that role). The Virtual Chassis will never elect a linecard role member as a primary or backup member.

The primary-role election algorithm compares the Virtual Chassis members against the following criteria, in the order listed, until only one member remains under consideration. That member becomes the primary:

  1. Choose the member with the highest primary-role priority.

  2. Choose the member that was the primary the last time you rebooted the Virtual Chassis.

  3. Choose the member that has been in the Virtual Chassis configuration for the longest period of time. (The member switches under consideration must have more than 1 minute between power-up times for this condition to make a difference.)

  4. Choose the member with the lowest MAC address.

The primary-role election algorithm does not consider the different switch models or platforms in the Virtual Chassis. For some Virtual Chassis that can contain different types of switches, we require or recommend you configure certain switches in the primary and backup Routing Engine roles. See Understanding Mixed EX Series and QFX Series Virtual Chassis for details on the types of switches that can be mixed in a Virtual Chassis and which switches can or must be the primary or backup members.

To make sure a specific member is elected as the primary:

  1. Power on only the switch that you want to be the primary in the Virtual Chassis.

  2. (For a non-provisioned Virtual Chassis) Manually configure the primary-role priorities as follows:

    1. Configure the highest possible primary-role priority value (255) on the member from the first step.

    2. On the same member, which is now the primary, configure priority values on the other members. (For example, use the same value or next-highest value on the member you want to be the backup, and lower values on the other members.)

  3. (For a preprovisioned Virtual Chassis) Configure the Routing Engine role on the two members that you want to act as the primary and backup members. (You can also explicitly configure the remaining members into the linecard role.)

  4. Power on the other members.

You usually want to assign the same (highest) primary-role priority value to the members you want to be the primary and backup Routing Engine members to ensure reliable graceful Routing Engine switchover (GRES) operation. For either non-provisioned or preprovisioned Virtual Chassis, the other election considerations also help keep the primary role from switching back and forth rapidly between the two Routing Engine members under failover conditions.

For more information on configuring a Virtual Chassis, see Configuring an EX3300 Virtual Chassis (CLI Procedure), Configuring an EX4200, EX4500, or EX4550 Virtual Chassis (CLI Procedure), Configuring an EX2300, EX3400, or EX4300 Virtual Chassis, or Configuring an EX4650 or a QFX Series Virtual Chassis.