Question about the root bridge
Robbo777
Member Posts: 331 ■■■□□□□□□□
in CCNA & CCENT
I had a question about the root bridge, in my topology i have one big switch connected to over 15 machines, the router and connected to another switch that is connected to 2 PC's. It turns out that the small switch was the root bridge for everything in my topology after i looked, but traffic and everything still functioned correctly.
I want to know what was basically going on here and how it worked? Was the little switch just forwarding the traffic BACK out the same link to the big switch so it could forward it to the router in the end? I'm a bit confused here.
I want to know what was basically going on here and how it worked? Was the little switch just forwarding the traffic BACK out the same link to the big switch so it could forward it to the router in the end? I'm a bit confused here.
Comments
-
Segovia Member Posts: 119Technically the root bridge forwards out all ports by default, the problem here is that you only have two switches. In most cases you want to place the root bridge somewhere in the middle of your network so that the paths to other switches is bigger in case of a break. With two switches there is only one place for the traffic to go. By default both switches will have the same priority (MAC address decides the root), so if you want to change it you will have to manually change the type of bridge. IE: spanning-tree vlan 10 root primary
Hope this helpsWGU BS - IT Security ... Enrollment Date 10/15 ... Progress 45/124 CU {36%} -
networker050184 Mod Posts: 11,962 ModWhy do you think it wouldn't work? Traffic flows bidirectional across links. The root doesn't influence that.An expert is a man who has made all the mistakes which can be made.
-
Robbo777 Member Posts: 331 ■■■□□□□□□□Technically the root bridge forwards out all ports by default, the problem here is that you only have two switches. In most cases you want to place the root bridge somewhere in the middle of your network so that the paths to other switches is bigger in case of a break. With two switches there is only one place for the traffic to go. By default both switches will have the same priority (MAC address decides the root), so if you want to change it you will have to manually change the type of bridge. IE: spanning-tree vlan 10 root primary
Hope this helps
I did change the big one to the root switch and everything runs fine now i just wondered how the traffic flowed here, did it go to the root bridge as well as the default gateway of the router connected to the big switch that wasn't the root bridge? Or did the big switch just forward it to the router straight away because it has R1 mac address in its table anyway? Because the smaller switch that was the root bridge because it had a lower MAC address was not connected to the router at all. So i was wondering how the traffic worked?
Also, all the switches in any topology "aim" the traffic at the root bridge don't they, so basically i was wondering if that was going on here or it just got bypassed and sent to the router. -
Segovia Member Posts: 119I think I see what you are saying. The computer sending traffic to its default gateway would travel to its switch and then if it knew the destination MAC it would forward it to that port. The reason for having root bridges is for broadcasts. If your computer has to make an ARP broadcast then it would traverse both switches. (But only to the ports on the same VLAN)
So unless you are sending broadcasts, the traffic is not constantly looping between switches just because the other is set to the rootWGU BS - IT Security ... Enrollment Date 10/15 ... Progress 45/124 CU {36%} -
shortstop20 Member Posts: 161 ■■■□□□□□□□Keep in mind, all data does not necessarily flow thru the root bridge, that's not the point of STP. The root bridge is a means for other switches to calculate their lowest cost path to the root bridge. The root bridge is typically placed at the aggregation point of your network, in the core for a smaller network as an example so that it provides the best paths of data flow.
Your end node would have made an ARP request for it's default gateway and created a frame and sent it onto the network. The switches then use their CAM table to decide what port(s) to forward the traffic on.CCNA Security - 6/11/2018
CCNP TShoot - 3/7/2018
CCNP Route - 1/31/2018
CCNP Switch - 12/10/2015
CCNA R/S - 1/14/2015 -
TWX Member Posts: 275 ■■■□□□□□□□All the root bridge does is serve to build the tree structure. Once the tree structure is created, you simply pretend that the blocked or discarding links don't exist. Consider the following physical network:
There are redundant links between several IDFs. Spanning-tree will resolve these redundant links. The methods by which Spanning-tree does this isn't relevant to how Layer 2 frame forwarding. Let's assume that Spanning-tree has come to the following arrangement for its root, designated, and blocking ports:
The switches with the greater cost to the root bridge are the ones obligated to make the decision to block. They are then obligated to block their worse paths. Effectively that means that the entire link is down when one end blocks:
Ultimately this acts as if the blocked link doesn't exist, as far as Layer 2 is concerned. This means that the converged topology looks like this:
Spanning-tree down links are not relevant to the L2 network. The switches now forward and flood frames according to traditional Ethernet protocol.
I suppose it's accurate to think of Spanning Tree as a Layer 2 protocol whose job is to manage the Layer 1 topology, to remove Layer 1 links that will cause Layer 2 problems if they're left up, but at the same time, to allow those links to be used if link failures occur. -
TWX Member Posts: 275 ■■■□□□□□□□Forgot to add... notice on the diagrams once the network is converged I've stopped noting the root bridge. That's because the root bridge's importance is limited to the function of spanning-tree. Once the topology is set, it doesn't matter where the root bridge is, the root bridge and other spanning-tree priority information's sole job is to build/prune that topology before L2 frame forwarding can occur.
-
Segovia Member Posts: 119TWX, thank you for elaborating on this. I do have one question: Are all the interfaces on the root bridge always set to designated?WGU BS - IT Security ... Enrollment Date 10/15 ... Progress 45/124 CU {36%}
-
TWX Member Posts: 275 ■■■□□□□□□□TWX, thank you for elaborating on this. I do have one question: Are all the interfaces on the root bridge always set to designated?
The simple answer is yes.
The complex answer is that it depends on if an interface is participating in spanning-tree or not, and how the priority is set for each VLAN if multiple VLANs are in use.
Access interfaces might be effectively taken out of spanning-tree depending on how they're configured and it's even possible to take trunk interfaces out of spanning-tree with bpdufilter.
L3-capable bridges/switches with routed ports also won't participate in spanning-tree. Note on the diagram the link between the router and the L3 switch that is acting as root bridge.
If several VLANs are in use and if the switches are left in a Cisco-proprietary per-VLAN spanning tree mode or in an IEEE Multiple Spanning Tree mode, different switches can be the root bridge for different VLANs. This can be used to balance links such that links that are inactive in one VLAN are active for other VLANs. This allows links that would have been idle to be used, making it easier to justify the installation cost of the pathway. -
volfkhat Member Posts: 1,072 ■■■■■■■■□□I suppose it's accurate to think of Spanning Tree as a Layer 2 protocol whose job is to manage the Layer 1 topology, to remove Layer 1 links that will cause Layer 2 problems if they're left up, but at the same time, to allow those links to be used if link failures occur.
wow... GREAT insight :]