In large-scale LAN networks, network channels are often severely congested. There are many causes of this fault, such as virus attacks on the network, hardware damage on the network device, and transmission bottleneck on the network port. However, according to the statistical probability of network congestion, the locations that have been changed or changed in the network are most likely to fail, because frequent network changes can easily lead to network loops, network congestion caused by network loops is often concealed, which is not conducive to the efficient troubleshooting of faults. Can we find a suitable solution to effectively solve the network channel congestion caused by the network loop? In fact, with the clever configuration of the switch's loop monitoring function, we can quickly determine whether there is a network loop in the LAN, so that the fault caused by the network loop can be quickly solved!
How to judge the network loop
Because almost all newly purchased switches support the port loop monitoring function, we can use this function to automatically determine whether a network loop occurs on the specified communication port. Once the loop monitoring function is enabled on the specified Ethernet communication port, the switch device can automatically and periodically scan and monitor all communication ports to determine whether the communication port has a network loop. If a switch port is monitored as a network loop, the switch port is automatically in the loop monitoring status, according to the switch port parameter settings and port type, the switch will automatically shut down the specified switch port or automatically report the log information of the corresponding port. In the future, we only need to view the log information or according to the port enabling status, you can quickly determine whether a network loop exists in the LAN. Now, this article takes the H3C S3050 vswitch as the operating blueprint and describes the specific configuration steps for judging the network loop phenomenon by using the loop monitoring function.
Enable port loop monitoring
To enable the switch to automatically determine whether a network loop exists in the local LAN, We need to enable the port loop monitoring function of the switch and enable the port loop monitoring control function. However, by default, these functions are all disabled. You need to manually configure the switch to enable the monitoring function of the specified port and the controlled function of the port.
When you enable the port loop monitoring function of a vswitch, you can log on to the vswitch background management page as a system administrator and enter the string "sys" at the command line prompt ", click the Enter key to switch the switch to the system view. Then, in the System View, run the "loopback-detection enable" string command ", in this way, the global port loop monitoring function of the vswitch is enabled successfully.
Next, we also need to enable the loop monitoring function of the specified Ethernet switch port of the switch. For example, if we want to enable the loop monitoring function of the Ethernet 16 port, in the system view of the switch, enter the string command "interface GigabitEthernet 1/0/16" and click the Enter key. Then, the interactive machine configuration status enters the view of port 16 of the Ethernet, at the same time, the command line prompt of the switch will automatically change to "H3C-GigabitEthernet1/0/16". At this command line prompt, run the string command "loopback-detection enable" again ", in this way, the switch's Ethernet 16 port loopback monitoring function is successfully enabled;
Next, we also need to enable the network loop monitoring control function for both the Hybrid port and the Trunk port in the Ethernet port 16 view. When this function is enabled, we just need to execute the string command loopback-detection control enable at the H3C-GigabitEthernet1/0/16 command line prompt.
Loop monitoring for different VLANs
With the above configuration, the switch system can only perform network loop monitoring in the default VLAN of the Hybrid and Trunk ports under the specified Ethernet port, but cannot perform automatic monitoring on other VLANs, in this way, if there is a network loop in other virtual working subnets in the LAN, the switch still cannot be automatically determined. Therefore, we need to make appropriate settings so that the switch system can automatically perform network loop monitoring operations on other VLANs. For example, to enable the switch to perform network loop monitoring on all VLANs of the Hybrid port and the Trunk port under the Ethernet 16 port, perform the following Configuration:
First switch to System View Mode, then enter Ethernet port 16 view, at the H3C-GigabitEthernet1/0/16 command line prompt, enter the string command "loopback-detection per-vlan enable" and click the Enter key. Then, the switch system can perform network loop monitoring in all VLANs to which the Hybrid and Trunk ports belong.
Of course, after all the preceding string commands are executed successfully, we also need to use the "quit" command to exit the System View status of the switch, and then run the "save" command, you can save the port configuration parameters of a vswitch. Otherwise, all the previous configuration operations will be automatically lost when the vswitch is restarted once in the future.