Thursday, August 29, 2019

Electing a Root Bridge


Electing a Root Bridge

For all switches in a network to agree on a loop-free topology, a common frame of reference must exist to use as a guide. This reference point is called the root bridge.

An election process among all connected switches chooses the root bridge. Each switch has a unique bridge ID that identifies it to other switches. The bridge ID is an 8-byte value consisting of the following fields:

Bridge Priority (2 bytes ): The priority or weight of a switch in relation to all other switches. The Priority field can have a value of 0 to 65,535 and defaults to 32,768 (or 0x8000) on every Switch.

MAC Address (6 bytes ): The MAC address used by a switch can come from the Supervisor module, the backplane, or a pool of 1024 addresses that are assigned to every supervisor or backplane, depending on the switch model. In any event, this address is hard-coded and unique, and the user cannot change it.

When a switch first powers up, it has a narrow view of its surroundings and assumes that it is the root bridge itself. (This notion probably will change as other switches check in and enter the election process.) The election process then proceeds as follows

1. Every switch begins by sending out BPDUs with a root bridge ID equal to its own bridge ID and a sender bridge ID that is its own bridge ID.

2. The sender bridge ID simply tells other switches who is the actual sender of the BPDU message. After a root bridge is decided on, configuration BPDUs are sent only by the root bridge. All other bridges must forward or relay the BPDUs, adding their own sender bridge IDs to the message.)

3. Received BPDU messages are analyzed to see if a “better” root bridge is being announced. A root bridge is considered better if the root bridge ID value is lower than another. Again, think of the root bridge ID as being broken into Bridge Priority and MAC Address fields. If two bridge priority values are equal, the lower MAC address makes the bridge ID better. When a switch hears of a better root bridge, it replaces its own root bridge ID with the root bridge ID announced in the BPDU. The switch then is required to recommend or advertise the new root bridge ID in its own BPDU messages, although it still identifies itself as the sender bridge ID.

4. Sooner or later, the election converges and all switches agree on the notion that one of them is the root bridge. As might be expected, if a new switch with a lower bridge priority powers up, it begins advertising itself as the root bridge. Because the new switch does indeed have a lower bridge ID, all the switches soon reconsider and record it as the new root bridge. This can also happen if the new switch has a bridge priority equal to that of the existing root bridge but has a lower MAC address. Root bridge election is an ongoing process, triggered by root bridge ID changes in the BPDUs every 2 seconds.

As an example, consider the small network shown in Figure 2.3. For simplicity, assume that each switch has a MAC address of all 0s, with the last hex digit equal to the switch label.



Figure 2.3 Example of Root Bridge Election

In this network, each switch has the default bridge priority of 32,768. The switches are interconnected with Gigabit Ethernet links. All three switches try to elect themselves as the root, but all of them have equal bridge priority values. The election outcome produces the root bridge, determined by the lowest MAC address—that of Switch A.


Related Links:

MPLS Benefits

IP Networking Online Exam Simulator

Who needs BGP

BGP and RIP/EIGRP Split-Horizon Rule.

No comments:

Post a Comment

Tables Used in Switching

Tables Used in Switching Catalyst switches maintain several types of tables to be used in the switching process. The tables are tailo...