Options

Spanning tree questions for the gurus

mikeybinecmikeybinec Member Posts: 484 ■■■□□□□□□□
Quick question.. see the exhibit

On the top pic, clearly the left switch is the root, the right switch picks it's root and blocking port not only on mac and priority but through port ID.. IOW, fa0/1 is lower.. notice that 1 is connected to root bridge 1 and 2 is connected to root bridge 2

Now, notice the bottom topology.. Same setup..But fa0/1 on the right is connected to fa0/24 on the root bridge and puts fa0/1 in the blocking state.. Running the show command sh int fa0/1 sez that the mac address for that port is lower than the mac address of port fa0/2 of the non root bridge


I would think that fa0/1 would still be the root port

I'm taking ICND2 in a couple of days and I'm not clear on this puppy..

Thanks Gurus!
Cisco NetAcad Cuyamaca College
A.S. LAN Management 2010 Grossmont College
B.S. I.T. Management 2013 National University

Comments

  • Options
    GDainesGDaines Member Posts: 273 ■■■□□□□□□□
    Check this thread out to see if it answers your question, I did extensive testing a while back and am happy to send you the spreadsheet with all the tests and results.

    http://www.techexams.net/forums/ccna-ccent/120761-stp-definitive-tested-answers.html

    If it doesn't answer the question we can take another look for you.
  • Options
    mikeybinecmikeybinec Member Posts: 484 ■■■□□□□□□□
    I read your reply. My point is, according to the rules, there are four criteria is determining port roles:

    A-lowest bridge ID
    b-lowest path cost to bridge
    c-lowest sender bridge ID
    d-lowest sender port ID

    It just seems to me, that A trumps all unless one changes the path cost to a non default number. My pic is Packet Tracer but I have a couple of 2960s in front of me and I reversed the two GIG ports on the downstream switch and it did
    what I'm asking about--Port gig0/1 changed to blocking and gig0/2 changed to root.

    Regards
    Cisco NetAcad Cuyamaca College
    A.S. LAN Management 2010 Grossmont College
    B.S. I.T. Management 2013 National University
  • Options
    clarsonclarson Member Posts: 903 ■■■■□□□□□□
    the first criteria used to determine a root port is the path cost to the root bridge. Then your list is the order of the tie breakers should the path cost be equal.

    you didn't mention it but it looks like your using pvst

    what you did is swap ports on the non-root bridge.

    So what does changing the non-root ports change?
    the path cost? no, they are the same for each port, next tie breaker

    the bridge id? no, they are the same for each port, next tie breaker

    the path cost to bridge? no, they are the same for each port, next tie breaker

    the sender bridge id? no, they are the same for each port, next tie breaker

    the lowest sender (root bridge) port id? no, the lowest sender port id is still the lowest (didn't change ports on root bridge).

    The non-blocking port on the non-root bridge is always going to be the port connected the root bridge's gig0/1 port in this case.


    Running the show command sh int fa0/1 sez that the mac address for that port is lower than the mac address of port fa0/2 of the non root bridge

    what your are seeing is the statically assigned mac address to that port on the non-root bridge.
    That isn't a mac address from the root bridge. No matter which port on the root bridge that is connect to fa0/1, that command will always report that same mac address. and that mac address will always be 1 less than the mac address shown by the sh int fa0/2 command.

    if you do a show version on the switch, you will see the base mac address. this mac address is used as the general purpose mac address. One place this base mac address is used is as the mac address for the stp bid (priority/base mac address)
  • Options
    GDainesGDaines Member Posts: 273 ■■■□□□□□□□
    mikeybinec wrote: »
    Quick question.. see the exhibit

    On the top pic, clearly the left switch is the root, the right switch picks it's root and blocking port not only on mac and priority but through port ID..

    IOW, fa0/1 is lower.. notice that 1 is connected to root bridge 1 and 2 is connected to root bridge 2

    Now, notice the bottom topology.. Same setup..But fa0/1 on the right is connected to fa0/24 on the root bridge and puts fa0/1 in the blocking state.. Running the show command sh int fa0/1 sez that the mac address for that port is lower than the mac address of port fa0/2 of the non root bridge

    I would think that fa0/1 would still be the root port

    In both your examples the left switch must be the root bridge as all ports are forwarding (there is never a blocked port on a root bridge). As both examples are a simple 2-switch configuration with redundant links, virtually all rules for electing the root port match:

    Rule 1 - Path cost to the Root Bridge. In the exhibits both links are directly connected to the other switch, and in the absence of information indicating otherwise must be assumed to be running at the same speeds, so the path cost for each link is the same.
    Rule 2 - Port connected to the lowest BID. As both ports connect to the same Root Bridge, the BridgeID will be the same for both links.
    Rule 3 - Port receiving the lowest STP Priority from the Root Bridge (actually neighbor switch but in this case that is the Root Bridge). As both ports connect to the same Root Bridge, the Port Priority will be the same for both links.
    Rule 4 - Port connected to the lowest port number of the Root Bridge (actually neighbor switch but in this case that is the Root Bridge).

    In both examples rules 1-3 match, so the deciding factor is the port connected to the lowest port number on the neighbor switch (Root Bridge in both examples) will be elected as the Root Port, and any other redundant links will be placed into blocking mode to avoid loops.

    In example 1 Fa0/1 on the non-Root Bridge connects to the lowest port number on the Root Bridge, whereas in example 2 Fa0/2 on the non-Root Bridge connects to the lowest port number on the Root Bridge.
  • Options
    GDainesGDaines Member Posts: 273 ■■■□□□□□□□
    GDaines wrote: »
    Rule 1 - Path cost to the Root Bridge. In the exhibits both links are directly connected to the other switch, and in the absence of information indicating otherwise must be assumed to be running at the same speeds, so the path cost for each link is the same.
    Rule 2 - Port connected to the lowest BID. As both ports connect to the same Root Bridge, the BridgeID will be the same for both links.
    Rule 3 - Port receiving the lowest STP Priority from the Root Bridge (actually neighbor switch but in this case that is the Root Bridge). As both ports connect to the same Root Bridge, the Port Priority will be the same for both links.
    Rule 4 - Port connected to the lowest port number of the Root Bridge (actually neighbor switch but in this case that is the Root Bridge).

    In the OP's 2-switch example Rules 1-3 above don't come in to play as all paths have equal cost, all connections go back to the same switch so have the same BridgeID, and all ports have equal priority, so in that instance rule 4 decides which port will be elected as the Root Port. However, in a specific 4-switch layout all the rules apply.

    mikeybinec wrote: »
    A-lowest bridge ID
    b-lowest path cost to bridge
    c-lowest sender bridge ID
    d-lowest sender port ID
    The OP put BridgeID before Path Cost which I noticed was the opposite way around to what I have in my notes, so I did some more investigation into STP and found just as many sites showing the rules my way around as I did showing them the other way around, so decided the only way to be sure of the correct order of the rules is to do some more labbing...

    SW1 has been made the Root Bridge by lowering the its priority to 16384 while all the other switches have the default priority of 32768. SW2 does not have a direct connection to the Root Bridge, with each of it's two connections going to different switches.

    In test 1 all settings are default so rule 2 decides that on SW2, F0/23 will become the Root Port as it connects to the neighbor with the lowest BridgeID.



    In test 2 the path cost between SW2 and SW3 is reduced from 19 to 15. In this instance rule 1 decides that on SW2, F0/24 will take over as the Root Port, thus confirming that Path Cost is considered before BridgeID and that therefore Path Cost is Rule 1.

  • Options
    james43026james43026 Member Posts: 303 ■■□□□□□□□□
    Great explanations. I would just like to add the final tie breaker when deciding root ports. If perhaps a hub is in use between two switches like the diagram below, it is possible that two ports could have the same received port priority and port number, in which case the switch would use it's own port priority and port numbers to decide which port would be root / designated port.

  • Options
    mikeybinecmikeybinec Member Posts: 484 ■■■□□□□□□□
    GDaines wrote: »

    In test 2 the path cost between SW2 and SW3 is reduced from 19 to 15. In this instance rule 1 decides that on SW2, F0/24 will take over as the Root Port, thus confirming that Path Cost is considered before BridgeID and that therefore Path Cost is Rule 1.

    Appreciate the effort.. What i understand is we all assume that the default is 32768.. When you changed the bridge priority, yeah, than we bypass rule number 1..I agree with that

    My referernce for my rules quote is from Paul Browning's latest effort

    Regards
    Cisco NetAcad Cuyamaca College
    A.S. LAN Management 2010 Grossmont College
    B.S. I.T. Management 2013 National University
Sign In or Register to comment.