Technology

In the last blog we have explained what STP is and how does it work. Today we will see different topology changes in STP and its effect on the network.

Types Of Topology Change

  • Insignificant topology change
  • Indirect topology change
  • Direct topology change

 Insignificant Topology Change

 When the access port of the switch goes down and comes up, the switch sees it as a topology change in the network and it generates TCN BPDU (topology change notification) to inform the root bridge and this type of change is called insignificant topology change.

Step 1: If PC 1 on switch 2 gets shut down, the switch detects it as topology change and generates TCN BPDU from root port e0 towards root bridge.

Step 2: Root bridge sends TCN ack back to switch 2 and it also sends configuration BPDU with TC (topology change) bit on to all the downstream switches to inform about topology change in the network.

Step 3: Switch which receives configuration BPDU with TC bit, change their mac aging time from 300 sec to 15 sec.

Drawback:

If there is no communication between PC1 and PC2 for that 15 sec, switch 2 remove the mac of PC 2 from the cam table learned on interface e0. And when PC1 ping to PC2, unknown unicast flooding take place.

NOTE: When the access port comes up from the blocking state, it takes 30 seconds to come to the forwarding state i.e., convergence time is 30 seconds.

Solution:

Enable portfast on the access port of switch, which makes a port move from blocking state to forwarding state immediately without delay and switch will not generate TCN BPDU. So, there will be no change in the mac aging time.

How to enable portfast:

SW2# interface e2

SW2# switchport mode access

SW2# spanning-tree portfast

Direct Topology Change

When the root port of the switch goes down and an alternate port is available on that switch, such change is called direct topology change.

Step 1: If the link between switch 1 and switch 3 goes down, both the switch will remove the mac address learned on the connected ports e0 and e1 respectively.

Step 2: Switch 3 removes superior BPDU received at port e1 and its alternate port change to root port and it generates TCN BPDU to inform root bridge about topology change. Root port of SW3 comes to forwarding in 30 seconds.

Step 3: Root bridge generates configuration BPDU with TC bit and consequently mac aging time changes from 300 sec to 15 sec.

Step 4: If within 15 second PC 1 ping to PC2, it will drop at SW1, and after 15 seconds when PC want to communicate SW2 will perform unknown unicast flooding but still no communication as RP port of SW3 is not in forwarding state.

NOTE: Convergence time in direct topology change is 30 seconds.

Solution:

Enable uplink fast on SW which has an alternate port. If the RP port goes down, the alternate port will become RP and come forwarding immediately without delay time. If PC 1 ping to PC 2 within 15 seconds SW2 forwards to SW1 and packets get to drop as mac B of PC2 is learned on e0 of SW2. But after 15-second unknown unicast flooding take place as mac address gets removed from the SW2 cam table.

To avoid these, uplink fast not only move the new RP port forward immediately but also send a dummy frame on e0 of SW3 (150 packet/second). For each mac learned on SW3, it sends one dummy frame. Mac address B of PC2 gets learned on e1 of SW2.

How to enable uplink fast:

SW3# spanning-tree uplinkfast

Indirect Topology Change

When RP port gets down and no alternate port is available on the switch, such change is called indirect topology change.

Step 1: When link goes down between SW1 and SW2. SW2 removes superior BPDU received at e0 and when the switch does not receive BPDU, it assumes itself as the root bridge and generates a BPDU from port e1.

Step 2: SW3 on receiving BPDU from SW2 ignores, as SW3 has superior BPDU received at e1 and inferior at e0. Expiring the inferior BPDU after 20 seconds (max-age timer), SW3 informs SW2 that SW1 is the root bridge.

Step 3: SW2 makes its e1 port as RP and SW3 makes its e0 port as DP and comes in forwarding after 30 seconds.

NOTE: Total convergence time in indirect topology change is 50 seconds.

Solution:

Backbone fast should be enabled on every switch. It will reduce 20 seconds of the max-age timer if any indirect topology change occurs in the network. Port will change their state from blocking to forwarding state in 30 seconds without running the max-age timer. It will not take 50 seconds for convergence.

How to enable backbone fast:

SW# spanning-tree backbonefast

In the next blog, we will explain how STP can be protected.

Zindagi Technologies is an IT consulting company having engineers with decades of experience in planning, designing, and implementing Data Centers along with Managed IT Services, cybersecurity, cloud services. If you want to secure your network, we are just a call away. Drop us a WhatsApp message at +91-9773973971 or you can also email us and we can talk about securing your organization.

Author
Jainul Khan
Associate Consultant

Leave a comment

Your email address will not be published.