Configuring a vswitch is a headache, especially for common users. We need to pay special attention to judging the network loop problem, which is also an easy part of the problem. 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 H3CS3050 vswitch as the operating blueprint. We will introduce you in detail the specific steps for using the loop monitoring function to determine the network loop phenomenon.
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-detectionenable" 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 "interfaceGigabitEthernet1/0/16" and click the Enter key. After the switch is configured, the view status of port 16 on the Ethernet is displayed, at the same time, the command line prompt of the switch will automatically become "H3C-GigabitEthernet1/0/16", at the command line prompt again execute the string command "loopback-detectionenable ", 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-detectioncontrolenable 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, you must perform the following configuration switch operations:
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-detectionper-vlanenable ", after you click the Enter key, 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, save the configuration switch parameters. Otherwise, all previous configuration switch operations will be automatically lost when the switch is restarted.
Control Network loop monitoring status
Sometimes, before enabling the loop monitoring function of a switching port, we need to check the loop monitoring status of the corresponding port, if you find that the loopback monitoring function of the corresponding port is already running, you do not need to execute the "loopback-detectionenable" string command again. When viewing the monitoring status of a specific Ethernet port, we can first switch to the view mode of the specific Ethernet port of the switch according to the previous operation, then run the "displayloopback-detection" string command in the corresponding view State. On the displayed page, we can see whether the network loop monitoring function of the specified switch port is enabled, if "Loopback-detectionis running" is displayed on the result page, the network loop monitoring function of the corresponding switch port is enabled successfully. Of course, from this result interface, we can also see other monitoring parameters, such as the time interval of network loop monitoring and the results of network loop monitoring; in other words, if there is a network loop fault in the LAN, we can see from here which switch port has a network loop phenomenon, at this time, the network administrator can check the target switching port based on the monitoring results, which can greatly improve the efficiency of solving the network loop fault.
In the future, when we want to disable the network loop monitoring function of a vswitch, we only need to switch the vswitch background management interface to the System View Mode, execute the "undoloopback-detection" string command at the command line prompt in this status, so that all ports in the switch will be automatically disabled.