Designated vs. Blocking Port decision

veritas_libertasveritas_libertas Member Posts: 5,746 ■■■■■■■■■■
So I've been studying STP more and more trying to get a better understanding of how it will behave under certain circumstances. I understand Root bridge decision, and root port decision, but when it comes to knowing why one port will be chosen as a designated port vs. Blocking leaves me a little confused. I'll use this as an example:



What would make SW2's FA0/2 be choose to be a designated/blocked port instead of SW3's FA0/1?

Comments

  • networker050184networker050184 Mod Posts: 11,962 Mod
    The device advertising the least cost back to the root is the designated bridge on the segment and will have the designated port. When you get into the academic STP triangle here you have to get deeper into the tie breaking besides just cost.
    An expert is a man who has made all the mistakes which can be made.
  • palitpalit Member Posts: 96 ■■□□□□□□□□
    I went through this topic today..ch 2 of Odom's ICND2..it pretty much shows that the decision is based on cost calculations(bit confusing)...Good that you posted this one..I too am eager to clear my doubts.
  • atorvenatorven Member Posts: 319
    If the cost is the same then bridge ID will be the tie breaker.
  • veritas_libertasveritas_libertas Member Posts: 5,746 ■■■■■■■■■■
    Interesting thread on this topic. I'm still feeling hazy on the topic, but I feel like I'm getting somewhere: https://learningnetwork.cisco.com/thread/26857
  • networker050184networker050184 Mod Posts: 11,962 Mod
    If you know how ot figure out the root port then it's the same thing. Just apply the same logic in a different scenario.
    An expert is a man who has made all the mistakes which can be made.
  • ZartanasaurusZartanasaurus Member Posts: 2,008 ■■■■■■■■■□
    Interesting thread on this topic. I'm still feeling hazy on the topic, but I feel like I'm getting somewhere: https://learningnetwork.cisco.com/thread/26857
    All the info you need is in that thread, although I'll restate it as maybe that will help.

    First, remember the superior BPDU selection process.

    1) Lowest Root ID
    2) Lowest Cost to root
    3) Sender's Bridge ID
    4) Sender's Port ID

    SW2 and SW3 have already chose their root ports, 0/1 and 0/2 respectively. And if there were no links between them, we could stop here. But that link is where the potential loop is. So one of those switches has to decide to block its port. And one of those switches has to be elected to send BPDUs to remind the other switch that, well, there's a switch on the other end of your link and we could cause a loop.

    So this is where the designated bridge for a segment/link comes in.

    So at first, both SW2 and SW3 are both advertising a BPDU that contains SW1 as the root, right?
    And what are their costs to the root? Root path cost = received cost + port cost BPDU recieved on, right?
    SW1 is advertising itself with a cost of 0. SW2 and SW3 add their port cost (19) to the advertised cost and their RPC is 19.
    Now they advertise a cost of 19 to the root out the links connected them.

    Now they need to figure out which of them has the "superior" BPDU.

    SW2 is sending
    Root ID = SW1, RPC = 19, SW2 BID (unknown from picture), Port ID (128.4)

    SW3 is sending
    Root ID = SW1, RPC = 19, SW3 BID (unknown), Port ID (128.3)

    So let's look back at that decision algorithm:
    1) Lowest Root ID
    2) Lowest Cost to root
    3) Sender's Bridge ID
    4) Sender's Port ID

    Who is sending the lowest RID? It's a tie, they agree on the root ID.
    Who has the lowest RPC? It's a tie again.
    Who has the lowest sending bridge ID? You can't determine from the picture, but let's unpack this. What is a bridge ID composed of?
    Priority field + MAC address

    Default priority is 32,768. So let's assume the priority hasn't changed. So each of their BID will be 32,768 + their MAC address.
    Are their MAC addresses the same? Hopefully not. So whichever switch has the lowest MAC will have the lowest BID.
    So that switch is sending the "superior" BPDU on that segment. The receiving switch compares the BPDU he receives to what he would send out. Once he realizes he's outranked, so to speak, he moves the port to blocking.

    The designated bridge for that segment has to continue to send BPDUs, and he's not receiving any BPDUs superior to what he'd send out on that link. His BPDUs are a reminder to SW3 (or SW2) to KEEP YOUR PORT BLOCKED.
    Currently reading:
    IPSec VPN Design 44%
    Mastering VMWare vSphere 5​ 42.8%
  • veritas_libertasveritas_libertas Member Posts: 5,746 ■■■■■■■■■■
    Guys, I really appreciate you taking the time to clear this up for me. I figured this was the case from the beginning, but I needed to assure myself that I was right.

    Zartanasaurus, great and clear presentation. Have you considered teaching? ;)
  • palitpalit Member Posts: 96 ■■□□□□□□□□
    Thanks Zartanasaurua...and so I love this techexam site
  • veritas_libertasveritas_libertas Member Posts: 5,746 ■■■■■■■■■■
    I'm posting to this thread because I'm still a little puzzled by what the behavior should be. I'll post what I have been playing with in my lab. I bought a third 2950 from eBay so I could see what happens. Here is the lab scenario I have going:



    Now my assumption was that that FA0/8 on SW3 would go to Designated and that FA0/8 on SW2 would go to Blocking.

    Here is the STP output for each switch:

    SW1

    VLAN0001
    Spanning tree enabled protocol ieee
    Root ID Priority 1
    Address 0011.21d7.2d40
    This bridge is the root
    Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

    Bridge ID Priority 1 (priority 0 sys-id-ext 1)
    Address 0011.21d7.2d40
    Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
    Aging Time 300

    Interface Role Sts Cost Prio.Nbr Type
    ---- ---


    Fa0/1 Desg FWD 19 128.1 P2p
    Fa0/2 Desg FWD 19 128.2 P2p

    SW2

    VLAN0001
    Spanning tree enabled protocol ieee
    Root ID Priority 1
    Address 0011.21d7.2d40
    Cost 19
    Port 1 (FastEthernet0/1)
    Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

    Bridge ID Priority 4097 (priority 4096 sys-id-ext 1)
    Address 0005.dcd4.2080
    Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
    Aging Time 300

    Interface Role Sts Cost Prio.Nbr Type
    ---- ---


    Fa0/1 Root FWD 19 128.1 P2p
    Fa0/8 Desg FWD 19 128.8 P2p

    SW3

    VLAN0001
    Spanning tree enabled protocol ieee
    Root ID Priority 1
    Address 0011.21d7.2d40
    Cost 19
    Port 1 (FastEthernet0/1)
    Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

    Bridge ID Priority 8193 (priority 8192 sys-id-ext 1)
    Address 0009.b79a.dcc0
    Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
    Aging Time 300

    Interface Role Sts Cost Prio.Nbr Type
    ---- ---


    Fa0/1 Root FWD 19 128.1 P2p
    Fa0/8 Altn BLK 19 128.8 P2p
  • networker050184networker050184 Mod Posts: 11,962 Mod
    Lower priority is better, not higher.
    An expert is a man who has made all the mistakes which can be made.
  • veritas_libertasveritas_libertas Member Posts: 5,746 ■■■■■■■■■■
    Lower priority is better, not higher.

    I understand that, but why wouldn't SW3 look turn it's port to designated? Wouldn't SW2's lower priority make SW3 choose to have it's Port 8 as DP?
  • networker050184networker050184 Mod Posts: 11,962 Mod
    When SW3 receives the superior BPDU from SW2 it will block the port and mark it as an alternate path to the root. The port advertising the 'best' (closest to the root metric wise) BPDU onto the segment becomes the designated port.
    An expert is a man who has made all the mistakes which can be made.
  • veritas_libertasveritas_libertas Member Posts: 5,746 ■■■■■■■■■■
    Okay, I see. My logic was flawed. Thanks for clearing that up for me.
Sign In or Register to comment.