02-14-2023 04:44 AM
Hi
I wonder if somebody could clarify my understanding of STP.
As I understand:
Sorry if its very basic thanks in advance.
02-14-2023 04:48 AM
Your topology need to re-design
the Root must be the SW connect to router
02-14-2023 04:51 AM
Hi
I attached two images the first was the example topology (how STP configured itself) the second was my suggestion , within my topology the switch connected to the router is the root
Thanks
02-14-2023 04:56 AM - edited 02-14-2023 05:00 AM
sorry to see the second attachment.
yes with new topology it right. root is direct connect to router and both access SW have STP FWD link to Root SW
all point you mention is OK.
02-14-2023 05:17 AM - edited 02-14-2023 05:18 AM
Hello,
In addition to MHM's response, let me go over the individual items you have raised.
STP is used at layer two to prevent loops within the network. It logically disables a link to prevent looping.
This is correct. STP is used in a switched Ethernet network to prevent switching loops.
When the switches are connected BPDU packets are exchanged containing the devices BPDU ID, 32768 + The VLAN ID if its a tie the device with the lowest MAC address is elected as the root bridge.
Let me rephrase this so that it is more precise. This will also clarify the terminology.
In STP, every switch has its unique Bridge Identifier, or BID. The BID consists of three parts: Configurable priority in multiples of 4096 (32768 by default), VLAN ID, and the base MAC address of the switch. When the switches are connected, they exchange STP messages called Bridge Protocol Data Units, or BPDUs, and these BPDUs contain - among other information - the BID of the root switch. Initially, every switch considers itself to be the root bridge, but if it receives a BPDU that claims a lower BID as the root, it will accept the lower BID as the true root switch. Ultimately, after a few iterations, the root bridge will be the switch with the lowest BID in the network. Within a given VLAN, the root switch will be the switch with the lowest priority, and in the case of a tie, the switch with the lowest MAC address.
Best practise is to manually configure the device nearest the router as the root bridge.
Correct. However, note that no matter which switch becomes the root switch, your network will still operate correctly and there will be no loops in it, just the path the traffic is forced to take may not be optimal with regards to some criteria (such as outbound traffic reaching the gateway by the shortest path).
Spanning Tree PVST is the best option available within cisco packet tracer this is Rapid spanning tree per VLAN and expediates the wait time.
I have not played with Packet Tracer with a long time so I do not know what STP variants it supports. However, with real devices, the best choice for pure Cisco-based networks is Rapid PVST+ (RPVST+ or PVRST+) which is essentially Rapid STP run on a per-VLAN basis.
Please feel welcome to ask further!
Best regards,
Peter
02-14-2023 05:21 AM
Thanks Peter that's really helpful.
Do you know where I could access a cisco 'white paper' that contains the best practises, I have found alot of configuration guides but noting that actually suggest the best practise.
Thanks
02-14-2023 05:27 AM - edited 02-14-2023 06:05 AM
there is no best practises
Each case need different config
here you use triangle other use rectangular design
here you prefer R-PVST other prefer MST because it simple and light for CPU
so you need to study all STP mode and all relate notes.
02-14-2023 10:36 AM
What follows will overlap with the great explanation Peter already provided, but, hopefully, some additional useful factoids. ; )
"STP is used at layer two to prevent loops within the network. It logically disables a link to prevent looping."
Yup. Although Peter describes STP for switched Ethernet networks, it actually comes from bridged Ethernet networks. As a switch is a multi-port bridge, why mention this? Well, it explains where the B in BPDU comes from.
"Best practise is to manually configure the device nearest the router as the root bridge. (Example topology attached of 3 switches automatically configure by STP and one image of what I think is the best practise manually configure)"
That's an it depends.
Often you do want a LAN segment's gateway router(s) close or even connected to the root bridge, as the root bridge is often the chosen to be the physical "center" of the network, i.e. least amounts of hops between it and any other bridge.
In your attachments, note how your bridge is just one hop from your other two bridges, but your two leaf bridges are two hops from each other in both cases.
However, as bridges can use different media types, perhaps the shortest path, in hops, uses 10 Mbps, while a slightly longer path, in hops, uses 100 Mbps. Should your root selection, be adjusted for that? (At least for Cisco's STP, probably not, as links costs [based on bandwidth] can be used too, I recall.)
"Spanning Tree PVST is the best option available within cisco packet tracer this is Rapid spanning tree per VLAN and expediates the wait time."
If rapid-PVSTP support, yes, generally rapid variant always a better option, regardless PT or real-world.
BTW, PVST is Cisco proprietary. Standard STP is not per VLAN.
Standard rapid-STP is much better than standard STP. Likewise Cisco's rapid-STP is much better than its PVSTP. (BTW, rapid STP variants use many proprietary options Cisco defined for its PVSTP; a couple, though, I believe still unique to Cisco's rapid-PVSTP.)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide