Options

Spanning Tree - Determining the Blocking Port

Daniel333Daniel333 Member Posts: 2,077 ■■■■■■□□□□
All,

Been about 3 years since I have touched a switch, probably 4 since I have thought of spanning tree. Maybe more! So I was helping someone with their CCENT and I have to say I am drawing a blank in this topology.

Determining the root bridge was easy enough. Lowest priority, lowest MAC. But Why did switch3 choose to block one port over another. They have equal cost.

Is it fair to say the designed port is select because of it's higher interface number?


Switch#show span
VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     0001.4278.3C06
             Cost        38
             Port        20(FastEthernet0/20)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     00E0.F7CD.A167
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/13           Altn BLK 19        128.13   P2p
Fa0/20           Root FWD 19        128.20   P2p

-Daniel

Comments

  • Options
    Daniel333Daniel333 Member Posts: 2,077 ■■■■■■□□□□
    So correct me if I am wrong here. Switch3 is deciding which of it's interfaces need to have DPs. In this case, it looks at it's neightbors bridge iD which is the stock priority number plus VLAN1s MAC address. So switch4, would have a lower MAC and get the DP. The other would get blocked?
    -Daniel
  • Options
    james43026james43026 Member Posts: 303 ■■□□□□□□□□
    You are seeing the switch select a Root port, not a designated port, there is a difference in the role they play. The root port is selected based on lowest cumulative cost to the root bridge, if multiple ports have the same cost to the root bridge, then the port who's neighbor has the lowest Bridge ID is selected as root port, if multiple ports are connected to the same neighbor, then the port with the lowest priority from the neighbor is selected, if the priority is a tie, then the port with the lowest port number on the neighbors side is selected as the root port.
  • Options
    Daniel333Daniel333 Member Posts: 2,077 ■■■■■■□□□□
    Still not clear on the determination on the blocking port selection how ever. Which is just anything that is not a DP ?
    -Daniel
  • Options
    james43026james43026 Member Posts: 303 ■■□□□□□□□□
    Yeah, once RP and or DP have been selected on a link, then the other side is either blocking, backup, or alternate port, just depending on what version of STP you are running.
  • Options
    Danielh22185Danielh22185 Member Posts: 1,195 ■■■■□□□□□□
    Its as simple as this:

    SW3s best path to the root is via SW4, thus it's root port attribute.

    SW3 also has a designated port via SW1 which is the less preferred path to the root, so SW3 blocks the least preferred path back to the root.

    NOTE: A STP topology will block the LEAST number of designated ports to break the loop. SW3s port toward SW1 happens to be the least preferred path for SW3 to reach the root, so it blocked and the STP loop is closed.
    Currently Studying: IE Stuff...kinda...for now...
    My ultimate career goal: To climb to the top of the computer network industry food chain.
    "Winning means you're willing to go longer, work harder, and give more than anyone else." - Vince Lombardi
  • Options
    james43026james43026 Member Posts: 303 ■■□□□□□□□□
    Its as simple as this:

    SW3s best path to the root is via SW4, thus it's root port attribute.

    SW3 also has a designated port via SW1 which is the less preferred path to the root, so SW3 blocks the least preferred path back to the root.

    NOTE: A STP topology will block the LEAST number of designated ports to break the loop. SW3s port toward SW1 happens to be the least preferred path for SW3 to reach the root, so it blocked and the STP loop is closed.

    Not to argue, but SW3 doesn't have a designated port, SW3 has an alternate blocking port. Big difference here. A DP will always be selected in the following manner on a segment, port with the lowest cost back to root bridge, if tied, lowest bridge ID, if tied, lowest port priority, if tied, lowest port number received from neighbor compared to your own. In the example OP provided, SW1 is the switch with a RP and a DP.
  • Options
    Danielh22185Danielh22185 Member Posts: 1,195 ■■■■□□□□□□
    james43026 wrote: »
    Not to argue, but SW3 doesn't have a designated port, SW3 has an alternate blocking port. Big difference here. A DP will always be selected in the following manner on a segment, port with the lowest cost back to root bridge, if tied, lowest bridge ID, if tied, lowest port priority, if tied, lowest port number received from neighbor compared to your own. In the example OP provided, SW1 is the switch with a RP and a DP.

    I see where your head is at with this and you are correct in that manner however the port prior to becoming a blocked port is a designated port because it has a valid path to the root, thus the reason why it is blocked.
    Currently Studying: IE Stuff...kinda...for now...
    My ultimate career goal: To climb to the top of the computer network industry food chain.
    "Winning means you're willing to go longer, work harder, and give more than anyone else." - Vince Lombardi
  • Options
    james43026james43026 Member Posts: 303 ■■□□□□□□□□
    I see where your head is at with this and you are correct in that manner however the port prior to becoming a blocked port is a designated port because it has a valid path to the root, thus the reason why it is blocked.

    By default when STP first starts running on a switch, the switch will assume that it is the root, and will then flood BPDU's out all ports (which will all be designated ports), and will continue to assume it is the root until another switch proves it wrong, once the root bridge is selected, then all ports on all non root bridges will go into blocking mode while STP calculates best paths, and cycles through timers to ensure a loop free path. So yes, at some point all ports are DP's, but that was never in question, what was in question was whether or not SW3 actually had a DP, which it does not. I just wanted to clarify.
Sign In or Register to comment.