|
Home > Archive > CCNA > August 2001 > Stp
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| Hello
Any one know of a site that explain the Spanning-Tree protocol (STP) Visually .
Thanks | |
| strikeattack 2001-08-11, 3:19 pm |
| Here you go, direct from my notes... I tried to attach m visual attachment, but the picture size was not accepted.
SPT (SPANNING TREE PROTOCOL):
Spanning Tree protocol (IEEE 802.1d); a bridge-to-bridge protocol developed by DEC, and revised by the IEEE 802 committee. Its function is to maintain a loop-free network by recognizing when a loop occurs, and blocking one or more redundant ports. It does this by determining where there are loops in the network and blocking links that are redundant. In this way, it ensures that there will be only one path to every destination, so a bridging loop could never occur. The whole idea is to create a bridged/switched network in which only one active path exists between any pair of LAN segments; this is done dynamically by blocking some interface(s).
NOTE: Spanning tree is enabled by default for every port on the switch.
Spanning Tree Benefits:
· Physically redundant paths in the network are allowed to exist and may be used.
· Multiple paths to the same MAC address confuse bridging logic; Spanning Tree provides only one logical path.
· Loops in the bridges network are avoided.
STP Process:
1. All switches participating in STP gather information on other switches in the network by exchanging a BPDU. (Bridge Protocol Data Unit). BPDUs are sent out every two seconds on every port in order to ensure a stable, loop-free topology. A root bridge is elected and all root bridge interfaces are placed in forwarding state. The Bridge ID and Bridge Priority are the determining factors when deciding root bridges. The root bridge is the reference point that the switches use to determine if loops exist in the network.
2. After the root bridge has been elected, each switch must form an association with the root bridge. It does this by listening to BPDUs as they come in on all ports. Receiving BPDUs on multiple ports indicates that it has a redundant path to the root bridge.
3. A designated switch (parent switch) is selected. This is the switch closest to the root switch through which frames will be forwarded to the root. Each switch has its own upstream designated bridge.
4. As the BPDUs propagate downstream, each switch applies a port cost. The aggregate sum of all the port costs for a BPDU is a path cost. The switch needs to decide a root port, so it looks at path cost, bridge information, and port information. The switch picks the port that is receiving BPDUs with the lowest cost and puts this port into a forwarding state. All other ports are placed into a blocking state. In general, the higher a link’s bandwidth, the lower the cost.
5. The root bridge sends BPDUs regularly per the Hello value and explores the network so that a failure of a device is discovered quickly. The other bridges expect to receive copies of these BPDUs, so that they know nothing has changed. BPDUs contain the hello value, so all switches use the same value.
6. If a bridge does not receive a BPDU before MaxAge time, it begins the process of causing the Spanning Tree protocol to change. One or more bridges decide to change interfaces (forwarding or blocking), depending on the change in the network.
o If a switch detects a topology table change, it will send a topology change BPDU out the root port to the designated bridge.
o The designated bridge receives the BPDU and sends out an acknowledgement to the bridge that initiated the topology change. It also sends a topology change BPDU out its root port, destined for the root bridge or its designated bridge.
o The message travels upstream until the root bridge receives the topology change message, it changes its configuration message to indicate that a topology change is occurring. A topology change forces switches to purge their CAM tables.
Spanning Tree States:
· Blocked; a port in the blocking state does not participate in frame forwarding.
· [20 seconds]
· Listen; a port in the listening state attempts to learn whether there are any other paths to the root bridge. The port can listen to frames, but cannot send data, receive data, or put any information into its CAM table. The port enters the listen state from the blocked state.
· [15 seconds]
· Learn; similar to the listen state, except that the switch can now add information to its CAM table. It is not allowed to send or receive data.
· [15 seconds]
· Forward; a port in the forward state forwards state. A port is not placed into the forwarding state unless there are no redundant links or it has determined that it is the best path to the root bridge. The port enters the forward state from the learning state.
· Disabled; a port in the disabled state does not participate in STP or frame forwarding.
·
· [50 SECOND TOTAL] | |
|
| Thanks a lot, the problem am having is to see how it works visually, could you please email me the pic you have, thx again. | |
| ahpama 2001-08-11, 4:21 pm |
| STP Analogy
Let us say we have a main stream going in one direction. But on the end of it, it splits into two. STP on this sense will come into the rescue by blocking the other stream to pass through and maintain the flow on the other one. ( the split in the network situation is the multiple routing paths). But if the stream that is being allowed by STP fails it will open the previous stream that it blocked. So the water still kept on moving and that is my concrete analogy of STP. I hope this gives you an idea.
ahpama
John 3:16 | |
|
| Thx that was an excellent analogy, I am getting there. Please check out the first diagram on this site :
http://www.jenntel.com/Tutorials/routing/55032.htm#HDR2
and tell me please is it safe to say that the STP will route trafic from network one to network 2 via bridge (switch a), then if this route becomes unavailable then STP will shift to route the traffic through Bridge2 (or Swithch2), and if there are a few more swithches available then cost (and other routing or switching factors) will become a deciding factor for STP. Am I understanding it correctly ? I hope so.
Thanks | |
| lennon57 2001-08-11, 5:30 pm |
| Yes, you are correct in your interpetation of bridging.
Quickly....
The problem you run into with redundant paths (without blocking) is that there will be a delay for one or the other packet. Therefore, you end up with loops. Know that no 2 packets will look the same, so they are reprocessed through the bridge, those new packets are taking up bandwith (although they are actually duplicate packets!)
To avoid this....
Using STP, one bridge blocks and waits. If it see's the other one down, it opens the gate. (Redundant path as in sample)
If the other one comes up (normally in a blocked state) it will stay in that state until the other drops. In theory, no loops will should created. |
|
|
|
|