A method for eliminating easymesh network loop traffic, network device and storage medium

By monitoring the link status of wired ports in the agent device in the easymesh network and performing ARP detection, the problem of loop traffic generated when the agent device switches the networking mode is solved, and network performance is improved and equipment stable maintenance is achieved.

CN119892718BActive Publication Date: 2025-05-23CHENGDU CHANGHONG NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510365536.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-05-23
Estimated Expiration
2045-03-26

AI Technical Summary

Technical Problem

In easymesh network, when an agent device switches from wireless networking to wired networking, it may lead to the generation of loop traffic, which will affect network performance and device stability, and even cause the entire easymesh network to be disconnected from the uplink network equipment.

Method used

By monitoring the link status of the wired port in the agent device, blocking the uplink wireless port, and detecting whether the access device is an easymesh neighbor through ARP unicast message. If so, disable the wireless port and switch to the wired networking mode. If not, restore the wireless port.

Benefits of technology

It effectively avoids the generation of loop traffic, prevents network disconnection caused by loop traffic exceeding the threshold, and improves the user experience of easymesh networking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892718B_ABST
    Figure CN119892718B_ABST
Patent Text Reader

Abstract

The present invention relates to easymesh networking technology, and discloses a method for eliminating easymesh network loop traffic, network equipment and storage medium, eliminating the loop traffic generated when the agent in the easymesh network switches from a wireless networking mode to a wired networking mode, and avoiding the situation where the entire easymesh network is disconnected from the upstream network device due to the loop traffic. The present invention monitors the link state of the wired port based on the netlink message mechanism between the agent device kernel and the application layer. When a link up event message is monitored, the upstream wireless port is first blocked to avoid generating loop traffic, and an ARP unicast message is sent to the upstream gateway using the corresponding port. If an ARP unicast message reply is received, it is determined that the accessed device is an easymesh neighbor, and the upstream wireless port is disabled and switched to a wired networking mode. Otherwise, it is determined that the accessed device is a common down-hook device, and the blocked upstream wireless port is restored to maintain the original networking mode. The present invention is applicable to various AP products supporting easymesh.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the EasyMesh networking technology, and in particular to a method for eliminating EasyMesh network loop traffic, a network device and a storage medium. Background Art

[0002] When it comes to solving home network coverage issues, EasyMesh is a very common solution. It has a unified and complete networking standard, which enables EasyMesh-supported devices from different brands to form an EasyMesh network through its protocol standards, solving home network coverage issues. At the same time, it also supports flexible networking methods (wired, wireless, or wired and wireless hybrid). Users can choose different networking methods for EasyMesh networking based on their own home environment.

[0003] In the topology of easymesh networking, there are usually two roles: controller (main device) and agent (sub-device). The controller works in routing mode and acts as an uplink gateway, responsible for routing and forwarding the entire network. The agent works in AP mode and is responsible for terminal access and traffic forwarding. The controller communicates with the external network by accessing uplink network devices (such as optical modems).

[0004] For the wired and wireless hybrid easymesh network environment, when an agent switches from wireless networking to wired networking, the physical network forms a loop, which will cause the device to receive messages with its own source MAC, that is, loop traffic. Loop traffic will consume network forwarding performance, especially when the loop traffic is large, it may even cause the device to paralyze. Therefore, the equipment manufacturer will enable the STP protocol (Spanning Tree Protocol) in the upstream network equipment. When the loop traffic in the network is detected to exceed the threshold, the STP protocol is triggered to blacklist the easymesh device directly connected to it for a period of time or disable the physical port that generates the loop for a period of time, so as to suppress the loop traffic. However, the entire easymesh network will be disconnected from the upstream network device, which will affect the user experience of the easymesh network. Summary of the invention

[0005] The technical problem to be solved by the present invention is: to propose a method for eliminating loop traffic in the EasyMesh network, a network device and a storage medium, to eliminate the loop traffic generated when the agent in the EasyMesh network switches from a wireless networking mode to a wired networking mode, and to avoid the situation where the entire EasyMesh network is disconnected from the upstream network device due to the loop traffic.

[0006] The technical solution adopted by the present invention to solve the above technical problems is:

[0007] In one aspect, the present invention provides a method for eliminating loop traffic in an EasyMesh network, comprising the following steps:

[0008] The agent device in the easymesh network monitors the link status of each of its own wired ports;

[0009] When monitoring the wired port link up (establishing a physical link) message and it is currently in the wireless networking state, it temporarily blocks its own uplink wireless port; and sends an ARP (Address Resolution Protocol) unicast from the wired port where the link up event occurs with the controller device's MAC address as the destination address;

[0010] If an ARP unicast reply with the source MAC address of the controller device is received from the wired port where the link up event occurs, the upstream wireless port of the device is disabled, and then the process of switching the wireless networking mode to the wired networking mode is enabled.

