STP root port

newman555newman555 Member Posts: 26 ■□□□□□□□□□
Hi! I have a little question about stp.

If you have a topology in which a switch is connected to root bridge directly and also on a another side trough several other switches and the link trough other switches is much faster (the cost to root bridge is smaller than the one on a port directly connected), what will be the root port on this switch? The one that is directly connected to root bridge or the one with smaller cost value? Thank you!

Comments

  • danb83danb83 Member Posts: 22 ■□□□□□□□□□
    I am studying STP / RSTP at the moment.

    The lowest cost path always wins!

    The physically shortest path is not neccesarily the best.
  • newman555newman555 Member Posts: 26 ■□□□□□□□□□
    I also think that lowest cost wins, but I found somewhere that directly connected ports to root bridge become root ports, so that's why I was uncertain...
  • DevilWAHDevilWAH Member Posts: 2,997 ■■■■■■■■□□
    newman555 wrote: »
    I also think that lowest cost wins, but I found somewhere that directly connected ports to root bridge become root ports, so that's why I was uncertain...


    all ports on the root switch become designated ports.

    however the second switch will assing the better link as the root port.

    each switch in STP only deals with its own loacl ports, it does not worry about the stat of the port at the other end.

    So in this case the second switch would set its root port to the one with the lowest path cost back to the root switch. This would leave the port connected directly back to the root directly as nither a degisnated port or a root port, so it will be set to a blocking state.

    So even though the other end of the link is up on the root switch, the link as a whole is effectivly down.
    • If you can't explain it simply, you don't understand it well enough. Albert Einstein
    • An arrow can only be shot by pulling it backward. So when life is dragging you back with difficulties. It means that its going to launch you into something great. So just focus and keep aiming.
  • hexemhexem Member Posts: 177
    Remember the cost is incremented as it hit's a switch other than the root, so the root starts with port cost of 0, and as it moves futher away from the root switch it's incremented.
    ICND1 - Passed 25/01/10
    ICND2 - Passed 9/03/10

    Studying CCNA:S
  • phoeneousphoeneous Member Posts: 2,333 ■■■■■■■□□□
    newman555 wrote: »
    I also think that lowest cost wins, but I found somewhere that directly connected ports to root bridge become root ports, so that's why I was uncertain...

    Where did you read that?
  • hexemhexem Member Posts: 177
    There's only ever one root port for 802.1d, and that will be the lowest cost port, if there's a tie the lowest numbered port is chosen.
    ICND1 - Passed 25/01/10
    ICND2 - Passed 9/03/10

    Studying CCNA:S
  • CiskHoCiskHo Member Posts: 188
    DevilWAH wrote: »
    all ports on the root switch become designated ports.
    <snip>
    So in this case the root switch would set its root port to the lowest path cost.
    Seems like incorrect wording to me. How could a root switch whose ports are all "designated" have a "root" port? Root switches do not have root ports, only designated ports. May want to rephrase "root" switch to "nonroot" switch or "switch directly connected to the root switch".

    Just trying to make sure there is no confusion.
    My Lab Gear:
    2811(+SW/POE/ABGwifi/DOCSIS) - 3560G-24-EI - 3550-12G - 3550POE - (2) 2950G-24 - 7206VXR - 2651XM - (2) 2611XM - 1760 - (2) CP-7940G - ESXi Server

    Just Finished: RHCT (1/8/11) and CCNA:S (Fall 2010)
    Prepping For: VCP and CCNP SWITCH, ROUTE, TSHOOT
  • DevilWAHDevilWAH Member Posts: 2,997 ■■■■■■■■□□
    CiskHo wrote: »
    Seems like incorrect wording to me. How could a root switch whose ports are all "designated" have a "root" port? Root switches do not have root ports, only designated ports. May want to rephrase "root" switch to "nonroot" switch or "switch directly connected to the root switch".

    Just trying to make sure there is no confusion.

    oppppppppppps

    please re-read my post and check I have it right now ;) quite a few miss types in there... Sorry about that people, can't help me writing such nonsense...
    • If you can't explain it simply, you don't understand it well enough. Albert Einstein
    • An arrow can only be shot by pulling it backward. So when life is dragging you back with difficulties. It means that its going to launch you into something great. So just focus and keep aiming.
  • mgeorgemgeorge Member Posts: 774 ■■■□□□□□□□
    newman555 wrote: »
    I also think that lowest cost wins, but I found somewhere that directly connected ports to root bridge become root ports, so that's why I was uncertain...

    Typically the directly connected ports from a switch to a root bridge in an STP domain will be elected as the root as it only has a single link to account for the cost.

    For example you have a 3 switch topology, SW1 is connected to SW2 and SW3 then SW2 and SW3 are directly connected.

    SW1 is the root and sw2 is connected to sw1 via a 1Gbps link which gets a STP cost of 20000, the only way you're going to beat that cost is if SW2 has a 10Gbps link to SW3 and SW3 has a 10Gbps link back to the root SW1 which in turn would total 4000

    You can however manually specify port cost in a transit path to influence the root port election.
    There is no place like 127.0.0.1
Sign In or Register to comment.