Options

STP Root Port role election criteria - With Picture!

zuulzuul Member Posts: 19 ■□□□□□□□□□
Hi Again- (I tried attaching the related topology last night but lost my connection to the site). (Topology atachment below)
In my course material, I've not found much detail regarding election of a root port other than "The root port is the switch port with the lowest path cost to the root bridge" they also expand on this a bit more for the case below, (italics) but I would still appreciate more clarity.
It reads: " When there are two switch ports that have the same path cost to the root bridge and both are the lowest path costs on the switch, the switch needs to determine which switch port is the root port. The switch uses the customizable port priority value, or the lowest port ID if both port priority values are the same".
They explain that on S2, F0/1 is root port because it's lower than F0/2 but don't go beyond this. My understanding is that the following order is true with regards to priority of criteria (in this case), am I right?:
1. Lowest cumulative path cost back to the root bridge
2. In case of tie, the device with lowest Bridge ID
3. In case of tie, the port with the lowest received priority #
4. In case of tie, the port with the lowest local ID #
So, shouldn't this demonstration factor in the BIDs of S3 and S4 before the port priority and IDs of S2 ?
For instance, if the BID of S3 was lower than that of S4, wouldn't F0/2 on S2 become the root port? I'm hoping I'm correct in this? Also I've not actually seen these four bullets in any of my official material for STP which I thought was a bit odd. I wondering if anyone else who has seen this before, considered the bridge ID aspect.
Thanks Z :)

