Three important parameters the bridge identifiers, port priorities, and path costs influence how STP will shape the switched network by blocking on some ports and forwarding on others. STP guarantees only a loop-free environment; it does not guarantee an optimal configuration. Because of this, it's sometimes necessary to configure certain parameters on some of the bridges and/or switches in a data network. Table 4.1 contains some important terms used by STP. Table 4.1. Important STP TermsTerm | Description |
---|
Bridge Identifiers | Each bridge has a unique identifier that it uses when it multicasts its BPDUs. The identifier is made up of a bridge (switch) priority and one of the switch's MAC addresses. | Path Costs | Each port has an associated cost, which is usually the inverse of the actual bandwidth of the port. When you're choosing ports to place into forwarding mode, lower accumulated port costs of the paths to the root switch are preferred. | Port Priority | Each port has a default priority. If two paths exist to a destination and the accumulated port path costs are the same, the port that has the higher priority is preferred the lower the value, the higher the priority. If both priorities are the same, the lower-numbered port is chosen on the bridge. | BPDU | The BPDU is a multicast frame that bridges periodically generate to share topology information and to elect a root switch to build a spanning tree and to prune off redundant links, as shown in Figure 4.2. | Figure 4.2. BPDU format.
A BPDU frame type is used by IEEE's 802.1D bridge management protocol for STP. It is used to share information about the topology of the network among the other switches. Table 4.2 displays the fields contained in the BPDU frame. Table 4.2. BPDU Frame ContentsTerm | Description |
---|
Protocol Identifier | Contains the value zero. | Version | Contains the value zero. | Message Type | Contains the value zero. | Flags | Signifies one of two events: either topology changes or acknowledgments to topology changes. | Root Identifier | Defines the switch that's at the top of the spanning tree. | Root Path Cost | Defines the cost from the advertising switch to the root switch in the network. | Bridge (Switch) Identifier | Identifies the switch that generated the BPDU and is used by the algorithm to build a spanning tree. | Port Identifier | Defines from which port this BPDU message left the switch. This is used by other switches to detect and remove loops in a data network. | Message Age | Defines the last time the root switch advertised a BPDU message on which the current network configuration is based. | Maximum Age | Defines the age at which the protocol will remove the information from its database and initiate a topology change by rerunning the spanning tree algorithm. This parameter allows all switches to age uniformly and to rerun the STP in parallel. | Hello Time | Contains the interval in which a switch advertises BPDUs. | Forward Delay | Specifies the length of time a port will remain in a port state. This will be discussed in the "Port States" section later in the chapter. | The switch that becomes the root will determine the values of Message Age, Maximum Age, Hello Time, and Forward Delay for all the switches in the network. In other words, after the root is elected and is sending out its multicast BPDUs, the other switches in the network will take the timers in the root's BPDU messages and change their own internal STP parameters to match the root's. |