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

Evolution of network automation to network intelligence

In the process of industrial digitalization, Inte...

How will future 6G networks cope with the demand for mobile data?

Ian Wong, director of RF and wireless architectur...

Comparison of LPWAN technologies: Ten criteria for successful implementation

Low Power Wide Area Network (LPWAN) is the fastes...

Seamless mobile connectivity is key to digitalization in healthcare

[[373455]] The widespread problem of unreliable c...

The biggest risk of 5G networks

The fifth generation (5G) network has the potenti...

[Black Friday] Anynode: $8/year KVM-512MB/10G SSD/1TB/Las Vegas

Anynode released a Black Friday discount plan, of...