Skip navigation
Cisco Learning Home > Certifications > Routing & Switching (CCNA) > Discussions

_Communities

This Question is Answered 1 Helpful Answer available (2 pts)
11983 Views 27 Replies Latest reply: May 2, 2009 4:55 PM by Tony RSS 1 2 Previous Next

Currently Being Moderated

STP Path Selection With Only Two Switches

Apr 30, 2009 10:36 PM

Mike.B 528 posts since
Oct 20, 2008

Hi Guys,

 

Quick question:  Lets say I have two switches connected together with two links (equal cost).  How does STP deside which link to block?  I've heard that it comes down to whichever port is lowest... but is that on the Root bridge side? Or the other switches side?

 

Thanks,

 

M

  • Conwyn 7,907 posts since
    Sep 10, 2008
    Currently Being Moderated
    1. Apr 30, 2009 10:57 PM (in response to Mike.B)
    Re: STP Path Selection With Only Two Switches

    Hi Mike

     

    The root is in charge and he will pick his FA0/lowest choice.

     

    Regards Conwyn

  • Mathew Newton 82 posts since
    Mar 7, 2009
    Currently Being Moderated
    2. May 1, 2009 4:53 AM (in response to Mike.B)
    Re: STP Path Selection With Only Two Switches

    Hi Mike,

     

    I'm still learning this myself so with that caveat in mind here's my thinking...

     

    In the configuration you describe you are right that if all else is equal then the it comes down to the port number to decide which port to put in blocking mode. In line with the 'lowest wins' concept it is the highest port which gets blocked.

     

    As to which side this occurs on remember that a key aspect of a root bridge is that by definition all of its ports are always in forwarding mode and hence it is down to the non-root bridge to block its highest port(s).

     

    Mathew

     

    P.S. I've just noticed my thinking is completely out of phase with Conwyn's so I'd seek a third opinion if I were you!

  • Paul Stewart  -  CCIE Security, CCSI 6,993 posts since
    Jul 18, 2008
    Currently Being Moderated
    3. May 1, 2009 5:01 AM (in response to Mathew Newton)
    Re: STP Path Selection With Only Two Switches

    I too think that the decision would be made on the non-root switch.  I'm not sure if the algorithm for selecting the port to block is specified in the standard or if that is left up to vendors.  Really the root switch just sources BPDU's.

  • Conwyn 7,907 posts since
    Sep 10, 2008

    Hi Paul

     

    I have two switches with two cross overcables. What every I do the non-root switch always forwards to the lowest port on the root. I seem to remember that port priority also comes from the other end as well.

     

    Regards Conwyn

  • ciscoskeemz 462 posts since
    Jul 10, 2008
    Currently Being Moderated
    5. May 1, 2009 7:40 AM (in response to Mike.B)
    Re: STP Path Selection With Only Two Switches

    Mike,

     

    Assuming all equal costs, the port on the non root bridge that is connected to the highest port on the root bridge will go into blocking.

     

    Mike

  • Armen 247 posts since
    Jul 7, 2008
    Currently Being Moderated
    6. May 1, 2009 8:15 AM (in response to Mike.B)
    Re: STP Path Selection With Only Two Switches

    Hi Mike,

     

    Root Bridge side decides which port .

    I had same question months earlier and I started a discussion. Here is the link

     


     

    Armen

  • Mathew Newton 82 posts since
    Mar 7, 2009
    Currently Being Moderated
    8. May 1, 2009 9:31 AM (in response to Conwyn)
    Re: STP Path Selection With Only Two Switches

    I've just tried it myself and am seeing the same as Conwyn - the forwarding port selection on the non-root bridge is dictated by the lowest port number on the root bridge if all other parameters are equal.

     

    Can anyone cite an unambiguous authoritive reference for this? I'm only keen to find out for certain as this behaviour does not align with how I've been taught (although perhaps it's merely a case of ambiguity that explains the difference rather than a fundamental disagreement).

     

    Mike, you just know that if we don't get to the bottom of this then it'll be on the exam for sure!!

     

    Mathew

  • Mathew Newton 82 posts since
    Mar 7, 2009
    Currently Being Moderated
    9. May 1, 2009 10:12 AM (in response to Mathew Newton)
    Re: STP Path Selection With Only Two Switches

    Just in case we might be talking at cross purposes, I've set the following up which echoes Mike's hypothetical situation:

     

    http://www.newtonnet.co.uk/permanent/STP Example.png

     

    As you can see, port Fa0/1 on the non-root switch has gone in to blocking mode.

     

    Why is this? I had been taught that in situations like this, with all other factors equal, it is the lowest port number that would win the tie when selecting which parallel port to put into forwarding mode... I understood this to mean that the lowest port number on the switch that is making the decision but it would appear that the non-root switch is actually electing to use the lower port number of the root switch (presumably learnt from the BDPUs) to settle the tie.

     

    Mathew

     

    P.S. Sorry if the picture appears out of whack - it doesn't appear like that when composing the post! (come on CLN - why is the forum software so borked?!)

  • Conwyn 7,907 posts since
    Sep 10, 2008
    Currently Being Moderated
    10. May 1, 2009 10:14 AM (in response to Mathew Newton)
    Re: STP Path Selection With Only Two Switches

    Hi Matthew

     

    Correct it is the lowest port number FA0/1 on the other end (the root). As I said port priority has similar logic.

     

    Regards Conwyn

  • Paul Stewart  -  CCIE Security, CCSI 6,993 posts since
    Jul 18, 2008
    Currently Being Moderated
    11. May 1, 2009 10:15 AM (in response to Mike.B)
    Re: STP Path Selection With Only Two Switches

    I would be curious to see a link to the other thread where this was discussed.  Conwyn's first post stated, "The root is in charge and he will pick his lowest choice."  In his second post he stated, "What every I do the non-root switch always forwards to the lowest port on the root."  When I read the second post, I interpreted that to mean it used the lowest port to get to the root.  That is my error, as I can see that he says it always forwards to the lowest port on the root.  I think the non-root switch would block one port and forward on the other one.

     

    If this is true, it could make for an interesting trivia or test question, but doesn't really matter.  I thought the cost should come from the port that received the BPDU.  If these were equal, I didn't know if it is a vendor specific or a standard for selection.  With additional switches, it wouldn't matter which port this first hop uses.  As far as selection, I think the IEEE's equivalent of an RFC is not free.  I do not have ready access to see if that is a standard.  If it is a standard, it may be found in Radia Perlman's book (Interconnections).

     

     

    I have done a little bit of research on this now.

     

    So here were my questions, and the answers that I believe are correct.

     

    Which switch would have a port that goes into blocking mode?  I think this would the non-root switch.  The root bridge should be in forwarding mode on all ports.

     

    Which switch controls this?  I think the non-root makes the decision, however I think the decision is made from information in the BPDU it receives.  I think it would first decide based on the cost but in the event of a tie I'm guessing a little more has to be looked at.  The BPDU has a PortID field which probably explains the behavior Conwyn is seeing.

     

    When is the path cost incremented? I thought this was incremented as the BPDU was received, but it actually looks like this is incremented as it leaves a bridge based on the port configuration.

     

     

    The URL Below has a sample BPDU format.

     

    http://www.wetdirt.com/cisco_tranning/data/itm/bs/transp/bstbbpdu.htm

     

     

    The Next URL explains in a different context how to determine if a BPDU is superior.

     

    http://www.cisco.com/en/US/tech/tk389/tk621/technologies_tech_note09186a00800ae96a.shtml

     

    A BPDU is superior if

    1. A lower Root Bridge ID.

    2. A lower path cost to the Root.

    3. A lower Sending Bridge ID.

    4. A lower Sending Port ID.

  • Armen 247 posts since
    Jul 7, 2008
  • Paul Stewart  -  CCIE Security, CCSI 6,993 posts since
    Jul 18, 2008
    Currently Being Moderated
    13. May 1, 2009 11:00 AM (in response to Armen)
    Re: STP Path Selection With Only Two Switches

    That's good reading. I think I understand much better.

     

    On another note, the url has the "http" on it twice.  I don't know if that is a bug on the new site, or just how it happened to be pasted in.  It looks fine, but when you click it you get nothing.

  • Bryan Bartik 5 posts since
    Mar 11, 2009
    Currently Being Moderated
    14. May 1, 2009 11:18 AM (in response to Conwyn)
    Re: STP Path Selection With Only Two Switches

    The root switch forwards on all ports. It does not choose who blocks which port. It may influence it (via priority) or lowest interface number, but it does not "make" the decision. The non-root switch makes the decision based on information it has gathered (via BPDUs).

Actions

More Like This

  • Retrieving data ...

Bookmarked By (1)