[0011] Furthermore, the method for implementing the agent device in the easymesh network to monitor the link status of each of its own wired ports includes:

[0012] The link status of the wired port is monitored in the kernel eth driver of the agent device. When the link status of any wired port of the agent device changes, the link status change message is transmitted to the application layer through the netlink protocol; the easymesh process of the agent device receives the link status change message based on the netlink protocol by opening a preset thread.

[0013] Furthermore, the method also includes:

[0014] If no ARP unicast reply with the source MAC address of the controller device is received from the wired port where the link up event occurs, the blocked uplink wireless port is restored and the link status of each of its wired ports is continued to be monitored.

[0015] In a second aspect, the present invention further provides a network device, which includes a processor and a memory, wherein the memory stores a computer program, and the processor implements the method for eliminating easymesh network loop traffic as described above by executing the computer program.

[0016] In a third aspect, the present invention further provides a storage medium storing a computer program, which, when executed by a processor, implements the method for eliminating loop traffic in the EasyMesh network as described above.

[0017] The beneficial effects of the present invention are:

[0018] The present invention monitors the link status of the wired port based on the netlink message mechanism between the kernel and the application layer of the agent device. When a link up event message is monitored, the upstream wireless port is first blocked to avoid loop traffic generation, and the ARP unicast message sent by the corresponding port to the upstream gateway is used to detect whether the device accessing the wired port of the agent device is an easymesh neighbor. If an ARP unicast message reply is received, it is determined that the accessed device is an easymesh neighbor, so that the upstream wireless port is disabled and switched to a wired networking mode. If no ARP unicast message reply is received, it is determined that the accessed device is a common downstream device, and the original networking mode is maintained by restoring the blocked upstream wireless port.

[0019] This solution can avoid the generation of loop traffic, thereby avoiding the situation where the entire EasyMesh network is disconnected from the upstream network device (such as an optical modem) due to the loop traffic exceeding the threshold in the scenario where the upstream network device (such as an optical modem) has a low tolerance threshold for loop traffic, thereby improving the user experience of EasyMesh networking. The present invention is applicable to various AP products that support EasyMesh. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 The present invention is a flowchart of a method for eliminating loop traffic in an EasyMesh network. DETAILED DESCRIPTION

[0021] The present invention aims to provide a method, network device and storage medium for eliminating loop traffic in the EasyMesh network, eliminating the loop traffic generated when the agent in the EasyMesh network switches from a wireless networking mode to a wired networking mode, and avoiding the situation where the entire EasyMesh network is disconnected from the upstream network device due to the loop traffic. The core idea is: for the EasyMesh network environment of wired and wireless hybrid networking, after the agent device originally working in the wireless networking mode accesses the EasyMesh neighbor through a wired connection, before EasyMesh regenerates the topology, the device can be connected to the EasyMesh neighbor through both a wired and wireless connection, thereby physically forming a loop, which will generate a certain amount of loop traffic.

[0022] If the loop traffic is large, it will consume a lot of network forwarding performance and even cause equipment paralysis. For this reason, equipment manufacturers will enable the STP protocol (Spanning Tree Protocol) in the upstream network equipment (such as optical modems). When the loop traffic in the network is detected to exceed the threshold, the STP protocol is triggered to blacklist the EasyMesh device directly connected to it for a period of time or disable the physical port that generates the loop for a period of time to suppress the loop traffic. However, the entire EasyMesh network will be disconnected from the upstream network device, which will affect the user experience of the EasyMesh network.

[0023] Since different models of optical modems produced by different manufacturers have different tolerance thresholds for loop traffic, if the EasyMesh network is deployed in an environment where the upstream optical modem has very strict loop traffic management, that is, in an environment with a low tolerance threshold for loop traffic, it will be easier to trigger the STP protocol, causing the entire EasyMesh network to be disconnected from the upstream network equipment.

[0024] In view of this, when the agent device working in wireless networking mode detects that any access device (including easymesh neighbors and ordinary downstream devices) is accessed through a wired connection, this solution first blocks the wireless uplink to avoid network loops, and then uses ARP packets to detect whether the access device connected to the agent device is an easymesh neighbor. If so, the uplink wireless port is disabled to keep the link disconnected for the wireless connection, and then the networking mode is switched to wired networking. If it is not an easymesh neighbor, the blocked uplink port is restored to keep the original networking mode unchanged.

[0025] The scheme of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0026] Example

[0027] This embodiment provides a method for eliminating loop traffic in the EasyMesh network. In specific implementation, it is first necessary to add monitoring of the link status of the wired port in the kernel eth driver of the agent device. When the status of any wired port changes, a customized message for transmitting the link status change of the wired port is transmitted to the application layer through the netlink protocol. In the EasyMesh process code of the agent device, a thread is added, and the thread monitors the message of the link status change of the wired port from the kernel based on the netlink protocol.

