A multi-hop wireless ad-hoc network method based on an intelligent routing device
By using intelligent routing devices in wireless ad hoc networks, the data packet flow and topology structure are monitored in real time, the network port whitelist is generated and the path with the least value of communication generation is selected for data forwarding, the problems of network storm and load imbalance in wireless ad hoc networks are solved, and load balancing and fast topological convergence are achieved.
Patent Information
- Application Number
- CN202211689400.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-12-27
AI Technical Summary
In wireless ad hoc networks, layer 2 loops and layer 3 loops are prone to cause network storms and load imbalance problems, resulting in network resources exhaustion and paralysis.
The multi-wireless ad hoc networking method based on intelligent routing devices is adopted to monitor the flow of data packets and topology in real time, generate and maintain the network port whitelist, and select the path with the least value of communication agent for data forwarding to avoid invalid forwarding and load imbalance.
It effectively avoids network storms and load imbalance problems, shortens network topology convergence time, and realizes load balancing and stable communication between wireless networks.
Smart Images

Figure CN116156567B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular, to a multi-wireless ad-hoc network method based on an intelligent routing device. Background Art
[0002] In local area network communication, network loops are divided into switching loops in the second-layer network and routing loops in the third-layer network. The second-layer loop is formed by a closed loop within or between switches, which can cause abnormal problems such as network storms. The third-layer loop is generally caused by improper routing settings resulting in incorrect routing selection exits, and ultimately manifests as a network loop with TTL (Time to live). Although the network storm caused by the third-layer loop can disappear by itself, it still greatly increases the communication overhead. If these two types of loops occur in networks with limited bandwidth resources such as wireless ad-hoc networks, it is very easy to cause the exhaustion of device resources within the network, resulting in network paralysis.
[0003] Currently, the general solution idea for the second-layer loop is to enable the Spanning Tree Protocol (STP) of the switch, which determines the current network topology by exchanging special protocol packets in real time. When a network loop occurs, STP simply blocks a specific path in the loop to achieve loop resolution. Although STP can solve the physical loop problem caused by introducing redundant links to maintain network robustness, there are still problems such as slow topology convergence time, inability to implement the load balancing function, and resource consumption caused by topology information exchange in wireless networks. Summary of the Invention
[0004] In order to improve at least one of the above technical problems, an object of the present invention is to provide a multi-wireless ad-hoc network method based on an intelligent routing device, abbreviated as a multi-wireless ad-hoc network method, for improving problems such as network storms and uneven load in application scenarios where multiple wireless ad-hoc networks form a loop network.
[0005] To achieve the above object, the technical solution of the present invention provides a multi-wireless ad-hoc network method based on an intelligent routing device, including the following steps:
[0006] Step S1, adding a network interface white list:
[0007] The local routing device receives an ARP packet, grabs and parses the source IP address of the ARP packet;
[0008] Judge whether the source IP address exists in the white list of the local routing device;
[0009] If the source IP address does not exist in the whitelist of the local routing device (where the whitelist of the routing device includes multiple types, namely the self-organizing network interface whitelist and the peer whitelist, and the number of self-organizing network interface whitelists is equal to the number of self-organizing network interfaces), then add it to the whitelist of the corresponding network interface of the local routing device according to the source IP address; among them, the types of network interfaces include self-organizing network interfaces and local device network interfaces, and the number of self-organizing network interfaces is multiple, which are used to connect to the peer routing device through the self-organizing network, and the local device network interface is used to connect to the local device;
[0010] If the source IP address exists in the whitelist of the local routing device, then further determine whether the source IP address exists in the whitelist of another self-organizing network interface connected to the local routing device;
[0011] If the source IP address does not exist in the whitelist of another self-organizing network interface, then the address already exists in the whitelist of the network interface that received the data packet, and no further processing is required. If the source IP address exists in the whitelist of another self-organizing network interface, then move the source IP address to the peer whitelist belonging to the local routing device;
[0012] Step S2, Data forwarding:
[0013] Step S21, In response to the data packet received by the local device network interface of the local routing device, capture and parse the data packet, and determine whether the destination IP address of the data packet exists in any whitelist:
[0014] If the destination IP address of the data packet exists in the whitelist of the local routing device, then send the data packet to the corresponding network interface according to the destination IP address;
[0015] If the destination IP address of the data packet exists in the peer whitelist, then obtain the communication cost value of each communication line of each self-organizing network on the local routing device, and select the communication line with the smaller communication cost value to transmit the data packet;
[0016] If the destination IP address of the data packet does not exist in any whitelist of the local routing device, then add the source IP address of the data packet to the whitelist of the local device network interface, and send the data packet from any network interface;
[0017] Step S22, In response to the data packet received by the self-organizing network interface of the local routing device, capture and parse the data packet, and determine whether the destination IP address of the data packet exists in any whitelist;
[0018] If the destination IP address of the data packet exists in the whitelist of the local routing device, then send the data packet through the corresponding network interface;
[0019] If the destination IP address of the data packet does not exist in the whitelist of the local routing device, and is the address of the networking port that received the data packet, then the destination IP address of the data packet is replaced with the real destination IP address of the data packet, and the data packet is sent out from another self-networking port of the local routing device;
[0020] If the destination IP address of the data packet does not exist in the whitelist of the local routing device, is not the address of the networking port that received the data packet, and the source IP address of the data packet does not exist in the whitelist of the networking port that received the data packet, then the source IP address will be added to the whitelist of the networking port that received the data packet, and sent from another self-organizing network port and the local device port of the local routing device; if the source IP address exists in the whitelist of the networking port that received the data packet, then the data packet will be sent from another self-organizing network port and the local device port of the local routing device.
[0021] The multi-wireless ad hoc network method provided by the technical solution takes into account the limited bandwidth resources of wireless networks and reduces the synchronization data required for the transmission of intelligent routing devices in wireless networks as much as possible. Among them, firstly, the intelligent routing device monitors the flow of various data packets in the loop in real time, and forwards the data packets to their destination devices according to the established rules, intercepts the data packets that do not meet the forwarding rules, and prevents invalid forwarding, thereby achieving network storm immunity. Secondly, by controlling the devices in the wireless ad hoc network to send ARP broadcast packets after booting, the intelligent routing device receives and analyzes the content of the broadcast packets, and completes the maintenance of the relevant information belonging to the networked device. The networked device can use the network to communicate at the first time, thereby ensuring that convergence is completed in a short time. Thirdly, the wireless ad hoc network topology is monitored in real time by the intelligent routing device, and the communication cost between any two nodes in the two ad hoc networks is calculated and updated respectively. If the data service needs to be load balanced, the cost value of the two feasible links is referred to and the link with a smaller cost is selected to send, thereby achieving load balancing between the two ad hoc networks.
[0022] In addition, the multi-wireless ad hoc network method based on an intelligent routing device in the above technical solution provided by the present invention may also have the following additional technical features:
[0023] In the above technical solution, in step S21, the step of obtaining the communication cost value of each communication line passing through each ad hoc network port on the local routing device includes:
[0024] According to the source IP address and destination IP address of the data packet, enumerate all communication lines between two IP addresses;
[0025] According to the communication cost of each device on each communication line, the communication cost value of each communication line is obtained.
[0026] Further, in step S21, the step of selecting a communication line with a small communication cost to transmit data packets includes:
[0027] Obtain the communication cost value between two IP addresses in real time and store it in the communication cost value matrix;
[0028] According to the source IP address and destination IP address of the data packet, read the communication cost values of each communication line in the communication cost value matrix, and select the communication line with a small communication cost value therefrom.
[0029] In the above technical solution, the local routing device is provided with a local device network interface and multiple ad hoc network interfaces. The local device network interface is used to connect local devices in the local network, and the ad hoc network interfaces are used to connect to the peer routing device through the ad hoc network; the peer routing device is provided with a local device network interface and multiple ad hoc network interfaces. The local device network interface is used to connect local devices in the peer network, and the ad hoc network interfaces are used to connect to other peer routing devices or local routing devices through the ad hoc network.
[0030] Further, the local routing device, a peer routing device, and two ad hoc networks form a communication loop.
[0031] In summary, the multi-radio ad hoc network method based on the intelligent routing device provided by the present invention has at least the following beneficial effects:
[0032] 1) Using the present invention for loop communication in two (or more) wireless networks can avoid network storm problems caused by invalid forwarding of various broadcast data.
[0033] 2) Using the method of network topology monitoring when the network access device is powered on can ensure that the network access device completes the routing plan in the shortest time and greatly shortens the convergence time.
[0034] 3) In view of the limited resources of the wireless network, the wireless communication cost value is added as a reference for load balancing. When users use the present invention for multi-service and large-bandwidth communication, the intelligent routing device can automatically achieve effective load balancing among multiple wireless networks, ensuring the stability, real-time performance, and data correctness of multi-service transmission.
[0035] The additional aspects and advantages of the present invention will become obvious in the following description part, or be understood through the practice of the present invention. Description of the Drawings
[0036] The above and / or additional aspects and advantages of the present invention will become obvious and easy to understand from the description of the embodiments in conjunction with the following drawings, where:
[0037] Figure 1 is a schematic connection diagram of an intelligent routing device according to some embodiments of the present invention.
[0038] Figure 2 It is a flowchart of the step of adding a network port whitelist in the multi-radio ad-hoc network method according to some embodiments of the present invention.
[0039] Figure 3 It is a flowchart of the process of receiving and forwarding data by network port 3 in the multi-radio ad-hoc network method according to some embodiments of the present invention.
[0040] Figure 4 It is a flowchart of the process of receiving and forwarding data by network port 1 or network port 2 in the multi-radio ad-hoc network method according to some embodiments of the present invention.
[0041] Figure 5 It is a schematic diagram of the ad-hoc network loop communication connection according to some embodiments of the present invention.
[0042] Figure 6 It is a schematic diagram of the state where the local device A1 sends data to the ad-hoc network device C1 according to some embodiments of the present invention.
[0043] Figure 7 It is a schematic diagram of the state where the local device A1 sends data to the local device B1 according to some embodiments of the present invention.
[0044] Figure 8 It is a schematic diagram of the state where the ad-hoc network device C1 sends data to the local device A1 according to some embodiments of the present invention.
[0045] Figure 9 It is a schematic diagram of the state where the ad-hoc network device C1 sends data to the ad-hoc network device D1 according to some embodiments of the present invention. Detailed implementation manners
[0046] In order to more clearly understand the above objects, features and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation manners. It should be noted that, without conflict, the embodiments of the present application and the features in the embodiments can be combined with each other.
[0047] In the following description, many specific details are set forth in order to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited by the specific embodiments disclosed below.
[0048] Some embodiments of the present application provide an intelligent routing device.
[0049] The intelligent routing device is deployed in a wireless loop, and the number of network interfaces of the device can be expanded according to the usage scenario. While ensuring the smoothness of the loop, the device records in real time the source and destination address information of ARP packets that appear on each network interface of the device when all devices in the network are powered on for the first time. After internal intelligent analysis of the device, a dedicated white list is generated and maintained for each network interface. All data forwarded by the device will be verified against the white list to ensure that the data is sent through the correct interface, thus preventing network storms caused by invalid data forwarding. For the passing scenario with redundant links, the device also calculates and maintains the communication cost values of all nodes in each wireless network, and sends the received data packet through the link with a smaller cost value after receiving it. Only the white list information of the local address and other information need to be periodically exchanged between intelligent routing devices as a reference for the peer to correct the white list, with extremely small data volume and almost no occupation of wireless resources.
[0050] Specifically, as Figure 1 shown, the intelligent routing device uses the CPU as the core and is equipped with multiple network interfaces as external data interfaces according to the usage requirements. Among them, one network interface is connected to the local device, and the remaining network interfaces are connected to the ad-hoc network devices, as Figure 1 shown.
[0051] Based on the above intelligent routing device, the present invention also provides a multi-wireless ad-hoc network method. The number of intelligent routing devices is multiple, one is used as the local routing device, and the rest are used as peer routing devices. Among them, as Figures 2 to 9 shown, the local intelligent routing device is simply referred to as device A, and the peer intelligent routing device is simply referred to as device B.
[0052] The multi-wireless ad-hoc network method includes two major parts: adding the network interface white list and data forwarding.
[0053] I. The white list includes three types: the local device white list, the ad-hoc network device white list, and the peer device white list. Among them, the peer device refers to the local device connected to the intelligent routing device at the other end of the loop. The white list addition process is as Figure 2 shown.
[0054] 1) Local device white list: After the local device is powered on, it sends an ARP packet to network interface 3 of device A. The CPU captures and parses the source IP address (abbreviated as the source address) of the ARP packet and adds it to the white list of network interface 3. The white list of network interface 3 is added according to this rule.
[0055] 2) Ad-hoc network device white list: After the ad-hoc network device is connected to ad-hoc network 1(2), it sends an ARP packet to the corresponding network interface 1(2) of device A. The CPU captures and parses the source IP address of the ARP packet and adds it to the white list of network interface 1(2). The white list of ad-hoc network 1(2) is added according to this rule.
[0056] 3) Whitelist of peer devices: After the local device connected to Device B powers on, it sends an ARP packet that reaches the network port 3 of Device B. Device B sends the ARP packet to the two wireless ad hoc networks 1 and 2 simultaneously through its network ports 1 and 2, and finally reaches the network ports 1 and 2 of Device A. Since the delays of the two wireless networks are inconsistent and both are in milliseconds, the ARP packets with the same source IP address reach the network ports 1 and 2 at different times with a very small difference. According to this feature, after screening, the source IP address of the ARP packet is recorded in the whitelist of peer devices of Device A. Subsequently, Device A forwards the ARP packet to network port 3. The whitelist of peer devices is added according to this rule.
[0057] II. The data forwarding rules are divided into the forwarding rules of network port 3 connected to the local device and the forwarding rules of network ports 1 and 2 connected to the ad hoc network devices. Data outside the rules is not forwarded. Among them, the forwarding rules of network port 3 will affect the load balancing between the two ad hoc networks and the communication cost value needs to be calculated. Device A will regularly access the topology information data stored in the two connected ad hoc networks, and calculate the communication cost value between any two nodes in real time according to the communication quality of all links in the two wireless networks, and store them in the communication cost value matrices of ad hoc networks 1 and 2 respectively.
[0058] 1. Forwarding rules of network port 3: After receiving a data packet, network port 3 performs packet capture and parsing. If the destination address of the data packet is an address in the whitelist of network port 1(2), it is sent from network port 1(2); if the destination address is an address in the whitelist of peer devices, the communication cost value of communicating through the two ad hoc networks is queried, and the one with the smaller cost is selected and sent; if the data packet is an ARP packet and the source address is an address in the whitelist of network port 3, the data packet is sent from both network ports 1 and 2.
[0059] 2. Forwarding rules of network port 1(2): After receiving a data packet, network port 1(2) performs packet capture and parsing. If the destination address of the data packet is an address in the whitelist of network port 3, it is sent from network port 3; if the destination address is an address in the whitelist of network port 2(1), it is sent from network port 2(1); if the destination address is the address of network port 1(2) itself and the source address is an address in the whitelist of peer devices, the destination address of the data packet is replaced with the real source address attached in the data packet, and the data packet is sent from network port 2(1); if the data packet is an ARP packet and the source address is an address in the whitelist of network port 1(2), the data packet is sent from both network ports 2(1) and 3.
[0060] The intelligent routing devices within the loop maintain the whitelist information required for their own work according to the above rules, and forward according to the forwarding rules of their respective network ports. Data packets that do not conform to the forwarding rules are not forwarded, thus avoiding network storms caused by invalid data forwarding. The two intelligent routing devices periodically exchange their own whitelist information and network port-related information to ensure information synchronization between the two parties and prevent misjudgment of the intelligent routing devices caused by network fluctuations in the wireless ad hoc network.
[0061] The following describes the multi - wireless ad - hoc network method based on an intelligent routing device in some embodiments of the present invention with reference to the accompanying drawings through some specific embodiments.
[0062] Taking the loop formed by two ad - hoc networks as an example, the connection relationship is as Figure 5 shown. The wireless ad - hoc networks C and D and the intelligent routing devices A and B form a central loop network. The wireless ad - hoc networks are respectively connected to the wireless user devices within their own networks, and the third network port of the intelligent routing device is connected to multiple local devices through a switch.
[0063] The following takes the intelligent routing device A as an example to analyze the working mode of the present invention:
[0064] Embodiment 1
[0065] As Figure 5 shown, after the local devices (A1 - AN) are powered on, they send out ARP packets, which reach the network port 3 of the intelligent routing device A through switch A. At this time, the source IP address of the ARP packet is recorded in the whitelist of network port 3. Subsequently, the intelligent routing device A forwards the ARP packet to network ports 1 and 2 simultaneously, and enters the ad - hoc networks C and D respectively. The whitelists of network port 3 are added according to this rule.
[0066] Embodiment 2
[0067] As Figure 5 shown, after the devices in the ad - hoc network C (D) are powered on, they send out ARP packets, which reach the network port 1 (2) of the intelligent routing device A through the wireless network C (D). At this time, the source IP address of the ARP packet is recorded in the corresponding whitelist of network port 1 (2). Subsequently, the intelligent routing device A forwards the ARP packet to network ports 2 (1) and 3, and enters the ad - hoc network D (C) and the local network A respectively. At this time, the network port 2 (1) of the intelligent routing device B will receive this ARP packet. Since the ARP packet does not conform to the forwarding rule (the source address belongs to the address in the whitelist of network port 1 (2)), it is not forwarded, thus interrupting the invalid loop. The whitelists of network ports 1 and 2 are added according to this rule.
[0068] Embodiment 3
[0069] As Figure 5As shown, after the devices in the local network B are powered on, they send out ARP packets, which are simultaneously sent to the wireless networks C and D through the switch and the intelligent routing device B, and finally reach the network ports 1 and 2 of the intelligent routing device A. Since the delays of the two wireless networks are inconsistent and are both in milliseconds, the ARP packets with the same source IP address reach the network ports 1 and 2 at inconsistent times and with a very small difference. This ARP packet meets the characteristics of the peer device whitelist screening, so its source IP address is recorded in the peer device whitelist of the intelligent routing device A. Subsequently, the intelligent routing device A forwards the ARP packet to the network port 3. All the peer device whitelists belonging to the intelligent routing device A are added according to this rule.
[0070] Embodiment 4
[0071] As Figure 5 shown, the intelligent router A periodically accesses the wireless ad-hoc network construction information data existing in the devices of the ad-hoc networks C0 and D0, and according to the communication quality of all the links in the two networks, calculates the communication cost values between any two nodes in real time and stores them in the cost value matrices of the ad-hoc networks C and D respectively.
[0072] In addition, after the two intelligent routing devices complete the analysis and recording of the information required for their own work according to the above working mode, the network enters the normal communication stage. The following analyzes the process of data reaching the destination from different starting points according to the forwarding rules:
[0073] Embodiment 5
[0074] As Figure 6 shown, the data of the local device A1 is sent to the ad-hoc network device C1 (similarly for sending to the device D1)
[0075] The local device A1 packs the data with its own IP address as the source address and the address of the ad-hoc network device C1 as the destination address and sends it to the switch A. After the data reaches the network port 3 of the intelligent routing device A, it analyzes the two IP address information in the data packet, and resolves that the source address of the data packet belongs to the whitelist of the network port 3 and the destination address belongs to the whitelist of the network port 1, which meets the forwarding rules. At this time, the intelligent routing device A queries the communication cost values through both sides of the loop (Route A: intelligent routing device A -> ad-hoc network C0 -> ad-hoc network C1, Route B: intelligent routing device A -> ad-hoc network D0 -> intelligent routing device B -> ad-hoc network C1). If the cost value of Route A is smaller, it is sent out from the network port 1 and finally reaches the ad-hoc network device C1. If the cost value of Route B is smaller, the destination IP address in the data packet is replaced with the IP address of the network port 2 of the intelligent routing device B, and the source and destination addresses are attached to the data packet, and it is sent to the intelligent routing device B through the ad-hoc network D. After the intelligent routing device B receives the data packet at the network port 2, it resolves that the source address of the data packet belongs to the peer device whitelist and the destination address is the IP of this network port, then restores the destination address of the data packet to the original state, removes the attached bits and sends it out from the network port 1, and finally reaches the ad-hoc network device C1.
[0076] Example 6
[0077] As Figure 7 shown, the local device A1 packs and sends data to the switch A with its own IP address as the source address and the address of the ad-hoc network device A1 as the destination address. After the data arrives at port 3 of the intelligent routing device A, it analyzes the two IP address information in the data packet and resolves that the source address of the data packet belongs to the whitelist of port 3 and the destination address belongs to the whitelist of the peer device, which conforms to the forwarding rule. At this time, the intelligent routing device A queries the communication cost values of the wireless transmission parts on both sides of the loop (Route A: intelligent routing device A -> ad-hoc network C0 -> ad-hoc network C -> intelligent routing device B -> local device B1, Route B: intelligent routing device A -> ad-hoc network D0 -> ad-hoc network D -> intelligent routing device B -> local device B1). If the cost value of Route A is smaller, it is sent from port 1. If the cost value of Route B is smaller, it is sent from port 2, and finally it reaches the local device B1.
[0078] Example 7
[0079] As Figure 8 shown, the data of the ad-hoc network device C1 is sent to the local device A1.
[0080] The ad-hoc network device C1 packs and sends data to port 1 of the intelligent routing device A via the ad-hoc network C with its own IP address as the source address and the address of the local device A1 as the destination address. The intelligent routing device A resolves that the source address of the data packet belongs to the whitelist of port 1 and the destination address belongs to the whitelist of port 3, which conforms to the forwarding rule, and sends the data packet from port 3 to reach the local device A1. Due to the limitation of the ad-hoc network working mode, the data packet of the ad-hoc network device C1 will only be sent to the ad-hoc network device C0, so there is only one route for such data forwarding.
[0081] Example 8
[0082] As Figure 9 shown, the data of the ad-hoc network device C1 is sent to the ad-hoc network device D1.
[0083] The ad-hoc network device C1 packs and sends data to port 1 of the intelligent routing device A via the ad-hoc network C with its own IP address as the source address and the address of the ad-hoc network device D1 as the destination address. The intelligent routing device A resolves that the source address of the data packet belongs to the whitelist of port 1 and the destination address belongs to the whitelist of port 2, which conforms to the forwarding rule, and sends the data packet from port 2 to reach the ad-hoc network device D1. Due to the limitation of the ad-hoc network working mode, the data packet of the ad-hoc network device C1 will only be sent to the ad-hoc network device C0 (or C_0), so there is only one route for such data forwarding.
[0084] In summary, in view of the characteristics of wireless ad-hoc network communication applications, the present invention realizes load balancing and fast topology convergence between two wireless networks by analyzing the network topology and wireless network load in real time, and forwarding data to the destination device along the path with the minimum cost. At the same time, since the device of the present invention analyzes the data flow in real time and filters the data packets that do not conform to the forwarding rules, it eliminates the possibility of network storms occurring within the loop.
[0085] In the present invention, the term "a plurality of" means two or more, unless otherwise clearly defined. Terms such as "installed", "connected", "coupled", "fixed" and the like should be construed in a broad sense. For example, "connected" can be a fixed connection, a detachable connection, or an integral connection; "coupled" can be a direct connection or an indirect connection through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0086] In the description of this specification, the descriptions of terms such as "one embodiment", "some embodiments", "specific embodiments" and the like mean that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0087] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A multi-hop wireless ad-hoc network method based on an intelligent routing device, characterized in that, it includes the following steps: Step S1, adding a network port whitelist: The local routing device receives an ARP packet, grabs and parses the source IP address of the ARP packet; Judge whether the source IP address exists in the whitelist of the local routing device; If the source IP address does not exist in the whitelist of the local routing device, add the source IP address to the whitelist of the corresponding network port of the local routing device; wherein, the types of the network ports include ad-hoc network ports and local device network ports, and the number of the ad-hoc network ports is multiple, which are used to connect to the peer routing device through the ad-hoc network, and the local device network port is used to connect to the local device; If the source IP address exists in the whitelist of the local routing device, further judge whether the source IP address exists in the whitelist of another ad-hoc network port connected to the local routing device; If the source IP address does not exist in the whitelist of another ad-hoc network port, the address already exists in the whitelist of the network port that received the data packet and no further processing is required. If the source IP address exists in the whitelist of another ad-hoc network port, move the source IP address to the peer whitelist belonging to the local routing device; Step S2, data forwarding: Step S21, in response to the data packet received by the local device network port of the local routing device, capture and parse the data packet, and judge whether the destination IP address of the data packet exists in any whitelist; If the destination IP address of the data packet exists in the whitelist of the local routing device, send the data packet to the corresponding network port according to the destination IP address; If the destination IP address of the data packet exists in the peer whitelist, obtain the communication cost value of each communication line of each ad-hoc network on the local routing device, and select the communication line with the smaller communication cost value to transmit the data packet; If the destination IP address of the data packet does not exist in any whitelist of the local routing device, add the source IP address of the data packet to the whitelist of the local device network port, and send the data packet from any network port; Step S22, in response to the data packet received by the ad-hoc network port of the local routing device, capture and parse the data packet, and judge whether the destination IP address of the data packet exists in any whitelist; If the destination IP address of the data packet exists in the whitelist of the local routing device, send the data packet through the corresponding network port according to the destination IP address; If the destination IP address of the data packet does not exist in the whitelist of the local routing device and is the address of the network port that received the data packet itself, replace the destination IP address of the data packet with the real destination IP address of the data packet, and send the data packet from another ad-hoc network port of the local routing device; If the destination IP address of the data packet does not exist in the whitelist of the local routing device, is not the address of the network interface of the network where the data packet is received, and the source IP address of the data packet does not exist in the whitelist of the network interface of the network where the data packet is received, then add the source IP address to the whitelist of the network interface of the network where the data packet is received, and send it from another self-organizing network interface of the local routing device and the local device network interface; if the source IP address exists in the whitelist of the network interface of the network where the data packet is received, then send the data packet from another self-organizing network interface of the local routing device and the local device network interface.
2. The multi-radio self-organizing network method based on an intelligent routing device according to claim 1, characterized in that in step S21, the steps of obtaining the communication cost value of each communication line of each self-organizing network on the local routing device include: According to the source IP address and destination IP address of the data packet, enumerate all communication lines between the two IP addresses; According to the communication costs of each device on each communication line, obtain the communication cost values of each communication line.
3. The multi-radio self-organizing network method based on an intelligent routing device according to claim 2, characterized in that in step S21, the steps of selecting a communication line with a small communication cost value to transmit the data packet include: Obtain the communication cost value between two IP addresses in real time and store it in the communication cost value matrix; According to the source IP address and destination IP address of the data packet, read the communication cost values of each communication line in the communication cost value matrix, and select a communication line with a small communication cost value from them.
4. The multi-radio self-organizing network method based on an intelligent routing device according to any one of claims 1 to 3, characterized in that The local routing device is provided with a local device network interface and a plurality of self-organizing network interfaces. The local device network interface is used to connect local devices in the local network, and the self-organizing network interface is used to connect to the peer routing device through self-organization; The peer routing device is provided with a local device network interface and a plurality of self-organizing network interfaces. The local device network interface is used to connect local devices in the peer network, and the self-organizing network interface is used to connect to other peer routing devices or the local routing device through self-organization.
5. The multi-radio self-organizing network method based on an intelligent routing device according to claim 4, characterized in that The local routing device, one of the peer routing devices, and two self-organizations form a communication loop.
Citation Information
Patent Citations
Routing method for linear topology wireless ad hoc network
CN110831104A
Multi-account gateway
US10848423B1