Mesh network-based cross-segment communication method and system
Patent Information
- Application Number
- CN202611351522.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-02
- Publication Date
- 2026-11-03
AI Technical Summary
In wireless mesh networks, the inability to establish a valid mapping relationship between IP addresses leads to the inability to correctly locate target nodes during cross-segment communication, resulting in data packets not being forwarded correctly or being dropped directly, causing communication interruptions.
An extended address resolution mapping table is built in the Mesh node to store the first mapping relationship between IP address and Mesh node identifier, and the second mapping relationship between MAC address and Mesh node identifier. The mapping relationship is generated and maintained by passively learning through business packets, and the mechanism switches to the backup addressing mechanism based on MAC address when the target IP address cannot be matched.
It enables adaptive forwarding of Mesh networks in cross-network segment environments, avoiding communication interruptions caused by IP unreachability, improving the reliability and continuity of cross-network segment communication, and enabling transparent data transmission for terminal devices without modification, adapting to topology changes and dynamic terminal access.
Smart Images

Figure CN123035520A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wireless communication technology, and more specifically to a cross-segment communication method and system based on a mesh network. Background Technology
[0002] In wireless mesh network applications, mesh nodes typically connect to terminal devices within a local area network (LAN) via a router to enable data forwarding and communication. In a typical network topology, mesh nodes connect to the router's WAN interface, while terminal devices connect to the same router's LAN interface, thus creating a cross-network segment communication environment.
[0003] In this network structure, different terminal devices may be located on different IP network segments. Network communication relies on routers and ARP (Address Resolution Protocol) to resolve and map IP addresses to MAC addresses. However, in real-world network environments, because routers typically enable network address translation mechanisms and isolate different broadcast domains, ARP broadcast messages cannot propagate across network segments, resulting in the target device's link-layer address not being correctly resolved during cross-segment communication.
[0004] In this scenario, after a data packet is forwarded from the source router to a Mesh node, the Mesh node typically performs routing or mapping queries based on the destination IP address. However, due to the lack of an effective mapping relationship between the destination IP address and the Mesh node in a cross-network segment environment, the Mesh node cannot locate the destination node using the IP address. This results in data packets not being forwarded correctly or even being dropped directly, causing cross-network segment communication interruptions.
[0005] Therefore, there is an urgent need for a communication method that can still locate the target node even when IP mapping is unreachable. Summary of the Invention
[0006] In view of this, the present invention provides a cross-network segment communication method based on Mesh network to solve the problem that in cross-network segment or cross-broadcast domain network environments, the Mesh node cannot accurately locate the target node due to the inability to establish an effective mapping relationship between IP addresses, thereby causing interruption or dropping of data packet forwarding.
[0007] This invention provides a cross-segment communication method based on a mesh network, comprising:
[0008] An extended address resolution mapping table is constructed in each Mesh node. The extended address resolution mapping table is used to store the first mapping relationship between IP address and Mesh node identifier, and the second mapping relationship between MAC address and Mesh node identifier.
[0009] The extended address resolution mapping table is used to establish the association between terminal device addresses and Mesh nodes, in order to support data addressing in cross-broadcast domain environments.
[0010] The extended address resolution mapping table uses a key-value pair storage structure, with IP address or MAC address as the index key and Mesh node identifier as the mapping value for storage and retrieval.
[0011] The first mapping relationship is used to locate the target Mesh node based on its IP address;
[0012] The second mapping is used to locate the target Mesh node based on its MAC address when the first mapping fails to match.
[0013] The extended address resolution mapping table is continuously maintained during the operation of the mesh network. Its update process is synchronized with the data packet forwarding process, enabling the mapping relationship to be adjusted in real time as terminal devices connect, migrate, or the network topology changes, thereby ensuring the timeliness and consistency of the mapping relationship. Through this mechanism, mesh nodes can gradually build address and node association relationships covering the entire network without manual configuration or centralized control.
[0014] The first mapping relationship is generated in the following way:
[0015] When a Mesh node receives an ARP packet, it parses the sender's IP address in the ARP packet and associates the sender's IP address with the current Mesh node identifier, thus forming the first mapping relationship.
[0016] The second mapping relationship is generated in the following way:
[0017] When a Mesh node receives a data packet through a wired network interface, it extracts the source MAC address and associates the source MAC address with the current Mesh node identifier.
[0018] When a Mesh node receives a Mesh network air interface protocol message through the wireless air interface, it extracts the source MAC address and the sending Mesh node identifier from the preset extended fields, and establishes or updates the second mapping relationship accordingly.
[0019] The mapping relationships mentioned above are all obtained through passive learning of business messages, without relying on a centralized controller or additional control signaling.
[0020] After receiving the data packet to be sent through the wired network interface, the source Mesh node parses the data packet to obtain the target IP address and target MAC address.
[0021] The parsing process is only used to extract address information and does not change the original data packet format generated by the terminal device.
[0022] The source Mesh node first uses the target IP address as an index to look up the first mapping relationship in the extended address resolution mapping table;
[0023] When the query is successful, the existing wireless routing mechanism of the Mesh network is used for encapsulation and forwarding.
[0024] If the query fails, the target MAC address is used as an index to query the second mapping relationship in the extended address resolution mapping table.
[0025] In actual cross-network segment communication, when the target IP address cannot be matched in the first mapping relationship, the data forwarding process is not terminated. Instead, an alternative addressing path is triggered via the target MAC address, thereby avoiding communication interruption caused by ARP resolution failure due to cross-broadcast domains. This dual-path addressing mechanism enables the Mesh network to have adaptive forwarding capabilities under different addressing conditions, improving data reachability in complex network environments.
[0026] After determining the target Mesh node identifier, the source Mesh node encapsulates the received complete raw Layer 2 data frame as the data payload into the Mesh network air interface protocol message.
[0027] During the encapsulation process, the source MAC address, destination MAC address, and data payload content of the original Layer 2 data frame remain unchanged, and the source MAC address and destination MAC address information are written into the reserved fields of the Mesh network air interface protocol message.
[0028] The reserved fields are set in the extended field area of the Mesh network air interface protocol message header, and carry the source MAC address and destination MAC address respectively in the form of Layer 2 address information fields.
[0029] Meanwhile, by carrying source MAC address information in the air interface protocol message, the receiving Mesh node can synchronously learn and supplement the second mapping relationship during the service forwarding process, thereby realizing the distributed propagation and expansion update of the mapping relationship in the network, further reducing the dependence on control signaling.
[0030] After receiving the Mesh network air interface protocol message, the target Mesh node parses it and extracts the data payload and the source MAC address and target MAC address information from the reserved fields.
[0031] The original Layer 2 data frame is recovered based on the data payload, and the recovered data packet is forwarded to the target terminal device through the wired network interface.
[0032] After recovering the original data packet, the target Mesh node does not modify or process the source MAC address, destination MAC address, or upper-layer business data content of the original data packet.
[0033] During the data packet reception and forwarding process, each Mesh node dynamically updates the second mapping relationship in the extended address resolution mapping table based on the source MAC address and the sender Mesh node identifier in the packet.
[0034] When a mapping relationship does not exist, a new mapping record is created; when a mapping relationship already exists, its timestamp or validity identifier is updated to ensure that the mapping relationship is consistent with the current network topology.
[0035] A multi-node cross-segment communication system based on a mesh network includes:
[0036] The extended address resolution mapping table management module is used to maintain the first mapping relationship between IP addresses and node identifiers and the second mapping relationship between MAC addresses and node identifiers;
[0037] The message parsing and judgment module is used to parse the received data packets and perform a priority query based on the target IP address. If the target IP address is not matched, the module switches to the target MAC address for backup query.
[0038] The message encapsulation and forwarding module is used to encapsulate the data packet into a Mesh network air interface protocol message and forward it via the wireless air interface after finding the target node identifier.
[0039] Beneficial Effects: This invention constructs a dual mapping addressing mechanism based on IP addresses and MAC addresses to achieve adaptive forwarding of Mesh networks in cross-network segment environments. It offers the following advantages: When a valid mapping relationship cannot be established with the target IP address, it automatically switches to a backup addressing mechanism based on MAC addresses, eliminating reliance on cross-broadcast domain ARP resolution capabilities for data packets. This avoids communication interruptions caused by IP unreachability, improving the reliability and continuity of cross-network segment communication. By fully encapsulating and restoring the original Layer 2 data frames, the original communication structure remains unchanged during data transmission within the Mesh network. Terminal devices can complete cross-network segment communication without being aware of the Mesh network's existence, achieving transparent forwarding of data packets. Furthermore, by combining wired interface learning with wireless air interface learning, Mesh nodes can dynamically maintain the mapping relationship between IP addresses, MAC addresses, and node identifiers, enabling the network to adapt to topology changes and dynamic terminal access. Attached Figure Description
[0040] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0041] Figure 1 This is a flowchart illustrating a cross-segment communication method based on a Mesh network according to an embodiment of the present invention.
[0042] Figure 2 Topology diagram for multi-node cross-network segment communication application scenarios;
[0043] Figure 3 This is a schematic diagram illustrating the process of cross-network segment communication between two points directly connected via a router in the existing technology;
[0044] Figure 4 This is a topology configuration diagram of two-point cross-segment communication in a Mesh network according to an embodiment of the present invention;
[0045] Figure 5 This is a flowchart illustrating the process of learning and saving the MAC-node identifier mapping relationship for network ports according to an embodiment of the present invention.
[0046] Figure 6 This is a flowchart illustrating the air interface learning and saving of MAC-node identifier mapping relationships according to an embodiment of the present invention;
[0047] Figure 7 This is a flowchart illustrating the process of finding an identifier based on the MAC address during air interface packet assembly, as described in an embodiment of the present invention.
[0048] Figure 8 This is a flowchart illustrating the air interface unpacking and MAC address restoration according to an embodiment of the present invention.
[0049] Figure 9 This is a structural block diagram of the communication system of the present invention. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] According to an embodiment of the present invention, a cross-segment communication method based on a Mesh network is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0052] Example 1: In this example, a cross-segment communication method based on a mesh network is provided to achieve transparent data transmission between terminal devices in different broadcast domains or different IP network segments in a wireless mesh self-organizing network environment. This method is applicable to wireless communication networks containing multiple mesh nodes. Each mesh node is connected to the local area network via a wired network interface and forms a mesh network topology through a wireless air interface. Each mesh node can perform functions such as data packet parsing, mapping relationship learning, air interface encapsulation, and data forwarding.
[0053] Figure 1 A flowchart of a cross-segment communication method based on a Mesh network provided in an embodiment of the present invention is shown below. Figure 1 As shown, the method includes the following steps.
[0054] Step S101: Construct an extended address resolution mapping table
[0055] To enable data packet addressing across network segments, this embodiment first establishes an extended address resolution mapping table in each Mesh node. The extended address resolution mapping table records the correspondence between terminal device address information and Mesh node identifiers, providing a basis for subsequent target node location of data packets.
[0056] In this embodiment, the extended address resolution mapping table includes at least the following two types of mapping relationships:
[0057] The first mapping relationship between IP addresses and Mesh node identifiers;
[0058] A second mapping relationship between MAC addresses and Mesh node identifiers.
[0059] The first mapping relationship is used to support the regular IP addressing process in the Mesh network; the second mapping relationship is used to determine the target Mesh node based on the MAC address when the first mapping relationship fails, providing backup addressing capability for cross-broadcast domain communication.
[0060] In this embodiment, the extended address resolution mapping table is not established through manual configuration or static distribution. Instead, it is dynamically established and maintained by each mesh node through continuous learning of service packets during the operation of the mesh network. As the network continues to operate, each mesh node continuously receives data packets from terminal devices and continuously supplements and updates the mapping relationship during normal data communication, thereby gradually forming an extended address resolution mapping table covering the entire mesh network without relying on a centralized controller or additional control signaling.
[0061] The mapping relationship learning in this embodiment includes two parts: mapping learning based on wired network interfaces and mapping learning based on wireless air interfaces.
[0062] Mapping learning based on wired network interfaces:
[0063] When any Mesh node receives a data packet from the local area network through its own wired network interface, it parses the data packet and establishes a corresponding mapping relationship based on the packet type.
[0064] If the received data packet is an ARP packet, then the sender's IP address and MAC address in the ARP packet are parsed, and it is determined that the ARP packet originates from the local area network to which the current Mesh node is connected.
[0065] Subsequently, the sending IP address is associated with the node identifier of the current Mesh node, forming the first mapping relationship between IP address and node identifier; at the same time, the sending MAC address is associated with the node identifier of the current Mesh node, forming the second mapping relationship between MAC address and node identifier, and the above mapping relationship is stored in the extended address resolution mapping table.
[0066] If the received data packet is a regular Ethernet data frame, the Ethernet frame header of the data frame is parsed, the source MAC address is extracted, and an association is established between the source MAC address and the node identifier of the current Mesh node to form a second mapping relationship, which is then stored in the extended address resolution mapping table.
[0067] During continuous network operation, the same terminal device may send ARP packets or ordinary data packets again. When a Mesh node learns the corresponding address information again, it can maintain the existing records in the extended address resolution mapping table; if the corresponding mapping relationship does not exist, a new mapping relationship is established; if the corresponding mapping relationship already exists, the validity information, timestamp, or node association information of the corresponding record is updated to keep the mapping relationship consistent with the current network state.
[0068] Through the above learning process based on the wired network interface, each Mesh node can continuously learn the IP address and MAC address information of terminal devices in the local area network, and establish the correspondence between the terminal devices and the current Mesh node, thereby forming the first mapping relationship and the second mapping relationship.
[0069] Mapping learning based on wireless air interface:
[0070] In addition to wired network interface learning, this embodiment further supplements and improves the second mapping relationship through wireless air interface communication.
[0071] When any Mesh node receives a Mesh network air interface protocol message sent by another Mesh node via the wireless air interface, it first parses the Mesh network air interface protocol message.
[0072] In this embodiment, the Mesh network air interface protocol is extended. When the sending Mesh node encapsulates a data packet into a Mesh network air interface protocol packet, it writes the source MAC address information corresponding to the original data frame into the reserved field or extended field of the Mesh network air interface protocol packet, and maintains the original Layer 2 data frame as the data payload for transmission.
[0073] Therefore, when the receiving Mesh node receives the Mesh network air interface protocol message, it can extract the source MAC address from the reserved field; at the same time, it can determine the source Mesh node identifier that sent the air interface protocol message based on the sender information of the Mesh network air interface protocol message. The source Mesh node identifier can be obtained from the node identifier field in the header of the Mesh network air interface protocol message, or it can be determined based on the wireless link layer information.
[0074] Subsequently, the source MAC address is associated with the source Mesh node identifier to form a second mapping relationship between the MAC address and the node identifier, and this is saved to the extended address resolution mapping table.
[0075] If no corresponding record exists in the extended address resolution mapping table, a new second mapping relationship is established; if a corresponding record already exists, the validity information, timestamp, or node association information of the corresponding record is updated to reflect the current network topology status.
[0076] Through the above-mentioned air interface learning process, each Mesh node can gradually learn the MAC address information of the terminal devices connected to other Mesh nodes during normal data communication, thereby continuously supplementing and improving the second mapping relationship in the extended address resolution mapping table.
[0077] In this embodiment, the air interface learning process does not require additional broadcast messages or dedicated control signaling. Instead, it directly utilizes the Mesh network air interface protocol messages transmitted during normal Mesh network service communication to complete the mapping relationship learning. Therefore, during the continuous operation of the Mesh network, each Mesh node can continuously establish and improve the correspondence between MAC addresses and node identifiers throughout the entire Mesh network as service data is forwarded normally, providing a foundation for backup addressing in subsequent cross-network segment communication.
[0078] By combining wired network interface learning and wireless air interface learning, each Mesh node can continuously build and maintain an extended address resolution mapping table. When a terminal device adds access, migrates, or the network topology changes, each Mesh node can continuously update the mapping relationship based on subsequent service communication processes. This ensures that the extended address resolution mapping table always maintains good real-time performance and accuracy, providing a reliable basis for adaptive addressing of subsequent cross-network segment data packets.
[0079] Step S102, Adaptive addressing and forwarding of cross-network segment data packets
[0080] After the extended address resolution mapping table is constructed, when the source Mesh node receives the data packet to be sent through the wired network interface, it enters the adaptive addressing and forwarding phase of the data packet.
[0081] The core of this step is: when the source mesh node can determine the target mesh node based on the target IP address, it uses the existing IP addressing method of the mesh network to complete the forwarding; when it cannot determine the target mesh node based on the target IP address, it automatically switches to backup addressing based on the target MAC address, thereby breaking through the limitation that ARP broadcasts cannot propagate between different broadcast domains and realizing transparent data transmission across network segments.
[0082] Step S102 includes the following sub-steps.
[0083] Step S1021, Data packet parsing
[0084] When the source Mesh node receives a data packet from the local area network via the wired network interface, it first parses the data packet.
[0085] The source Mesh node first parses the Ethernet frame header of the received data packet to obtain the destination MAC address in the data packet; when the data packet carries an IP data packet, it further parses the IP header to obtain the corresponding destination IP address.
[0086] At this point, the source Mesh node obtains the target IP address and target MAC address required for this data forwarding, providing address information for subsequent adaptive addressing.
[0087] This embodiment does not require changing the data packet format generated by the terminal device. The above address information can be obtained by simply parsing the received raw data packet. Therefore, it will not affect the original communication method of the terminal device.
[0088] Step S1022: Query the first mapping relationship based on the target IP address.
[0089] After obtaining the target address information, the source Mesh node first uses the target IP address as the query keyword to look up the first mapping relationship in the extended address resolution mapping table.
[0090] The source Mesh node uses the target IP address as an index to query whether a corresponding target Mesh node identifier exists in the first mapping relationship.
[0091] If the first mapping relationship corresponding to the target IP address is found, the corresponding target Mesh node identifier is obtained.
[0092] Subsequently, the source Mesh node encapsulates the data packet into a Mesh network air interface protocol packet according to the existing data forwarding mechanism of the Mesh network, and sends it to the corresponding target Mesh node through the wireless air interface based on the target Mesh node identifier.
[0093] In this case, since the target node can be located based on the target IP address, the entire data forwarding process is completed using the existing addressing method of the Mesh network, and there is no need to execute a backup addressing process.
[0094] Step S1023: If the first mapping relationship is not found, start MAC backup addressing.
[0095] If no first mapping relationship is found corresponding to the target IP address, it means that the current source Mesh node has not yet established a mapping relationship between the target IP address and the target Mesh node.
[0096] The failure of the first mapping query does not mean that the target terminal device does not exist, nor does it mean that the target terminal device is unreachable. It only means that the current Mesh node cannot determine the location of the target node based on the target IP address.
[0097] The above situation usually occurs in communication scenarios across broadcast domains or across IP network segments.
[0098] Because ARP broadcasts cannot propagate between different broadcast domains, mesh nodes cannot establish an initial mapping between a target IP address and a target mesh node using traditional ARP learning mechanisms. In existing mesh networks, when the initial mapping query fails, the target node is typically considered unreachable, thus terminating the current data packet's wireless forwarding process.
[0099] In this embodiment, the failure of the first mapping relationship query is not used as the condition for the end of forwarding. Instead, the backup addressing process is automatically started when the first mapping relationship is not matched.
[0100] The source Mesh node directly reads the target MAC address that has been resolved in step S1021, and uses the target MAC address as the query key to look up the second mapping relationship in the extended address resolution mapping table.
[0101] Since each Mesh node has continuously established and maintained the second mapping relationship between MAC address and node identifier through wired network interface learning and wireless air interface learning in step S101, the target Mesh node identifier corresponding to the target MAC address can be found when the second mapping relationship corresponding to the target terminal device has been established.
[0102] After finding the corresponding record, the source Mesh node obtains the target Mesh node identifier and uses this target Mesh node identifier as the target node for subsequent wireless air interface forwarding.
[0103] Therefore, this embodiment switches the addressing basis of data packets from the target IP address to the target MAC address, so that cross-network segment communication no longer relies on ARP broadcast to propagate across broadcast domains, but directly uses the target MAC address carried by the original data packet itself to complete the internal node location of the Mesh network, thereby realizing transparent data transmission between different broadcast domains.
[0104] Step S1024: Mesh network air interface protocol packet encapsulation and directed forwarding
[0105] Once the source Mesh node determines the identifier of the target Mesh node, it performs Mesh network air interface protocol encapsulation on the data packet.
[0106] The source Mesh node encapsulates the received complete original Layer 2 data frame as a data payload into the Mesh network air interface protocol message, so that the content of the original data message remains unchanged.
[0107] Meanwhile, when constructing Mesh network air interface protocol messages, the source MAC address and destination MAC address in the original data frame are written into the reserved fields or extended fields preset in the Mesh network air interface protocol message header.
[0108] The source MAC address is used by the receiving Mesh node to perform wireless air interface learning in order to establish or update the second mapping relationship between MAC addresses and Mesh node identifiers; the target MAC address is used to assist the receiving Mesh node in quickly obtaining the Layer 2 address information of both communicating parties, and can also serve as an auxiliary basis for packet parsing or consistency verification.
[0109] Since the complete original Layer 2 data frame is always transmitted as the data payload, this embodiment does not need to modify the source MAC address, destination MAC address, or data payload content in the original data frame, thereby ensuring that the data content received by the terminal device is consistent with that of the sending end.
[0110] After encapsulation, the source Mesh node sends the Mesh network air interface protocol message to the corresponding target Mesh node via the wireless air interface, based on the target Mesh node identifier determined above.
[0111] Since the target Mesh node identifier uniquely corresponds to the target Mesh node in the Mesh network, the Mesh network can use its existing wireless routing mechanism to direct Mesh network air interface protocol messages to the target Mesh node, thus achieving reliable data forwarding in cross-broadcast domain environments.
[0112] This embodiment only extends the header structure of the Mesh network air interface protocol message by adding information for carrying the MAC address of the original data frame in the reserved field, without changing the existing data carrying method and wireless routing mechanism of the Mesh network. Therefore, it can realize transparent data transmission in cross-network segment scenarios while being compatible with the existing Mesh network architecture, and reduce the modification cost of the existing Mesh protocol stack.
[0113] Step S103: Decapsulation and local forwarding at the target node
[0114] When the target Mesh node receives the Mesh network air interface protocol message sent in step S102 via the wireless air interface, it first parses the Mesh network air interface protocol message.
[0115] The target Mesh node parses the protocol header information of the Mesh network air interface protocol message, extracts the data payload, and reads the source MAC address and target MAC address information from the reserved fields or extended fields.
[0116] The data payload is a complete original Layer 2 data frame encapsulated by the source Mesh node.
[0117] Subsequently, the target Mesh node decapsulates the data payload, recovers the original Ethernet data frame, and ensures that it maintains the same source MAC address, destination MAC address, and upper-layer data content as the sender.
[0118] After the original data frame is recovered, the target Mesh node forwards the recovered Ethernet data frame to the local area network through its own wired network interface. This enables the target terminal device to receive data packets consistent with traditional LAN communication without being aware of the existence of the Mesh network, thereby achieving transparent transmission across network segments.
[0119] In this embodiment, the target Mesh node only performs data frame decapsulation and Layer 2 forwarding operations, without modifying or interfering with upper-layer business data, thereby ensuring end-to-end data consistency.
[0120] Step S104, Dynamically update the mapping relationship
[0121] During the packet parsing process of the target Mesh node, the second mapping relationship in the extended address resolution mapping table is dynamically updated based on the source MAC address carried in the Mesh network air interface protocol packet and the source Mesh node identifier that sent the packet.
[0122] The target Mesh node extracts the source MAC address from the reserved field and obtains the source Mesh node identifier that sent the message from the Mesh network air interface protocol message header. Then, it establishes an association between the source MAC address and the source Mesh node identifier, thereby forming or updating the second mapping relationship between the MAC address and the node identifier.
[0123] If a corresponding record does not exist in the extended address resolution mapping table, a new second mapping relationship is established; if a corresponding record already exists, the original record is updated to ensure that the mapping relationship is consistent with the current network topology, such as updating the node identification information or timestamp information of the corresponding record.
[0124] Through the aforementioned dynamic update mechanism, each Mesh node can continuously supplement and correct the correspondence between MAC addresses and Mesh nodes during the normal reception and forwarding of data packets, making the extended address resolution mapping table gradually more complete and stable, thereby improving the addressing success rate and forwarding efficiency of subsequent cross-network segment data packets.
[0125] The beneficial effects of this embodiment are: without changing the basic communication mechanism of the Mesh network, it solves the problem that Mesh nodes cannot locate target nodes in cross-broadcast domain scenarios; it makes cross-network segment communication no longer dependent on the reachability of ARP broadcasts between different broadcast domains, and directly uses the target MAC address carried by the data frame itself to complete node location;
[0126] Terminal devices can achieve cross-network segment data interaction without any modification, with low deployment costs and strong applicability.
[0127] In summary, this embodiment establishes a first mapping relationship between IP addresses and node identifiers and a second mapping relationship between MAC addresses and node identifiers in Mesh nodes. When the first mapping relationship cannot complete node location, the second mapping relationship is used to perform backup addressing, enabling the Mesh network to complete cross-broadcast domain data forwarding based on the target MAC address, thereby achieving transparent communication between terminal devices in different IP network segments.
[0128] Example 2: The difference between this example and Example 1 is that the extended address resolution protocol table uses a unified table entry to store the first mapping relationship and the second mapping relationship. Each table entry includes a node identifier, an IP address field, and a MAC address field. When the Mesh node learns a new IP address or MAC address, the corresponding fields are updated.
[0129] Example 3: The difference between this example and Example 1 is that after the target Mesh node recovers the original Layer 2 data frame, it first updates the second mapping relationship and then sends the recovered data frame to the wired network interface.
[0130] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
[0131] Example 4: A multi-node cross-network segment communication system based on a Mesh network, comprising: an extended address resolution mapping table management module, used to maintain a first mapping relationship between IP addresses and node identifiers and a second mapping relationship between MAC addresses and node identifiers; a packet parsing and judgment module, used to parse received data packets and perform priority queries based on the target IP address, switching to the target MAC address for backup queries when no match is found; and a packet encapsulation and forwarding module, used to encapsulate the data packet into a Mesh network air interface protocol packet after finding the target node identifier and forward it via the wireless air interface.
[0132] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural transformations made using the contents of the present invention's specification and drawings under the inventive concept of the present invention, or direct / indirect applications in other related technical fields, are included within the patent protection scope of the present invention.
Claims
1. A multi-node cross-segment communication method based on a mesh network, characterized in that, Applied to the source Mesh node, including: Obtain an extended address resolution mapping table, which includes at least a first mapping relationship between IP addresses and Mesh node identifiers, and a second mapping relationship between MAC addresses and Mesh node identifiers; After receiving the data packet to be sent, the data packet is parsed to obtain the target IP address and target MAC address; Based on the target IP address, the first mapping relationship is queried in the extended address resolution mapping table to determine the target Mesh node identifier; If no first mapping relationship is found corresponding to the target IP address, the second mapping relationship is queried in the extended address resolution mapping table using the target MAC address to determine the target Mesh node identifier; The data packet is encapsulated into a Mesh network air interface protocol packet and sent via the wireless air interface to the Mesh node corresponding to the target Mesh node identifier.
2. The multi-node cross-segment communication method based on a mesh network according to claim 1, characterized in that, The establishment of the first mapping relationship includes: When the source Mesh node receives an ARP packet, it parses the sender's IP address in the ARP packet and associates the sender's IP address with the node identifier of the current Mesh node to form the first mapping relationship.
3. The multi-node cross-segment communication method based on a mesh network according to claim 1, characterized in that, The establishment of the second mapping relationship includes: When the source Mesh node receives a data packet through the wired network interface, it extracts the source MAC address from the data packet and establishes an association between the source MAC address and the current source Mesh node identifier. When a source Mesh node receives a Mesh network air interface protocol message sent by another Mesh node, it extracts the source MAC address and the source Mesh node identifier that sent the message from the Mesh network air interface protocol message, and establishes an association between the source MAC address and the source Mesh node identifier to form or update the second mapping relationship.
4. The multi-node cross-segment communication method based on a mesh network according to claim 3, characterized in that, The second mapping relationship includes the following processing during updating: When the same MAC address corresponds to multiple Mesh node identifiers, the latest associated Mesh node identifier is determined as the valid mapping relationship based on the latest received time or timestamp information. It also performs overwrite updates or invalidation marking on historical mapping relationships.
5. The multi-node cross-segment communication method based on a Mesh network according to claim 1, characterized in that, The data packets are encapsulated into Mesh network air interface protocol packets, including: The complete original Layer 2 data frame of the data packet is encapsulated as a data payload into the Mesh network air interface protocol message, and the source MAC address, destination MAC address and data payload content of the original Layer 2 data frame remain unchanged during the encapsulation process; The source MAC address and destination MAC address information of the data packet are written into the reserved field of the Mesh network air interface protocol message.
6. The multi-node cross-segment communication method based on a Mesh network according to claim 5, characterized in that, The reserved field is set in the preset extended field area in the header of the Mesh network air interface protocol message, and the source MAC address and the destination MAC address are written into the reserved field in the form of Layer 2 address information fields.
7. The multi-node cross-segment communication method based on a Mesh network according to claim 1, characterized in that, The extended address resolution mapping table adopts a key-value pair storage structure, using IP address or MAC address as the index key and Mesh node identifier as the corresponding mapping value for storage and retrieval.
8. A multi-node cross-segment communication method based on a mesh network, characterized in that, Applied to the target Mesh node, the method includes: extracting the payload from the Mesh network air interface protocol message, extracting the source MAC address and the target MAC address from the reserved field, recovering the original data message based on the payload, and forwarding the recovered original data message to the target terminal device, without modifying or processing the source MAC address, target MAC address and upper-layer service data content of the original data message.
9. A multi-node cross-segment communication system based on a mesh network, characterized in that, include: The extended address resolution mapping table management module is used to maintain the first mapping relationship between IP addresses and node identifiers and the second mapping relationship between MAC addresses and node identifiers; The message parsing and judgment module is used to parse the received data packets and perform a priority query based on the target IP address. If the target IP address is not matched, the module switches to the target MAC address for backup query. The message encapsulation and forwarding module is used to encapsulate the data packet into a Mesh network air interface protocol message and forward it via the wireless air interface after finding the target node identifier.
