cisco Catalyst 2960 — Spanning-Tree Topology and Bridge Protocol Data Units

can exist between any two stations. Multiple active paths among end stations cause loops in the network. If a loop exists in the network, end stations might receive duplicate messages. Devices might also learn end-station MAC addresses on multiple Layer 2 interfaces. These conditions result in an unstable network. Spanning-tree operation is transparent to end stations, which cannot detect whether they are connected to a single LAN segment or a switched LAN of multiple segments. The STP uses a spanning-tree algorithm to select one device of a redundantly connected network as the root of the spanning tree.

The algorithm calculates the best loop-free path through a switched Layer 2 network by assigning a role to each port based on the role of the port in the active topology: • Root—A forwarding port elected for the spanning-tree topology • Designated—A forwarding port elected for every switched LAN segment • Alternate—A blocked port providing an alternate path to the root bridge in the spanning tree • Backup—A blocked port in a loopback configuration The device that has all of its ports as the designated role or as the backup role is the root device. The device that has at least one of its ports in the designated role is called the designated device.

Spanning tree forces redundant data paths into a standby (blocked) state. If a network segment in the spanning tree fails and a redundant path exists, the spanning-tree algorithm recalculates the spanning-tree topology and activates the standby path. Devices send and receive spanning-tree frames, called bridge protocol data units (BPDUs), at regular intervals. The devices do not forward these frames but use them to construct a loop-free path. BPDUs contain information about the sending device and its ports, including device and MAC addresses, device priority, port priority, and path cost.

Spanning tree uses this information to elect the root device and root port for the switched network and the root port and designated port for each switched segment. When two ports on a device are part of a loop, the spanning-tree and path cost settings control which port is put in the forwarding state and which is put in the blocking state. The spanning-tree port priority value represents the location of a port in the network topology and how well it is located to pass traffic. The path cost value represents the media speed. The short path cost method is the default STP path cost method used. Note In addition to STP, the device uses keepalive messages to detect loops.

By default, keepalive is enabled on Layer 2 ports. To disable keepalive, use the no keepalive command in interface configuration mode. Note Spanning-Tree Topology and Bridge Protocol Data Units The stable, active spanning-tree topology of a switched network is controlled by these elements: • The unique bridge ID (device priority and MAC address) associated with each VLAN on each device. In a switch stack, all switches use the same bridge ID for a given spanning-tree instance. • The spanning-tree path cost to the root device. • The port identifier (port priority and MAC address) associated with each Layer 2 interface.

Configuring Spanning Tree Protocol Spanning-Tree Topology and Bridge Protocol Data Units Configuring Spanning Tree Protocol 2