160
Chapter 4
Layer 2 Switching and the Spanning Tree Protocol (STP)
To determine the port that will be used to communicate with the root
bridge, the path cost is determined. The STP cost is an accumulated total
path cost based on the bandwidth of the links. Table 4.3 shows the typical
costs associated with the different Ethernet networks.
The IEEE 802.1d specification has recently been revised to handle the new
higher-speed links, hence the different costs shown in Table 4.3.
Once the cost is determined for all links to the root bridge, the switch will
decide which port has the lowest cost. The lowest cost port is put into for-
warding, and the other ports are placed in blocking mode. If there are equal-
cost paths, the port with the lowest port ID will be put into the forwarding
state.
Spanning Tree Port States
The ports on a bridge or switch running the STP can transition through four
different states:
Blocking Won't forward frames; listens to BPDU. All ports are in block-
ing state by default when the switch is powered on.
Listening Listens to BPDUs to make sure no loops occur on the network
before passing data frames.
Learning Learns MAC addresses and builds a filter table, but does not
forward frames.
Forwarding Bridge port is able to send and receive data. A port will
never be placed in forwarding state unless there are no redundant links or
the port determines that it has the best path to the root bridge.
T A B L E 4 . 3
STP Link Cost
Speed
New IEEE Cost
Original IEEE Cost
10Gbps
2
1
1Gbps
4
1
100Mbps
19
10
10Mbps
100
100
Copyright ©2000 SYBEX , Inc., Alameda, CA
www.sybex.com