As we all know, self-looping of different VLAN interfaces will not cause broadcast storms, but will it be blocked by STP?

As we all know, self-looping of different VLAN interfaces will not cause broadcast storms, but will it be blocked by STP?

Take a simple topology:

In this topology, G0/0/1 and G0/0/2 of SW1 belong to different VLAN1 and VLAN2 respectively. Both ports are connected to the fool switch at the same time, which is equivalent to a "physical self-loop", but in fact there is no logical loop. This kind of self-loop network will not generate a broadcast storm, as shown in the following figure:

After the broadcast packet enters port 1, it will be marked with the default tag 1, that is, it will not be forwarded to port 2 of VLAN2, and no loop storm will occur. In this case, if the switch enables the STP function, will one of the two ports be blocked? Before explaining this problem, let's simulate it.

Building the topology

In this example, the topology is simulated by eNSP. The switch enables STP mode, port 1 is configured as Access VLAN1, and port 2 is configured as Access VLAN2.

Wait for the topology to converge and check the final status of the spanning tree convergence:

It can be seen that port 2 is blocked in the end. The STP priority is "slightly better". Port 1 has a higher priority, so blocking port 2 is in line with expectations.

But obviously, the STP protocol does not care whether ports 1 and 2 belong to different VLANs. Even if there is no loop in the logical topology, the protocol will block it. This result does not meet the psychological expectations of the general users and is considered "false blocking". Why is this the case?

Principle Analysis

The basis for STP protocol convergence is the interaction of BPDU messages. After the switch port enables STP, BPDU is sent out by the port, and the BPDU sent out by each port is different. BPDU messages are encapsulated in 802.3/LLC frame format, which is slightly different from the common Ethernet datagram 802.3 Ethernet 2 frame format:

The BPDU of STP and RSTP does not contain VLAN information, so the spanning tree protocol does not make judgments and comparisons based on port VLANs.

So how does it perform in MSTP?

Convergence of different VLAN interfaces in MSTP

MSTP can configure VLAN convergence in different instances in two situations:

1. Default Configuration

By default, VLAN 1 and VLAN 2 are both MSTP instance 0. If both ports converge in the default instance 0, the port with the lowest priority will be blocked:

2. Configure the instance

If VLAN1 and VLAN2 are assigned to different instances 1 and 2 respectively, the instances are converged and calculated independently, and the physical ports 1 and 2 are not blocked. The forwarding mechanism is as follows:

  • Data in VLAN 1 will be forwarded in the spanning tree of instance 1;
  • Data in VLAN 2 will be forwarded in the spanning tree of instance 2;
  • The remaining VLAN data is forwarded in instance 0, but the small optimal port will be blocked.

After the MSTP instance is configured, the BDPU message contains the MSTID field, and the interaction calculation between switches and bridges will converge based on the instance:

Summarize

It doesn’t matter if you don’t understand the above principles, just think about it slowly, but be sure to remember the following summary:

Q: If STP or RSTP is enabled on a switch and different VLAN interfaces "loop" each other, will one of the interfaces be blocked?

A: Yes, the port with the lower priority will be blocked.

Q: What if MSTP is enabled?

A: There are two situations:

  • By default, if no instance is configured, the interface with the lower priority will be blocked, just like RSTP.
  • After the instance is configured, ports 1 and 2 are in forwarding state in different instances.

<<: 

>>:  F5 redefines ADC in the AI ​​era

Recommend

Global chip makers warn that global chip shortages will last for years

According to industry media reports, some well-kn...

The third generation of SD-WAN security

If local Internet access is not provided to branc...

Detailed explanation of Tomcat HTTP protocol and AJP protocol

The main function of Tomcat is to provide a Servl...

Cutting in while driving is annoying. WiFi actually takes up lanes too.

Friends who often drive often encounter the pheno...

How to solve edge bottlenecks caused by the surge in data usage

The importance of data is changing today, and the...

See all the things a service mesh can do

Service mesh adoption continues to grow, and some...

ZJI: 520 yuan/month Hong Kong server-2*E5-2630L/32GB/480G SSD/30M bandwidth/2IP

ZJI has released a special promotional dedicated ...