background image
90
Chapter 2
Layer-2 Switching
Spanning-Tree Port States
The ports on a bridge or switch running STP can transition through five
different modes:
Blocking A blocked port won't forward frames; it just listens to BPDUs.
All ports are in blocking state by default when the switch is powered up.
Listening The port listens to BPDUs to make sure no loops occur on the
network before passing data frames.
Learning The switch port listens to BPDUs and learns all the paths in the
switched network. It also learns MAC addresses and builds a filter table
but does not forward frames.
Forwarding The port sends and receives all data on the bridged port.
Disabled A port in the disabled state does not participate in the frame
forwarding or STP. A port in the disabled state is virtually nonoperational.
Switch ports are most often in either the blocking or forwarding state. A
forwarding port is one that has been determined to have the lowest (best)
cost to the root bridge. But when and if the network experiences a topology
change (because of a failed link or because someone adds in a new switch),
you'll find the ports on a switch in listening and learning state.
As I mentioned, blocking ports is a strategy for preventing network loops.
Once a switch determines the best path to the root bridge, then all other
ports will be in blocking mode. Blocked ports can still receive BPDUs; they
just don't send out any frames.
If a switch determines that a blocked port should now be the designated
port, it will go into listening mode and check all BPDUs it receives to make
sure that it won't create a loop once the port goes to forwarding mode.
Convergence
Convergence occurs when bridges and switches have transitioned to either
the forwarding or blocking modes. No data is forwarded during this time.
Before data can be forwarded again, all devices must be updated. Conver-
gence is important to make sure all devices have the same database, but it
does cost you some time: it usually takes 50 seconds to go from blocking to
forwarding mode, and it's not recommended that you change the default
STP timers. (But you can adjust those timers if necessary.) Forward delay
means the time it takes to transition a port from listening to learning mode
or vice versa.
Copyright ©2002 SYBEX, Inc., Alameda, CA
www.sybex.com