VLAN Flapping
VLAN flapping is a situation where a VLAN fluctuates in status between up and down for a short period of time. VLAN flapping is usually caused by incorrect or inconsistent configuration of the switches connected in a VLAN network, or a spanning tree problem that causes the ports carrying the VLAN to change state. VLAN flapping can cause connection disruptions and network performance because switches must constantly change the routing and forwarding tables associated with those VLANs.
How to Solve VLAN Flapping
To resolve VLAN flapping, the first step is to identify the flapping VLAN and the switches involved. This can be done by looking at the log message on the switch, which usually contains information like this:
%SW_VLAN-6-VLAN_UPDOWN: VLAN 2 changed state to up %SW_VLAN-6-VLAN_UPDOWN: VLAN 2 changed state to down
The log message indicates that VLAN 2 fluctuates between up and down. The next step is to trace the VLAN configuration and spanning tree on the switches connected to the VLAN network and check for errors or inconsistencies. Some things to note are:
- Make sure the VLAN configuration on the connected switches is following network needs, and there are no errors or inconsistencies. Some aspects of the configuration that need to be checked are the VLAN number, VLAN name, ports included in the VLAN, trunking mode, and native VLAN.
- Make sure the spanning tree configuration on the connected switches is following network needs, and there are no errors or inconsistencies. Some aspects of the configuration to check are spanning tree mode, switch priority, port priority, port cost, and spanning tree features such as portfast, root guard, and loop guard.
- Make sure there are no loops or broadcast storms that could cause VLAN flapping, as this can cause the switch to receive packets with the same VLAN ID from different ports. If present, use the spanning tree feature to prevent and resolve loops, and use the storm control feature to prevent and resolve broadcast storms.
Conclusion
Flapping is a network phenomenon that occurs when an address, port, or path changes its status between active and inactive for a short period of time. Flapping can be caused by a variety of factors, such as damaged cables, problematic devices, incorrect configurations, or network attacks. Flapping can occur at various network levels, such as port flapping, MAC flapping, or VLAN flapping.
Flapping can affect network availability and performance, as switches must constantly learn and remove MAC addresses, change routing, and forwarding tables, and send packets to the wrong port or all ports in the same VLAN. To combat flapping, the first step is to identify the address, port, or VLAN that is flapping and the switches involved.
The next step is to trace the cause of flapping and examine cables, SFP modules, port configuration, VLAN configuration, spanning tree configuration, and other network issues that can cause flapping. The final step is to address flapping by replacing or repairing problematic cables, SFP modules, or devices, changing or equalizing ports, VLAN, or spanning tree configurations, and using security features or network controls to prevent and detect attacks or storms that can cause flapping.