Comments

  • Options
    networker050184networker050184 Mod Posts: 11,962 Mod
    I'm having a hard time following what you are saying without a diagram. No idea what S2 is and how its connected to S3 or S4.


    One thing I will add is that anything past bridge ID only comes into play if a bridge has more than one link to the same bridge.
    An expert is a man who has made all the mistakes which can be made.
  • Options
    MickQMickQ Member Posts: 628 ■■■■□□□□□□
    First you have to elect the root bridge. This is where the BID comes in with its priority and mac address.
    After you've elected the root bridge (basically the centre of the network), your switches now choose their best paths to get back to it. This is where the root path selection (your 4 bullet points) comes in.

    Think about it. Which is the more important link: the path to the lowest BID (root switch), or the 2nd (3rd, etc.) lowest BID?
    The lowest BID will have spider legged paths coming out from it, since it's considered the centre.
  • Options
    networker050184networker050184 Mod Posts: 11,962 Mod
    The bridge ID being evaluated here is not the root bridge, its the senders bridge ID.
    An expert is a man who has made all the mistakes which can be made.
  • Options
    lantechlantech Member Posts: 329
    First the root bridge is elected. All of the root bridges ports that are connected to other switches are automatically root ports. Each switch then elects a root port based on the path cost that is determined by either the type of interface or if the cost was manually changed by an engineer. If a switch has two routes to the root bridge the route with the lowest path cost becomes the root port. In the case where a switch has two routes to the root bridge with the same cost the path with the lowest port ID becomes the root port. Since a switch can't have two ports with the same port ID that ends the root port identification.

    Ex 1: if a switch has one route to the root bridge that originates from port 1 with a path cost of 20 and has another route that originates from port 48 with a path cost of 30 the route that originates from port 1 wins because of the lower path cost of 20.

    Ex 2: If a switch has one route to the root bridge that originates from port 1 with a path cost of 20 and has another route that originates from port 48 with a path cost of 20 then there is a tie. To break the tie the switch will use the port number as the tie breaker with the lowest port number winning and becoming the root port. In this case port 1 has the lowest port number so it wins the tie breaker and port 1 becomes the root port.

    Since a switch can't have more than one port with the same port number there will never be a tie at that point so there is no need to have another tie breaker.
    2012 Certification Goals

    CCENT: 04/16/2012
    CCNA: TBD
  • Options
    zuulzuul Member Posts: 19 ■□□□□□□□□□
    Guys, thanks for attempting to make sense of this without a picture (sheer heroics). So sorry, I crashed out of the site last night and couldn't back in to add the atachment (above). I would appreciate it if you cast your eyes over it again now you can see what I mean.
    Thanks a lot,
    Z
  • Options
    networker050184networker050184 Mod Posts: 11,962 Mod
    Ok so from s2's point of view its first going to look at path cost. If this is the same the next is bridge ID. Since these are two separate bridges it will pick the one with the lowest bridge ID.
    An expert is a man who has made all the mistakes which can be made.
  • Options
    zuulzuul Member Posts: 19 ■□□□□□□□□□
    Thanks networker050184 So you are saying that it goes:
    1) Path cost (which I think we can all agree on)
    2) BID
    So for example, if the BID of S3 was lower than that of S4, F0/2 on S2 become the root port? I take it that you don't agree with lantech then.

    Lantech's comment (thanks lantech) basically agrees with the original material which is:
    1) Path cost
    2) Port ID (if port priorities are the same)
    And in this case, the BIDs are of no relevance?
  • Options
    networker050184networker050184 Mod Posts: 11,962 Mod
    The port ID only comes into play if two bridges have more than one link to each other. That is the only way the bridge ID would be a tie.
    An expert is a man who has made all the mistakes which can be made.
  • Options
    zuulzuul Member Posts: 19 ■□□□□□□□□□
    Hi again networker050184
    I thought I'd include the other paragraph that's in the original material for completeness.
    It explicitly says that the reason for S2-F0/1 being a root port is because of S2s port IDs (ie port numbers) which is why I'm confused.
    The port ID is the interface ID of the switch port. For example, the figure shows four switches. Port F0/1 and F0/2 on switch S2 have the same path cost value back to the root bridge. However, port F0/1 on switch S2 is the preferred port because it has a lower port ID value.
    So I'm still foggy :)
  • Options
    networker050184networker050184 Mod Posts: 11,962 Mod
    I'm pretty sure it looks at bridge ID first. Have you checked for an errata on the material you are using? I'm looking at my book right now to be sure (its a Juniper book, but should be the same) and bridge ID is looked at first. The port ID only comes into place when a bridge ID tie is seen. This only happens if both links are to the same bridge.
    An expert is a man who has made all the mistakes which can be made.
  • Options
    zuulzuul Member Posts: 19 ■□□□□□□□□□
    Errata- good idea.
    Z
  • Options
    zuulzuul Member Posts: 19 ■□□□□□□□□□
    Hi all. I've been discussing this with a few people now and they all tend to agree that in this case, it should be the BID that accounts F0/1 on S2 being a root port which is more like networker050184 is has commented and less like lantech's remarks (but this sounds so convincing). I did check the errata for the companion book to the online material and I can't see anything in chapter 5 (where this is from). Here's the link:

    Errata page for Cisco Exploration 4.0 - ISBN-10: 1-58713-273-7
    LAN Switching and Wireless: CCNA Exploration Companion Guide
    I'll keep you posted.
  • Options
    networker050184networker050184 Mod Posts: 11,962 Mod
    lantech wrote: »

    Ex 2: If a switch has one route to the root bridge that originates from port 1 with a path cost of 20 and has another route that originates from port 48 with a path cost of 20 then there is a tie. To break the tie the switch will use the port number as the tie breaker with the lowest port number winning and becoming the root port. In this case port 1 has the lowest port number so it wins the tie breaker and port 1 becomes the root port.

    This is not correct. The local port on the switch is irrelevant. What is looked at is the information received in the BPDU from the neighboring switch.

    I wanted to add the BPDU frame format. As you can see the sending BID and PID are communicated in the BPDU.

    http://wiki.wireshark.org/STP
    An expert is a man who has made all the mistakes which can be made.
  • Options
    zuulzuul Member Posts: 19 ■□□□□□□□□□
    OK, so Wireshark is actually showing the order of events?
    1)Root path cost
    2)Bridge Identifier
    3)Port Identifier
  • Options
    networker050184networker050184 Mod Posts: 11,962 Mod
    Well, its not showing the order, it just happens to be displayed in order. But yes, that is the order.
    An expert is a man who has made all the mistakes which can be made.
  • Options
    zuulzuul Member Posts: 19 ■□□□□□□□□□
    Well blow me down with a feather! I'm sold unless lantech can come back and tell us some more (sincerely). I honestly would be interested in how this materrial got through. Well I wonder if there's an errata that's still being composed but hasn't been published yet? :-\
  • Options
    lantechlantech Member Posts: 329
    My answer was incomplete. Serves me right for trying to answer not only when I'm at work but exhausted as well.

    I'm wondering why it would look at the Bridge ID when determining the Root Port.

    I think it would be:

    1) Path cost
    2) Port Priority
    3) Port ID

    That is at least according to Wendell Odoms CCNA ICND2 book. I didn't find any errata to contradict the answer.
    2012 Certification Goals

    CCENT: 04/16/2012
    CCNA: TBD
  • Options
    networker050184networker050184 Mod Posts: 11,962 Mod
    Take a read through this document.

    https://learningnetwork.cisco.com/docs/DOC-6646

    Another mistake you are making is having the port priority and ID as separate values that are inspected at different steps. If you take another look at the BPDU format you will notice there is only one field, the 'port ID' which is a hex value comprised of the interface ID and priority combined.

    So with that said, if it only looked at cost and port ID what happens if a switch has a path through two bridges, both on port 1/1 of both switches with a default priority set? There would be no way to break that tie! This is why BID is looked at first as it will always be unique. If that ties (aka two links to the same switch) then it looks at the port ID which is always unique to the sending switch. It is impossible to determine a unique path using only port ID.

    I don't have the Odom book in front of me, but if it actually has what you listed as the process, then yes the book is wrong in this case.
    An expert is a man who has made all the mistakes which can be made.
  • Options
    lantechlantech Member Posts: 329
    I looked at the document you put up as well as a couple of other CCNA guides and they all confirmed that the BID is used. It's strange that in Odoms book he doesn't mention it for being used to determine the root port. But when talking about the designated ports it is mentioned as being a tie breaker.
    2012 Certification Goals

    CCENT: 04/16/2012
    CCNA: TBD
  • Options
    zuulzuul Member Posts: 19 ■□□□□□□□□□
    Hi guys
    I looked at the link https://learningnetwork.cisco.com/docs/DOC-6646 which has a couple of noteworthy things so just to recap.... Firstly, the Keith Bogart 802.1D document is great, other stuff he's done is good as well. I understand the two ports on the same switch explanation too (can't use cost, can't use BID, so must use port ID). However, there isn't a topology in Keith's PDF that is comparable with my original issue, so I assume this wasn't a scenario for which he needed to include a solution (i.e. there isn't a solution apart from using the BID not the ports). If that makes sense?

    Secondly, interestingly, there is a comment from Adrian_M who has experienced what I have with the CCNA curriculum. After reading the Bogart 802.1D document and researching alternatively, Adrian M comments: "However, my confusion arises from the fact that the CCNA curriculum says otherwise in chapter 5 of the LAN and Switching module, namely section 5.2.4.2"
    The port ID is the interface ID of the switch port. For example, the figure shows four switches. Port F0/1 and F0/2 on switch S2 have the same path cost value back to the root bridge. However, port F0/1 on switch S2 is the preferred port because it has a lower port ID value.

    Adrian_M then finds this document - IEEE Standard Association - IEEE Get Program and on page 139, 5th paragraph he sees the line "If a Bridge has two or more ports.....", which is the same line in the curriculum material which we deem to be incorrect. In fact this section pertains to RSTP (not the old STP that my original material is supposed to be about).
    After more reading, and later in the same document Adrian finds section 17.6 - 17.7 which includes the bullets below, and he quotes:
    "For those who don't feel like reading it (the document), but still need a reliable reference I'll reiterate the root port election steps in a hierarchically descendent order of importance (meaning that if comparing one value leads to a tie, the next one in the list is used, and so on, until a tie breaker is found)":
    1. Root BID (the first thing checked is the Root Bridge ID)
    2. Root path cost for that port
    3. Designated BID (i.e. the BID of the bridge which sent the BPDU)
    4. Port ID of the sender bridge (this is considered only when the designated BID is the same which means that the ports which are competing are linked to the same bridge)
    5. Port ID of the local bridge (This is rather unlikely to see these days, as it applies to the case when a switch is linked towards the root bridge through a hub which is connected towards the designated/root bridge through a single cable, i.e. two or more ports of the local switch will be part of the same collision domain and hence both the designated bridge ID as well as the sender Port ID will be the same, so it comes down to the local port IDs to break the tie.)

    So, what do you think. Is the list above the definitive reliable reference that we've been looking for? Actually, why would Root path cost be #2. Surely the whole point of a Root port is to be lowest cost to the root bridge, so wouldn't cost be top priority? And all BIDs are unique so #1 wouldn't tie anyway would it?
    Holy cow, cheers
    Z
  • Options
    networker050184networker050184 Mod Posts: 11,962 Mod
    1. Cost
    2. BID
    3. PID
    4. Local PID (very unlikely to ever occur as mentioned)

    That's it. Anything referencing otherwise is mistaken.

    If you want to verify just lab it up!
    An expert is a man who has made all the mistakes which can be made.
  • Options
    zuulzuul Member Posts: 19 ■□□□□□□□□□
    OK thanks a lot, I will lab it up. Sorry for the word count, I just like to try and get to the bottom of things.
    Z
  • Options
    zuulzuul Member Posts: 19 ■□□□□□□□□□
    Hi
    I thought I'd better do this in Packet Tracer before someone got a contract out on me :)
    I've attached both versions, Scenario 1 follows original material. Scenario 2 is with ports F0/1 and F0/2 swapped on Switch S2. Contrary to Cisco's text, the root port allocation on S2 remains the same on both versions, as networker050184 said would happen. If just one other person gains from this I'll be happy.
    Z
  • Options
    Reck_Reck_ Member Posts: 25 ■□□□□□□□□□
    Referring back to your original question....

    #1. You are asking (based on the books explanation) on why S2's fa0/1 was chosen as Root Port (given that fa0/1 it is lower than fa0/2)
    - Fa0/1 is the Rootport for S2 because Criteria #2 breaks the tie on Root Port selection process and not because fa0/1 is lower than fa0/2
    - COST to reach the Root in both direction is equal to 38 so COST is not considered as tie breaker between fa0/1 and fa0/2.

    #2. Your are asking if your understanding of Root Port on Non-RootBridges selection is right.
    - Yes indeed, you are correct BUT in your topology you would not end up in Criteria 3 and 4 no matter what port # you use because your Criteria # 2 breaks up your tie on Root Port Selection Process as mentioned earlier and selects the PORT towards the switch which has a Lower BID (MAC address)

    What I understand is that, you take the cisco's text and apply it on your topology which confuses you. Criteria #3 and 4 would be clear if you can...

    1. Take another crossover cable and connect it between S2 and S4.
    - without any additional configuration, both link light on S4 should be green, indicating a forwarding port
    Link lights on S2 should be an orange (blocked/higherport#) green (fwd/lowerport#)

    - take note on the link lights or port states as this will change after changing the port priority

    - you can even verify the port states between switches by running #show spanning-tree vlan 1.


    2.Change the Port Priority value on both sides of your new link
    S3(config-if)#spanning-tree vlan 1 port-priority 32
    [value of 0-240, increments of 16 , default of 128]
    S4(config-if)#spanning-tree vlan 1 port-priority 32

    3. Observe how STP reacts to this change

    If you change it right, the link that was previously on Blocking State should be now be the RootPort (FOrwarding State) which actually demonstrates Criteria # 3 on Root Port Selection Process- Lowest Port Priority # wins.

    Maybe you'll be asking now, how about if you add the link and do not alter the port-priority ? Well that just demonstrate your Criteria # 4 by Selecting the Rootport based on the Lowest Port-ID , which is the lowest physical port number between S2 and S4.

    One side note though...
    " All of the root bridges ports that are connected to other switches are automatically root ports"
    In certain conditions...
    - True, if you have Symmetric LAN switching network (connection between Rootbridge and Non-Rootbridge that has same bandwith)
    - Not True, if you have Asymmetric LAN switching network (connection between Rootbridge and Non-Rootbridge with unlike bandwith)

    In your current topology try changing S1's fa0/1 and S4's fa0/2 speed to 10mbps and leave the link speed between S1 and S3 as it is.
    S4's port fa0/2 ends up to be your blocking port instead of S2's fa0/2.
  • Options
    zuulzuul Member Posts: 19 ■□□□□□□□□□
    Hi Reck_

    Thank you so much for slaving over a hot keyboard making sense of my bewilderment. The other guys have tried too, bless them. I've been reading up on various scenarios where STP tie breakers come into play and I feel a bit happier with it now. To reply to your comments:

    #1
    I'm now certain it's criteria #2 that is the tiebreaker. Having not been formally introduced to the STP Tie Breakers (at this stage in the book anyway) I wasn't sure in what context they should be used which has caused me a lot of confusion, but I get it now.
    #2
    Thanks for confirming that the tie breakers (at the top of this) are relevant and what's in the book isn't always necessarily. Also, the BID being the decider, as it's unique.

    You said:
    What I understand is that, you take the cisco's text and apply it on your topology which confuses you. Criteria #3 and 4 would be clear if you can...

    If you are referring to Cisco's text as being what's in italics at the start, it's wrong, or at best insufficient (as Adrian M will probably agree). Their reason for F0/1 being a root port on S2 is S2's local port ID not a BID deciding. Or did you mean my four STP tie's at the start? Thankfully I get the STP tie breakers now so less confusion :0

    Lastly, I really appreciate that you spent the time showing me your recommendations for experimenting with the topology to investigate criteria #3 and #4 etc, that was good of you. I'll have fun playing around.
    Thanks again
    Z
  • Options
    zuulzuul Member Posts: 19 ■□□□□□□□□□
    Just to clear a few things up, I found this interesting:
    https://learningnetwork.cisco.com/thread/22883
    Z
  • Options
    networker050184networker050184 Mod Posts: 11,962 Mod
    Nice to see Odom clarify it himself. Guess that puts an end to it then!
    An expert is a man who has made all the mistakes which can be made.
  • Options
    zuulzuul Member Posts: 19 ■□□□□□□□□□
    Yes it looks that way. I appreciate all your help, thanks again.
    Z
Sign In or Register to comment.