STP query
alliasneo
Member Posts: 186
in CCNA & CCENT
Hey Everyone, I can calculate a three switch STP design and I know what the root will be etc but I just added a 4th switch to the mix and it didn't block the port I thought it would. I understand that in each segment back to the root a loop will be eliminated but I'm curious from my diagram why the particular port was blocked?
Port Fa0/1 was blocked on switch 127 but the mac for that port is lower than that of fa0/4 on the other switch so I would have thought fa0/4 would be blocking? Same cost going either way so that doesn't matter?
Port Fa0/1 was blocked on switch 127 but the mac for that port is lower than that of fa0/4 on the other switch so I would have thought fa0/4 would be blocking? Same cost going either way so that doesn't matter?
Comments
-
vinbuck Member Posts: 785 ■■■■□□□□□□What version of spanning tree are you running?
Generally speaking, lowest priority (32768 default + mac) is the root and highest priority blocks. Lowest port number breaks any ties and forwards.Cisco was my first networking love, but my "other" router is a Mikrotik... -
mark_s0 Member Posts: 82 ■■■□□□□□□□The designated port on a switch is chosen by the port cost to the root bridge. In this case, both port's would have the same port cost so the decision is based on the bridge ID which is priority+mac address of the switch. Based on your image and assuming the priority has been left default, switch 124's mac address would be lower than the mac address on switch 127 hence why switch 127 port 0/1 is in the blocking state.
The switchport mac address is not used in the designated port decision. -
Roguetadhg Member Posts: 2,489 ■■■■■■■■□□To add to mark_s0's words:
If the winning switch has multiple possible Designated Ports (DP)s the winning interface will be the lowest interface number.
ie: fa0/1 is better than fa0/2.In order to succeed, your desire for success should be greater than your fear of failure.
TE Threads: How to study for the CCENT/CCNA, Introduction to Cisco Exams -
alliasneo Member Posts: 186
i brought up the MAC addresses for both switches. So because the cost to reach the root is the same for both switches it would then go to the priority (which I haven't changed so that's still 32768 for both) then the MAC address for the switch, which in this case Switch 124 is lower than switch 127 therefore lowest wins and the port on 127 is blocked? -
Roguetadhg Member Posts: 2,489 ■■■■■■■■□□Switch124 MAC Address = 0060.70BE.A0A8
Switch127 MAC Address = 00E0.F717.CE31
________________________________
0060.x.x is lower than 00E0.x.x. The (winning switch \ lower-MAC address) switch does not put it's interface on blocking. The winning switch's port is placed on Forwarding as a Designated Port for that segment.
Hex Numbers:
0.1.2.3.4.5.6.7.8.9.A.B.C.D.E.F
|- [Lower]
> [Higher]
In binary Range: (windows calc.)
0000 = 0
...
0110 = 6
...
1110 = E
1111 = F
I hope this helps better.In order to succeed, your desire for success should be greater than your fear of failure.
TE Threads: How to study for the CCENT/CCNA, Introduction to Cisco Exams -
alliasneo Member Posts: 186yeah that makes sense, so that's fine. So how does STP figure out the designated ports per segment?
Switch 0 in this diagram both ports have a cost of 19+19 to the root, so how would it decide which to block?
-
Roguetadhg Member Posts: 2,489 ■■■■■■■■□□Question 1:
Each nonroot switch advertises the it's interface cost.
Example:
Switch124 / 0060.70BE.A0A8 / FA0/?? advertises a port cost of "19" to Switch127.
Switch127 / 00E0.F717.CE31 / FA0/?? advertises a port cost of "19" to Switch124.
Switch127 sends a Hello BPDU to Switch124: "Come through me! I have a cost of 19".
Switch124 replies with a Hello BPDU to Switch127: "If you come through me, It'll cost 19 too! But I have priority over you. Block your port!"
Switch124 wins the election and has it's port in Designated Port mode.
Switch127 yields & blocks it's port.
STP Elections are measured by:
Cost to reach Root Switch (once root is elected) > Identification Field 1 I]Priority[/I > Identification Field 2 I]MAC Address[/I > Switch Interface Number (Internal switch election)
Note: Older switches have lower MAC addresses. A less powerful switch can be elected as a Root Switch, thanks to the lower MAC address. Which is why it's important to set the priority for the better switch.
Question 2:
On Switch 0: which port is Fa0/0, Fa0/1, Fa0/2?
Just remember that every switch will have only 1 Root Port. That said:
For Switch0 I'd like to believe that the orange interface is either fa0/1 or fa0/2, and the green port is fa0/0 or fa0/1 respectively and the port is marked as a Root Port (RP).
The lower interface number (fa0/0) will win the election over a higher (fa0/1) interface number. not interface mac address.
If I'm wrong, someone step in before I confuse Alliasneo and myself more.
Last edit: Man, I need to organize my responses in one shot.
If im wrong and I did all that formatting of colors of happiness. ...Well, I'm wrong. As long as someone can correct me or add to, i'll be happy.
Im going to do some work now.In order to succeed, your desire for success should be greater than your fear of failure.
TE Threads: How to study for the CCENT/CCNA, Introduction to Cisco Exams -
Roguetadhg Member Posts: 2,489 ■■■■■■■■□□Did that help?In order to succeed, your desire for success should be greater than your fear of failure.
TE Threads: How to study for the CCENT/CCNA, Introduction to Cisco Exams -
alliasneo Member Posts: 186
It does help, I'm kind of getting there with it I think. One thing I don't understand.
So each switch will have a root port back to the root. Which in this case 'Switch 0's root port is fa0/10. Why this one over port fa0/2 on switch 0?
If a switch is not connected directly to the root switch and it needs to decide which port is the root it will go on cost, but the cost between port fa0/10 and fa0/2 is the same (19+19). so how does switch 0 decide I will make port fa0/2 blocking? -
Roguetadhg Member Posts: 2,489 ■■■■■■■■□□I don't know. I would've thought that port would be identified as "fa0/1" not port "fa0/10".
My only guess at the moment is that the port "Switch0,fa0/10" is connected to the better priority "Switch124" over the "Switch127", and the RP was decided based on the switch on the other end when the Hello BPDU was sent.
Can you erase Switch127 or change the MAC of the Switch124 to a 00F0 MAC address and run the simulator again. That might be the switch logic. If it's a higher address the RP should jump to fa0/2 on Switch0, based on my guess. I can't run a test so I'm winging this on paper.
I don't know, im looking through several sites. It'll take me a while as at work im swamped with a new client coming in.In order to succeed, your desire for success should be greater than your fear of failure.
TE Threads: How to study for the CCENT/CCNA, Introduction to Cisco Exams -
Roguetadhg Member Posts: 2,489 ■■■■■■■■□□Okay. I found the solution:
If a Switch has multiple paths to reach the Root Bridge (Switch), it must select one path and the associated port as theRoot Port. Following are the different steps for selecting the Root Bridge (Switch).
• If there are two or more paths to reach the Root Bridge (Switch) select the path with the lowest accumulated path cost.
• Select the neighboring switch with the lowest Switch ID value to reach the Root Bridge (Switch).
• Select the port with the lowest Port Priority value, if you have multiple paths to reach the Root Bridge (Switch) via same neighbor switch.
• If all the ports are configured with same priority number (32 by default), select the lowest port number on the switch.
Source: How Spanning Tree Protocol (STP) select Root PortIn order to succeed, your desire for success should be greater than your fear of failure.
TE Threads: How to study for the CCENT/CCNA, Introduction to Cisco Exams -
alliasneo Member Posts: 186it doesn't seem to have selected the lowest switch ID in this scenario though. it could be packet tracer maybe but what I might do is try setting this up again and starting a new post with the one question of which port should it choose...
Thanks for the link, I'll have a look over it and see if I can find anything else out.
urgh frustrating! -
mark_s0 Member Posts: 82 ■■■□□□□□□□According to your picture though, switch124 does have a lower switch ID than switch127 so it would choose the fa0/10 as its root port.
-
Roguetadhg Member Posts: 2,489 ■■■■■■■■□□According to your picture though, switch124 does have a lower switch ID than switch127 so it would choose the fa0/10 as its root port.
The two MAC addresses are 0060 (Switch124) and 00E0 (Switch127).
The Port number for Switch 0 doesn't matter in this case (It really only comes into effect if the switch needs an internal switch electon)
Switch0 Yells from the top of his lungs: I NEED TO GET TO THE ROOT! Everyone please tell me how much money it would take to get there!
Switch124 says: Here's mine! I have a cost of 19 dollars to use me. Im Tripple AAA Backed (Great Priority for people on the go!)
Switch127 thinking to himself "I got this in the bag!", also pitches his advertisement: Come one, Come All - I have the greatest way to get to the Root only for 19 dollars, and it comes with free Massages! ...Not by me though, but by the Cowboy Cheerleaders! I'm only backed by the locals out in "A Smalltown", SouthCarolina!
Switch0 receives both advertisements. He's interested in the Switch127, but because Switch0 is already married, doesn't want all his ports to be broken. Also, being astute he wonders how the cowboy cheerleaders will visit when they don't have a game nearby. He chooses to go with Switch124 which has a better priority for him (AAA), and opens up his Fa0/10 happily.
Internal election for this purpose is to describe an election for a Designated Port. If the winning switch has multiple connections to the same collision domain, it'll draw onto itself and consider the port numbers (Not port MAC addresses)In order to succeed, your desire for success should be greater than your fear of failure.
TE Threads: How to study for the CCENT/CCNA, Introduction to Cisco Exams