[0028] On this basis, the method flow for eliminating easymesh network loop traffic in this embodiment can be found in Figure 1 , which includes the following implementation process:

[0029] S1, the agent device monitors the link status of the wired port;

[0030] In this step, the agent device in the easymesh network monitors the link status of each of its own wired ports. When the link status of any wired port of the agent device changes, the link status change message is transmitted to the application layer through the netlink protocol; the easymesh process of the agent device receives the link status change message based on the netlink protocol by opening a preset thread.

[0031] S2, blocking the uplink wireless port when the monitored message meets the judgment conditions;

[0032] In this step, when the agent device monitors the wired port link up (establishing a physical link) message and is currently in a wireless networking state, it temporarily blocks its own uplink wireless port, otherwise it returns to step S1 to continue monitoring.

[0033] That is, as long as a physical link is established on the wired port and it is currently in wireless networking, the uplink wireless port will be temporarily blocked. This can avoid network loops caused by the wired access to the agent device being an EasyMesh neighbor device.

[0034] S3, send ARP unicast to the gateway;

[0035] In this step, a network loop will only occur when the EasyMesh neighbor device is connected to the agent device currently working in wireless networking mode through a wired method, and a network loop will not occur when an ordinary downstream device is connected through a wired method. Therefore, in order to detect whether the device connected to the agent device through a wired method is an EasyMesh neighbor device or an ordinary downstream device, an ARP (Address Resolution Protocol) unicast can be sent from the wired port where the link up event occurs with the MAC address of the controller device as the destination address.

[0036] S4. Determine the access device based on whether the ARP unicast reply is received and take corresponding measures;

[0037] In this step, if an ARP unicast reply with the source MAC address of the controller device is received from the wired port where the link up event occurs, it means that the ARP unicast can be forwarded from the port to the upstream gateway, and it can be determined that the device connected to the agent is an easymesh neighbor device, and it is expected to be networked in a wired manner, so its own upstream wireless port is disabled, and then the process of switching the wireless networking mode to the wired networking mode is enabled. As for the switching from the wireless networking mode to the wired networking mode, it is an existing technology and will not be repeated here.

[0038] On the contrary, if no ARP unicast reply with the source MAC address being the MAC address of the controller device is received from the wired port where the link up event occurs, it means that the ARP unicast cannot be forwarded from the port to the upstream gateway. It can be determined that the device connected to the agent device is an ordinary downstream device (such as a PC, etc.), and the blocked upstream wireless port is restored, the original networking mode is maintained, and the process returns to step S1 to continue monitoring the link status of each of its own wired ports.

[0039] Finally, it should be noted that the above embodiments are only preferred implementations and are not intended to limit the present invention. It should be pointed out that for those skilled in the art, several modifications, equivalent replacements, improvements, etc. can be made without departing from the scope of the present invention and the scope of protection of the claims, and all of these should be included in the protection scope of the present invention.

Claims

1. A method for eliminating easymesh network loop traffic, characterized in that: The following steps are involved: The agent device in the easymesh network monitors the link status of each of its own wired ports; When monitoring the wired port link up message and it is currently in wireless networking state, temporarily block its own uplink wireless port; And send an ARP unicast with the MAC address of the controller device as the destination address from the wired port where the link up event occurs; If an ARP unicast reply with the source MAC address of the controller device is received from the wired port where the link up event occurs, the upstream wireless port of the device is disabled, and then the process of switching the wireless networking mode to the wired networking mode is enabled.

2. A method for eliminating easymesh network loop traffic as claimed in claim 1, characterized in that: The implementation method of the agent device in the easymesh network monitoring the link status of each of its own wired ports includes: The link status of the wired port is monitored in the kernel eth driver of the agent device. When the link status of any wired port of the agent device changes, the link status change message is transmitted to the application layer through the netlink protocol; the easymesh process of the agent device receives the link status change message based on the netlink protocol by opening a preset thread.

3. A method for eliminating easymesh network loop traffic as claimed in claim 1 or 2, characterized in that: The method further includes: If no ARP unicast reply with the source MAC address of the controller device is received from the wired port where the link up event occurs, the blocked uplink wireless port is restored and the link status of each of its wired ports is continued to be monitored.

4. A network device comprising a processor and a memory, wherein a computer program is stored in the memory, characterized in that: The processor implements the method for eliminating easymesh network loop traffic as described in any one of claims 1 to 3 by executing the computer program.

5. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for eliminating easymesh network loop traffic as described in any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Network access method and device, and storage medium

    CN113873612A

  • Networking switching method and device, electronic equipment, storage medium and program product

    CN118316873A