Tuesday, September 28, 2004

Spantree and portfast

In a nutshell, enabling spantree portfast on a given port tells thatport to bypass the spanning tree algorithm altogether and drop directly toforwarding packets, it will never use any of the other stages. So no, itwill not go to blocking, and hence is a prime candidate for a bridgingloop should another bridge be connected (and there already be another pathbetween the two devices). Hence the warning that is displayed when youenable portfast on a port.I don't think you're correct here.portfast does not disable STP completely,it only makes a port transition into the forwardingstate without delays.If you disable spanning tree, the ports will come up without any delaycaused by spanning tree. There are other delays like pagp.
But than someone can put a crosover cable into two Ports on this switchand your complete switch cloud will go down. Spanning tree was inventedto prevent such problems.

Spanning-Tree is the 802.1d standard for avoiding loops in a switched network. If someone plugs in cables causing a physical loop in your network spanning-tree will detect it and shut it down. It does this by having switches send messages to each other. These messages are called Bridge Protocol Data Units. When a switch detects a connection that has created a loop in the network it will put that port in a blocking state effectively breaking the loop.


Creating a loop on purpose can help you make fail-over redundant links. If one link goes down the alternate path will automatically be unblocked restoring connectivity. I actually used this once when I had to relocate fiber patch panels in the main data center of my facility. I had a fiber loop between my remote data closets as well as fiber run directly to the data center from each closet. I connected the closets together after setting the spanning-tree priority on the last fiber connection completing the loop. I set the priority so it was lower priority than the direct links up. This way as I disconnected each direct path to relocate the fiber patch panels over to the new rack an alternate path for traffic turned up automatically then back down when reconnected. However this redundancy design is a more advanced topic than our time allows.


There is a downside to having spanning-tree enabled on all switch ports. By default this is enabled on all Cisco switches.


Spanning tree has to recalculate the network tree and adjust every time a port becomes active on a switch with spanning tree enabled.


When a port becomes active spanning-tree will place the switch port into Listening state, then learning state and finally forwarding state. It is not until the forwarding state that network traffic will flow through the port. If you watch a switch and see it go amber for several seconds before going to green and allowing traffic then this port likely has spanning-tree turned on. It takes default 15 seconds to go from listening to learning states. It also takes default 15 seconds to go from learning to forwarding state.


This means it can take 30 seconds for a switch port to let your client pc start sending and receiving network traffic. This can cause havock with windows P Cs? that use DHCP.


You can recognize this issue by noting that your windows pc gets one of the temporary 169.X.X.X Ips. Then you find shortly after you can renew your IP in DHCP and get a proper IP from your network’s dhcp server.


You can fix this by setting each client port into what is known as spanning-tree portfast mode.

0 Comments:

Post a Comment

<< Home