Skip to content

Spanning Tree Protocol Topology Exercises

July 31, 2012

The Internet seems to lack a lot of Spanning Tree Protocol topologies for practice.  It is easy to find one or two but finding more than that has been hard. I have put together 8 exercises to be completed. Answers are included as well (pages 9-16). These answers were created by hand so please comment if anything appears to be wrong. Apologies about the messiness as it can get a little cramped.

I hope these are helpful.


Update: I want to express thanks to everyone who commented about possible errors in my topology. Unfortunately I took a famously long time to respond and I apologize for that. Because I haven’t been able to update the topology, I am going to take it down for the time being until it can be fixed and fully validated. Once I know it is correct, I will repost it.

From → Announcement

  1. Please, I need help.

    Topology on page 4 there are 3 switches. 2 of the bottom have 3 links, wich 2 of them are connected between sw2 and sw3.

    ¿How you determine wich port is the desiganted port? ¿Which criteria do you use?


    • Kevin Breit permalink

      First, lets determine the root switch. SW1 has a priority of 4096, lower than all other switches so that switch becomes root. All of its ports are designated ports. Next, determine all root ports. All ports are the same speed with no custom costs assigned thus Fa0/1 on SW2 and SW3 are root ports.

      Directly addressing your question, Fa0/2 and Fa0/3 on SW2 would be designated ports with SW3’s ports in blocking state. The priority dictates SW2 has the designated ports.

      Does this answer your question or are you still confused on the calculation?

  2. I have a question about the last topology in the exercise.. Can you explain why SW4’s Gi0/1 is blocking instead of Gi0/2? As I can tell, they both have the same root cost and they’re both going to a switch with the same priority. Don’t tie breakers end with which port is lowest? In this case, GI 0/1? Or does it base that on the bpdu coming from the other other switch? Thanks!

    • Ryan permalink

      I got the same thing. I cannot determine why the key lists Gi0/2 on SW4 as a root port, while Gi0/1 is blocking. I got the same thing you did for the same reason you described. On the two connections between SW3 and SW4, SW4 has a root path cost of 8, while SW3 would have a root path cost of 23.

      • Kevin Breit permalink

        As I stated to Josh, the parent commenter, I agree this is incorrect. I’ll need to dig up the file and make the modification.

      • Kevin Breit permalink

        Updated the answer sheet. I’ll review it in full coming up soon.

      • Lass permalink

        Regarding the last exercise Gi0/2 should be the root port instead of Gi0/1 as it is indicated now.

        When determining the root port this is the criteria to use.

        1. Lowest cost to root bridge (in this case both have the same cost).
        2. Lowest neighbour’s Bridge ID (both links connect to sw3, so it’s a tie.)
        3. Lowest SENDER port ID
        port-id= port priority (default 126)+port number

        In this case we have to break the tie using the port-ID.
        It’s important to understand that it is the port-id received from SW3 NOT the port-id of the ports on SW4. So assuming the port priority is the default one (128) both links will have the same one, so we have to resort to the port number (lowest is best), therefore Gi0/2 on SW4 will be the root port as itt connects to the lowest port number on SW3.

    • Kevin Breit permalink

      Sorry for the delay on this but thank you for the heads up. The neighbor’s lowest port number is the proper winner. I need to get this document updated.

    • Kevin Breit permalink

      I updated the answer sheet. Thank you.

      • Ade permalink

        I don’t understand why your updated answer sheet is correct – if the neighbor’s lowest port number is the proper winner then surely G0/2 should be the root port for SW4 not G0/1?

  3. daniel permalink

    In topology # 6, sw3 is blocking fa0/3 and fa0/2, shouldnt those ports be Designated since SW3 has a lower mac address than SW2 and SW5 ?


  4. daniel permalink

    I correct myself, it is correct, the other switches have a lower root path cost. In the event of a tie breaker we go to the following:
    1. lowest root bridge ID
    2. Lowets root path cost *
    3. Lowest bridge ID
    4. Lowest Port

  5. benjamin permalink

    i don’t get why you changed in the last figure Sw4 gi0/2 to blocking and gi0/1 to root when even you saying “. The neighbor’s lowest port number is the proper winner” which in this case the neighbour is SW3 and its lowest port is gi0/1 which goes towards g0/2 to SW4
    also based on this video

  6. Peter permalink

    In the 5th exercise is the G0/2 port blocked on sw2 because sw2 has a worse root path cost than sw3?

  7. Need Answers permalink

    In topology #8, I think there is another mistake. Sw3 is blocking Fa0/2 and Gi0/2 when it should it have elected them as Designated Ports.

    From my understanding, after finding the Root Ports, the lowest cumulative path cost to the Root Bridge/Switch is used to elect the Designated Port for each segment. The cumulative root path cost is the determined by the advertised path cost + the receiving port’s path cost.

    Sw4 – Sw1 Segment:
    Sw4 Fa0/2 Path Cost = 4 + 19 = 23 –> Sw3 Fa0/2 is the Designated Port NOT the Blocked Port
    Sw1 Fa0/2 Path Cost = 4*2+ 19 = 27 –> Sw1 Fa0/2 is the Blocked Port NOT the Designated Port

    Sw4 – Sw3 Segment:
    Sw4 Gi0/1 Path Cost = 4 + 4 = 8
    Sw3 Gi0/1 Path Cost = 4 + 4 + 4 = 12 [Sw2 Gi/01 to Sw3 Gi0/5 to Sw4 Gi0/1 to Sw3 Gi0/1]
    –> Sw4 G0/2 is the Designated Port NOT the Block Port
    –> Sw3 G0/1 is the Blocked Port NOT the Designated Port

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: