Pages

Wednesday, November 20, 2013

Spanning Tree Protocol: Port states and roles


Spanning-Tree Port States
1.            Disabled - The port in this state does not participate in the STP operation (it is shut down).
2.            Blocking (BPDU processing state)- The port does NOT forward any Ethernet frames, does NOT accept any Ethernet frames (discards arriving frames), does NOT learn any MAC addresses. However, the portDOES process BPDU frames received from a neighboring switch. If the port transitions to this state (blocking), it can stay blocked for 20 seconds by default (max_age).
3.            Listening (Loop free technology learning state)- The port in this state CAN send and receive the BPDU frames. However, the port in this state does NOT learn any MAC addresses, and does NOT forward or process incoming frames either. All Ethernet frames are being discarded. The computation of loop free topology takes place in this state. If the port transitions to this state (listening), it can stay in this state for 15 seconds by default (forward_delay).
4.            Learning (MAC addresses learning state)- The port in this state already knows its role (root port or designated port ) in the STP domain. However, the port will not forward any Ethernet frames yet. It will be learning MAC addresses from the frames arriving at the port in order to populate MAC address table. This helps avoid too much flooding when the port transition to the forwarding state. If the port transitions to this state (learning), it can stay in this state for 15 seconds by default (forward_delay).
5.            Forwarding (Frames forwarding state)- The port in this state will forward all Ethernet frames as per switch operation. Also, the port will process all incoming Ethernet frames and will actively learn MAC addresses from the arriving traffic.

Spanning-Tree Port Roles
Root Port (RP) - It is a port on a non-root switch, which is the shortest (the best) path towards the root bridge. Root bridge does NOT have any root ports. (no shortest path to itself ;-))
Designated Port (DP) - It is a port that is in the forwarding state. All ports of the root bridge are designated ports (they are never in a blocking state). BPDU frames our sent out this port.


Non-Designated Port (NDP) or Blocking Port - It is a port that is in a blocking state in the STP topology.


                                                             STP PortFast 

PortFast allows switch ports that connect a host device (such as a printer or 
a workstation), to bypass the usual progression of STP states. Theoretically, 
a port connecting to a host device can never create a switching loop. Thus, 
Port Fast allows the interface to move from a blocking state to a forwarding 
state immediately, eliminating the normal 30 second STP delay. 

To configure PortFast on an interface: 

Switch(config)# int fa0/10 
Switch(config-if)# spanning-tree portfast 

To enable PortFast globally on all interfaces: 

Switch(config)# spanning-tree portfast default 

PortFast should not be enabled on switch ports connecting to another 
hub/switch, as this may result in a loop. Note that PortFast does not disable 
STP on an interface - it merely speeds up the convergence. 

PortFast additionally reduces unnecessary BPDU traffic, as TCN BPDU’s 

will not be sent out for state changes on a PortFast-enabled interface. 

No comments:

Post a Comment