Method for assigning ip addresses to nodes in a wireless mesh network and related devices
Patent Information
- Application Number
- CN202610842785.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-11
- Publication Date
- 2026-09-22
AI Technical Summary
这样分配出来的IP地址虽然可以满足不会冲突的要求,但是由于每一个节点并不了解整个网络状况,因此分配的IP地址也就很难携带网络拓扑信息
[0041]基于上述技术方案,本发明实施例提供的上述方案,当需分配IP地址的节点为根节点时,根节点之间协商确定自身所属子网的子网号,生成包含所述子网号的根节点的IP地址,当需分配IP地址的节点为子节点时,由根节点的IP地址识别得到子网号,结合所述子网号以及所述子节点的接口标识生成子节点的IP地址。由此可见,此种IP地址分配方式以自行分配为主,结合少量根节点协商分配的技术,根节点的IP地址的分配数量较少,避免了集中分配需要的复杂的中心节点的要求和部署难度,子节点的IP地址基于根节点和接口标识自行分配结合生成,可以比较好的解决地址分配的技术问题,并能够适应不断扩展的网络规模的需求。
Smart Images

Figure CN122802479A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network technology, and specifically to a method and related equipment for allocating node IP addresses in a wireless mesh network. Background Technology
[0002] Wireless ad hoc networks (WANs) are a type of decentralized, self-organizing network. They do not require physical base stations; all hosts are interconnected, and each host can act as a server. WANs are a technology different from traditional wireless communication. Traditional wireless communication networks require a fixed base station to handle user access and data forwarding, such as the mobile internet we use today. While these traditional networks have numerous base stations in densely populated areas, they become unreliable in remote areas or during large-scale emergency rescue operations due to the lack of base station coverage, leading to communication difficulties and spatially limiting information dissemination. WANs emerged to address this problem.
[0003] Based on different device types and application scenarios, wireless ad hoc networks can be divided into several types, including mobile ad hoc networks, wireless sensor networks, wireless mesh networks, and opportunistic networks. Among them, wireless mesh networks are a new type of broadband wireless network characterized by self-organization, self-healing, multi-hop capabilities, and node self-management. A wireless mesh network typically consists of a mesh root node and mesh child nodes. The mesh root node generally refers to nodes with very little or no mobility; they create the wireless mesh network and, together, form the backbone of the wireless mesh network, providing connectivity between child nodes within the wireless mesh network and data relay capabilities between child nodes and the wide area network (WAN). The mesh child nodes, on the other hand, form the foundation of the wireless mesh network, performing data communication. Specifically, although mesh child nodes do not provide access to the mesh backbone or WAN, as a fundamental element in a self-organizing, multi-hop network, they still need to provide data relay and forwarding capabilities for surrounding nodes.
[0004] Wireless mesh networks are well-suited for applications where node locations are relatively stable and movement is infrequent, but nodes may join or leave the network at any time, and the distance between nodes is uncontrollable. There is a high demand for communication between nodes that are beyond the line of sight of the link, such as home smart appliance networks and building and stadium monitoring networks.
[0005] In complex wireless mesh networks, to achieve interconnection between nodes, each node needs to be assigned a unique IP address within the network. At the same time, the IP address should also carry the correct routing information so that the routing mechanism can apply the appropriate routing addressing according to the node's IP address and find the correct transmission path for data packets to reach their destination.
[0006] Wireless mesh networks have complex topologies and a large number of nodes, which may join and leave the network at any time. In this complex environment, assigning a usable IP address to each node becomes a technical challenge. Currently, there are two main types of IP address allocation technologies commonly used in mesh networks:
[0007] 1. Centralized Distribution Scheme. This distribution technology typically uses a central device. All nodes joining the network must register with this central device and obtain an IP address. The central device controls the overall network topology and determines the location and assigns an address to each newly joined node according to the network conditions. The advantage of this technology is good network controllability; the entire network topology is controllable and manageable. The disadvantages are that the central device is complex and has high development costs. As the network expands, the control scope, configuration costs, and difficulty of the central device will increase rapidly. In addition, if the central device fails, the operation of the entire network will be affected and may even be paralyzed.
[0008] 2. Self-Assignment Scheme. A key feature of this scheme is that each node can potentially configure itself with an IP address that theoretically won't conflict with other nodes upon startup. This eliminates the need for a central device, allowing each node to assign itself a usable IP address upon joining the network. While this method satisfies the requirement of avoiding conflicts, the assigned IP addresses rarely carry network topology information because each node lacks knowledge of the overall network structure. The advantages of this technique are the absence of a central node, low development costs, and excellent scalability and configurability. The disadvantages are the limited IP address information, making it difficult to adapt to continuously expanding network sizes. Summary of the Invention
[0009] In view of this, embodiments of the present invention provide a node IP address allocation method and related equipment in a wireless mesh network, so as to provide an IP address allocation scheme that can combine the advantages of centralized allocation schemes and self-allocation schemes.
[0010] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0011] A method for allocating node IP addresses in a wireless mesh network, wherein the wireless mesh network has N sub-networks interconnected via a backbone network, and N is a positive integer not less than 2, the method comprising:
[0012] Obtain the role type of the target node, where the role type includes root node and child nodes;
[0013] Obtain the IP address allocation strategy that matches the role type;
[0014] IP addresses are assigned to the target nodes based on the IP address allocation strategy.
[0015] The IP address allocation strategy includes a first allocation strategy that matches the root node and a second allocation strategy that matches the child nodes;
[0016] The first allocation strategy is: each root node negotiates with each other to determine the subnet number of its own subnet, and generates an IP address of the root node containing the subnet number;
[0017] The second allocation strategy is as follows: the subnet number is obtained by identifying the IP address of the root node, and the IP address of the subnode is generated by combining the subnet number and the interface identifier of the subnode.
[0018] Optionally, in the above method for allocating node IP addresses in a wireless MESH network, the IP address of the root node and the IP address of the child node are in ULA format.
[0019] Optionally, in the above-mentioned method for allocating node IP addresses in a wireless MESH network, the zeroth byte of the ULA format IP address is fixed as 0xFD, the first, second, third, fourth, and fifth bytes are generated according to the wireless MESH network feature code, the sixth and seventh bytes are the subnet number, and the eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, and fifteenth bytes are the interface identifier.
[0020] Optionally, in the above method for allocating node IP addresses in a wireless MESH network, the data format of the interface identifier is EUI-64.
[0021] Optionally, in the above method for allocating node IP addresses in a wireless mesh network, the process of generating the interface identifier includes:
[0022] Get the node's MAC address;
[0023] Convert the MAC address into binary form;
[0024] Insert the binary bit stream corresponding to the hexadecimal number FFFE into the binary form of the MAC address;
[0025] Set the U / L bits in the MAC address after inserting FFFE.
[0026] Optionally, the node IP address allocation method in the above wireless mesh network, before obtaining the role type of the target node, further includes:
[0027] Determine if any new subnets have joined the wireless mesh network;
[0028] When a new subnet is detected joining the wireless MESH network, the nodes in the new subnet are used as the target nodes.
[0029] A node IP address allocation device in a wireless mesh network, wherein the wireless mesh network has N sub-networks interconnected via a backbone network, where N is a positive integer not less than 2, the device comprising:
[0030] A role type identification unit is used to obtain the role type of a target node, wherein the role type includes root node and child nodes;
[0031] The allocation strategy selection unit is used to obtain an IP address allocation strategy that matches the role type;
[0032] An allocation policy execution unit is used to allocate IP addresses to the target node based on the IP address allocation policy;
[0033] The IP address allocation strategy includes a first allocation strategy that matches the root node and a second allocation strategy that matches the child nodes;
[0034] The first allocation strategy is as follows: each root node negotiates and determines the subnet number of its own subnet, and generates an IP address of the root node that includes the subnet number;
[0035] The second allocation strategy is as follows: the subnet number is obtained by identifying the IP address of the root node, and the IP address of the subnode is generated by combining the subnet number and the interface identifier of the subnode.
[0036] An electronic device includes at least one processing device and a storage device connected to the processing device, wherein:
[0037] The storage device is used to store computer programs;
[0038] The processing device is used to execute the computer program so that the electronic device can implement any of the above-described methods for allocating node IP addresses in a wireless MESH network.
[0039] Optionally, among the above-mentioned electronic devices, the electronic device is a router.
[0040] A computer storage medium carrying one or more computer programs, which, when executed by an electronic device, enable the electronic device to implement any of the above-described methods for allocating node IP addresses in a wireless mesh network.
[0041] Based on the above technical solution, the solution provided in this embodiment of the invention, when the node requiring IP address allocation is a root node, the root nodes negotiate to determine the subnet number of their respective subnets, generating an IP address for the root node containing the subnet number. When the node requiring IP address allocation is a child node, the subnet number is identified from the root node's IP address, and the child node's IP address is generated by combining the subnet number with the child node's interface identifier. Therefore, this IP address allocation method primarily relies on self-allocation, combined with a small number of root nodes negotiating allocation. The number of IP addresses allocated to root nodes is relatively small, avoiding the complex requirements and deployment difficulties of centralized allocation. The child node's IP address is generated based on self-allocation and interface identifier, effectively solving the technical problem of address allocation and adapting to the needs of continuously expanding network scale. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0043] Figure 1 A schematic diagram of a network scenario illustrating the node IP address allocation method in the wireless MESH network disclosed in this application;
[0044] Figure 2 A flowchart illustrating the node IP address allocation method in a wireless mesh network provided in this application embodiment;
[0045] Figure 3 A schematic diagram of the structure of an IP address in ULA format;
[0046] Figure 4 A structural diagram illustrating the interface identifiers for root and child nodes in EUI-64 format;
[0047] Figure 5 An example of an EUI-64 format interface identifier is provided for embodiments of this application;
[0048] Figure 6 A schematic diagram illustrating the process of generating EUI-64 format interface identifiers;
[0049] Figure 7 This is a schematic diagram of the structure of a node IP address allocation device in a wireless MESH network provided in an embodiment of this application. Detailed Implementation
[0050] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0051] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0052] According to one aspect of the embodiments of this application, a method for allocating node IP addresses in a wireless mesh network is provided. This method can be widely applied to digital control scenarios such as smart homes, smart home ecosystems, intelligence house ecosystems, whole-house intelligence, digital homes, networked homes, automated homes, electronic homes, digital homes, and digital homes. It relies on wireless mesh self-organizing networks, IP technology, Internet of Things (IoT), edge computing, digital twins, and other technologies to construct an intelligent digital ecosystem with self-discovery, self-organizing, self-healing, and adaptive expansion capabilities. Optionally, in this embodiment, the above-mentioned method for allocating node IPv6 addresses in a wireless mesh network can be applied to scenarios such as... Figure 1 The diagram shows a hardware environment consisting of a backbone network (cooperative network) and multiple wireless mesh subnets. For example... Figure 1As shown, each wireless mesh subnet is interconnected via a backbone network. Each subnet contains a root node and several child nodes. Root nodes negotiate subnet numbers with each other via the backbone network, while child nodes generate unique IP addresses by identifying the subnet number of their respective root node and combining it with their own interface identifier. A cloud platform or local server can be set up on the backbone network side or independently of the network to provide services such as network management, device authentication, and data storage. Lightweight computing capabilities can be configured on the root nodes to support subnet number negotiation, address prefix distribution, and data relay forwarding.
[0053] The aforementioned network communication architecture includes, but is not limited to, two types of links: wired transmission and wireless connection. Among them, the wired network can cover home LANs, WANs, and MANs, while the wireless network supports communication standards such as Wi-Fi, Zigbee, Bluetooth, and 5G. It can adapt to the digital technology transmission needs of the Internet of Things (IoT), the Internet of Things, and the Internet of Things blockchain, ensuring the uniqueness of IP addresses and the accuracy of routing information, enabling devices to make autonomous judgments, accurately allocate, and precisely address devices, and supporting intelligent capabilities such as plug-and-play devices, dynamic expansion of network scale, and self-repair of node faults. Terminal devices include, but are not limited to, devices that can serve as root nodes, such as wireless MESH routers, smart gateways, and smart central control screens, as well as all categories of digital home appliances, digital appliances, smart home appliances, and whole-house smart devices. Specifically, these include: smart air conditioners, air conditioning equipment, smart range hoods, smart refrigerators, smart ovens, cooking equipment, smart stoves, smart washing machines, clothes handling equipment, smart water heaters, smart washing equipment, smart dishwashers, smart projectors, smart TVs, smart clothes racks, smart curtains, smart audio-visual equipment, smart sockets, smart speakers, smart speakers, smart fresh air systems, smart kitchen and bathroom equipment, smart bathroom equipment, robot vacuum cleaners, robot window cleaners, robot mopping, air purifiers, smart steam ovens, smart microwave ovens, smart air purifiers, smart water dispensers, smart door locks, smart lighting fixtures, smart light bulbs, smart air detectors, smart remote controls, and smart gateways. This also covers smart terminals supporting digital home systems such as security and lighting. The aforementioned terminal devices automatically obtain a unique ULA-formatted IP address carrying subnet topology information according to their role type (root node or child node) in the wireless MESH network and the IP address allocation strategy provided in this application, thereby achieving efficient, reliable, and scalable smart home communication.
[0054] In wireless mesh networks, both centralized and self-allocation IP address allocation techniques have their drawbacks. In practical applications, as network scale expands and topology complexity increases, both techniques face growing challenges and may ultimately fail to meet actual needs. This invention proposes a node IP address allocation scheme for wireless mesh networks, based on a defined network topology. In this scheme, the IP addresses of first-level nodes (root nodes) are allocated through distributed negotiation, while second-level nodes (child nodes) are self-allocated based on a combination of a prefix defined by the first-level node and an interface identifier. This scheme effectively solves the technical problems of address allocation, adapts to the ever-expanding network scale, and meets the needs of node address allocation.
[0055] Considering the variability of wireless mesh networks, such as Figure 1 As shown, this technology first clearly defines the MESH network as a two-level network. The entire two-level network is divided into N (where N is a positive integer not less than 2) sub-networks (UMEST subnet 1, UMEST subnet 2, UMEST subnet 3) with unique root nodes. The root node of each subnet is connected to a backbone network (cooperative network) that can communicate with each other, and cooperative communication is based on the backbone network. This wireless MESH network topology is common in frequently used wireless network environments, such as in a home where several interconnected routers combine wireless devices in each room into a network, or in an office building where devices in each office room are connected to the network based on the building's backbone network. Then, based on... Figure 2 The method for allocating node IP addresses in the wireless mesh network describes assigning IP addresses to each node in the network. (See [link to relevant documentation]). Figure 2 The method may include:
[0056] Step S101: Obtain the role type of the target node.
[0057] The role types include root nodes and child nodes. In this embodiment, when an IP address needs to be assigned to a node, the role type of the target node must first be identified. Specifically, this process may include:
[0058] First, check the physical connection and interface characteristics of the target node. If the target node has an independent uplink port that directly connects to the external network / gateway, and no other upper-layer parent nodes are connected, and only a downlink port connects to other network nodes, it is initially determined to be a root node. If the target node does not have an independent external network uplink port, and only connects to other nodes in the network through wired / wireless means, and has no direct link to the external network, it is initially determined to be a child node. Based on this, further verification is performed through network topology and protocol identifiers. If the node depth in the topology is 0, there is no traceable parent node, and the protocol firmware / related commands return root, is_root()=true, or other root node-specific identifiers, and there is cross-network traffic forwarding behavior between the internal and external networks, with no root port / forwarding link pointing to other nodes, then the target node can be finally confirmed as the root node. If the node depth in the topology is ≥1, the parent node can be clearly traced, and the protocol firmware / related commands return child / relay / leaf, is_root()=false, or other identifiers, there is only internal network communication with the parent / sibling nodes, all traffic converges upwards to the parent node for forwarding, there is no cross-network traffic processing capability, and there is a root port / forwarding link pointing to the parent node, then the target node can be finally confirmed as a child node.
[0059] Step S102: Obtain the IP address allocation strategy that matches the role type.
[0060] In this scheme, different IP address allocation strategies are pre-configured for nodes with different role types. After determining the role type of the target node, the IP address allocation strategy that matches the role type is obtained and the IP address is configured for the target node.
[0061] The IP address allocation strategy includes a first allocation strategy matching the root node and a second allocation strategy matching the child nodes; wherein, the first allocation strategy is used to configure IP addresses for the root nodes, and the second allocation strategy is used to configure IP addresses for the child nodes. The first allocation strategy is: each root node negotiates and determines its own subnet number, and generates an IP address containing the subnet number; the second allocation strategy is: the root node allocates a prefix for the IP address, and combines it with the interface identifier of the child node to generate the IP address of the child node.
[0062] In wireless mesh networks, multiple root nodes can determine a unique subnet number through negotiation mechanisms to avoid conflicts and optimize routing. These mechanisms are mature technical solutions in the existing technology. For example, negotiation methods include: static manual configuration (the administrator pre-divides the subnet range and assigns it to each root node, which is suitable for small fixed networks), dynamic protocol negotiation (such as using DHCPv6 Prefix Delegation to dynamically assign IPv6 prefixes from the upper-level root node to the lower-level node, or exchanging subnet information and automatically detecting and adjusting through routing protocols such as OSPF / BGP, which is suitable for dynamic scenarios such as ISP backbone networks), and centralized control plane (the SDN controller assigns subnets and distributes configurations based on global topology information through algorithms, which is suitable for cloud environments or software-defined networks). The negotiation process usually includes stages such as request, allocation, and confirmation (such as in DHCPv6 PD, the lower level sends a Solicit request, the upper level replies Advertise to allocate the prefix, and finally confirms through Reply).
[0063] Step S103: Assign an IP address to the target node based on the IP address allocation strategy.
[0064] After determining the IP address allocation strategy corresponding to the target node, the IP address allocation strategy is executed to allocate an IP address to the target node.
[0065] As can be seen from the above embodiments, in the node IP address allocation of the wireless MESH network disclosed in this application, when allocating IP addresses to root nodes, the subnet number of the subnet to which each root node belongs is determined through negotiation among the root nodes. After the subnet number is determined, an IP address of the root node containing the subnet number is generated based on the subnet number. When allocating IP addresses to child nodes, the subnet number of the subnet to which the child node belongs is identified from the IP address of the root node corresponding to the child node. The IP address of the child node is generated by combining the subnet number and the interface identifier of the child node. This node IP address allocation method in the wireless MESH network adopts a hybrid allocation strategy with child nodes allocating themselves as the main method and root nodes negotiating and allocating as a supplementary method. When a child node joins the network, it does not need to initiate an address request to any central device. Instead, it directly extracts the subnet number from the IP address of its root node and generates an interface identifier according to the improved EUI-64 format based on its own MAC address, thereby assembling a complete ULA format IP address on its own. This process does not rely on a centralized address allocation server, avoiding the problems of complex central equipment, high development costs, high single-point failure risk, and management difficulties during large-scale deployments inherent in centralized allocation schemes. Simultaneously, the number of root nodes is relatively small in the network. Root nodes negotiate subnet numbers through a backbone network (cooperative network), ensuring that different subnets have unique subnet numbers across the entire network, thus eliminating address conflicts at the root. Since the final generated IP address carries a clear subnet number, the routing protocol only needs to resolve the target IP address to quickly determine the subnet location of the node, without maintaining complex routing table entries or performing additional topology discovery queries, thus completing hop-by-hop forwarding of data packets. This design allows intra-network data to be routed based on the IP address itself, retaining the advantages of decentralized, low-cost, and easily scalable self-allocation schemes while overcoming the disadvantage of traditional self-allocation schemes that cannot carry topology information, and also incorporating the advantages of centralized allocation schemes.
[0066] In this embodiment, the IP addresses of the root node and the child nodes in the wireless mesh network are in ULA format (Unique Local IP Unicast Addresses [RFC4193]). ULA format IP addresses are as follows: Figure 3 As shown. Among them, Figure 3 The first line in the table shows the number of bytes. The meanings of the parameters in the second line are as follows:
[0067] PrefixFC00:: / 7 is used to identify the prefix range of local IP unicast addresses;
[0068] The L bit indicates that the prefix is set locally by the network. When the L bit is set to 1, it means that the address prefix is allocated locally by the network. When the L bit is set to 0, it means that the prefix is allocated by a globally centralized management organization (ULA-C). In actual network deployment, generally all ULA addresses must have the L bit set to 1.
[0069] Global ID is used to create a 40-bit global identifier with a globally unique prefix;
[0070] Subnet ID is used to identify the subnet ID (subnet number) of a site's internal subnet.
[0071] Interface ID (64-bit) [ADDARCH]
[0072] When L is set, the fixed prefix of ULA is FD00: / 8.
[0073] Each wireless mesh network has a Global ID. Theoretically, the Global ID only needs to be determined within the wireless mesh network. In this embodiment, a random 40-bit ID derived from the ID of the wireless mesh network can be used as the Global ID of the wireless mesh network.
[0074] Based on the above generation format, the IP address in ULA format is obtained by combining Prefix + L + GlobalID + subnet number + interface identifier. In the IP address of the root node and child nodes in the ULA format, the zeroth byte is always written as 0xFD. The first, second, third, fourth, and fifth bytes are generated according to the wireless mesh network signature, which is a unique identifier used to distinguish different mesh networks. It usually refers to the Global ID in ULA (Unique Local Address). The sixth and seventh bytes are the subnet number, and the eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, and fifteenth bytes are the interface identifier of the node.
[0075] After generating the IP addresses (Prefix + L + GlobalID + Subnet Number + Interface Identifier) of each root node in the wireless mesh network, when a child node joins a wireless mesh subnet, it obtains the IP address of the root node of that subnet. Based on the IP address of the root node, it obtains the subnet number (bytes 6 and 7 of the root node's IP address). Then, by combining the device's own interface identifier and subnet number according to the aforementioned ULA format, it constructs its own IP address. This address ensures uniqueness within a wireless mesh network and carries its own subnet number, enabling communication within the wireless mesh network.
[0076] In this scheme, the interface identifiers of both the root node and child nodes can be in EUI-64 format (Modified EUI-64 Format). Each node's interface identifier can use an IEEE EUI-64 identifier generated from an IEEE 802 48-bit MAC identifier [RFC4291 Appendix A]. [EUI64] defines a method for generating an IEEE EUI-64 identifier from an IEEE 802 48-bit MAC identifier, in which two bytes are inserted in the middle of the 48-bit MAC (between the company ID and the vendor support ID), with values of hexadecimal 0xFF and 0xFE. For example, a 48-bit IEEE MAC with global scope is as follows: Figure 4 As shown, Figure 4 In this context, "c" represents the company ID field, "0" represents a global / local field (in this case, global scope), "g" represents a single / group field, and "m" represents an extended identifier field chosen by the manufacturer. A complete interface identifier can be represented as follows: Figure 5 As shown.
[0077] The process of generating the interface identifiers for child nodes and the root node can be as follows: Figure 6 As shown:
[0078] First, obtain the MAC address of the interface identifier of the node (root node and child nodes), such as... Figure 6 The address in the code is “0012-3400-ABCD”;
[0079] Then convert the MAC address to binary format, such as... Figure 6 "0000000000010010,0011010000000000,1010101111001101" shown;
[0080] Insert the binary bit stream corresponding to the hexadecimal number FFFE into the binary form of the MAC address to generate an interface identifier that conforms to network protocol requirements and helps distinguish the uniqueness and origin of the address. The interface identifier after inserting FFFE is as follows: Figure 6 "0000000000010010,0011010011111111,1111111000000000,1010101111001101" shown;
[0081] Then set the U / L bit to indicate the source of the uniqueness of the interface identifier (globally unique or locally unique). For example, when the U / L bit is 1, it means globally unique, and when the U / L bit is 0, it means locally unique. At this time, the complete interface identifier corresponding to the node can be obtained.
[0082] Based on the address allocation technology described above, each node can allocate a unique IP address by using the last 64 bits of the interface identifier. In the first half of the IP address (the first 64 bits of the prefix), the last 16 bits describe the subnet number where the node is located. The routing protocol can use this IP address to route data packets to the correct subnet.
[0083] In this embodiment, when allocating IP addresses, all nodes to be allocated can be traversed first, and the traversed nodes are used as target nodes. Since the IP address of the corresponding root node is needed when configuring the IP address of a child node, each node is traversed first, and the IP address of the root node is allocated first. After all the IP addresses of the root nodes have been allocated, the IP addresses of the child nodes are allocated. After the IP addresses of each node in the wireless mesh network are allocated, the user can add a new subnet to the wireless mesh network according to their own needs. At this time, a new root node and its corresponding child nodes will be added to the wireless mesh network. Therefore, before obtaining the role type of the target node, it also includes: determining whether a new subnet has joined the wireless mesh network. When a new subnet is detected to have joined the wireless mesh network, the nodes (root node and child nodes) in the new subnet are used as the target nodes. Thus, in this embodiment, this solution can monitor newly added subnets in real time and configure IP addresses for the newly added subnets.
[0084] This embodiment discloses a node IP address allocation device in a wireless MESH network. For the specific working content of each unit in the device, please refer to the content of the above method embodiment.
[0085] The node IP address allocation device in the wireless MESH network provided in the embodiments of the present invention is described below. The node IP address allocation device in the wireless MESH network described below can be referred to in correspondence with the node IP address allocation method in the wireless MESH network described above.
[0086] See Figure 7 The node IP address allocation device in the wireless mesh network includes:
[0087] The role type identification unit 100, which corresponds to step S101 in the above method, is used to obtain the role type of the target node, wherein the role type includes root node and child node;
[0088] The allocation strategy selection unit 200, which corresponds to step S102 in the above method, is used to obtain an IP address allocation strategy that matches the role type.
[0089] The allocation strategy execution unit 300, which corresponds to step S103 in the above method, is used to allocate IP addresses to the target node based on the IP address allocation strategy.
[0090] The IP address allocation strategy includes a first allocation strategy that matches the root node and a second allocation strategy that matches the child nodes;
[0091] The first allocation strategy is as follows: each root node negotiates and determines the subnet number of its own subnet, and generates an IP address of the root node that includes the subnet number;
[0092] The second allocation strategy is as follows: the subnet number is obtained by identifying the IP address of the root node, and the IP address of the subnode is generated by combining the subnet number and the interface identifier of the subnode.
[0093] Corresponding to the above method, this application also provides an electronic device, characterized in that it includes at least one processing device and a storage device connected to the processing device, wherein:
[0094] The storage device is used to store computer programs;
[0095] The processing device is used to execute the computer program so that the electronic device can implement the node IP address allocation method in the wireless MESH network described in any of the above embodiments.
[0096] In this embodiment, the electronic device may be a router or a network switch.
[0097] Corresponding to the above method, this application also provides a computer storage medium carrying one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device is able to implement the node IP address allocation method in the wireless MESH network described in any of the above embodiments.
[0098] All information involved in this application (including but not limited to data used for analysis, stored data, and displayed data) is information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0099] For ease of description, the above system is described by dividing it into various modules based on their functions. Of course, in implementing this invention, the functions of each module can be implemented in one or more software and / or hardware components.
[0100] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0101] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0102] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0103] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0104] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for allocating node IP addresses in a wireless mesh network, wherein the wireless mesh network has N sub-networks interconnected via a backbone network, and N is a positive integer not less than 2, characterized in that... The methods include: Obtain the role type of the target node, where the role type includes root node and child nodes; Obtain the IP address allocation strategy that matches the role type; IP addresses are assigned to the target nodes based on the IP address allocation strategy. The IP address allocation strategy includes a first allocation strategy that matches the root node and a second allocation strategy that matches the child nodes; The first allocation strategy is: each root node negotiates with each other to determine the subnet number of its own subnet, and generates an IP address of the root node containing the subnet number; The second allocation strategy is as follows: the subnet number is obtained by identifying the IP address of the root node, and the IP address of the subnode is generated by combining the subnet number and the interface identifier of the subnode.
2. The node IP address allocation method in a wireless mesh network according to claim 1, characterized in that, The IP address of the root node and the IP address of the child node are in ULA format.
3. The node IP address allocation method in the wireless mesh network according to claim 2, characterized in that, In the ULA format IP address, the zeroth byte is always written as 0xFD, the first, second, third, fourth, and fifth bytes are generated according to the wireless MESH network feature code, the sixth and seventh bytes are the subnet number, and the eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, and fifteenth bytes are the interface identifier.
4. The node IP address allocation method in a wireless mesh network according to claim 3, characterized in that, The data format of the interface identifier is EUI-64.
5. The node IP address allocation method in a wireless mesh network according to claim 4, characterized in that, The process of generating the interface identifier includes: Get the node's MAC address; Convert the MAC address into binary form; Insert the binary bit stream corresponding to the hexadecimal number FFFE into the binary MAC address; Set the U / L bits in the MAC address after inserting FFFE.
6. The node IP address allocation method in a wireless mesh network according to claim 1, characterized in that, Before obtaining the role type of the target node, the following steps are also included: Determine if any new subnets have joined the wireless mesh network; When a new subnet is detected joining the wireless MESH network, the nodes in the new subnet are used as the target nodes.
7. A node IP address allocation device in a wireless mesh network, wherein the wireless mesh network has N sub-networks interconnected through a backbone network, wherein N is a positive integer not less than 2, characterized in that, The device includes: A role type identification unit is used to obtain the role type of a target node, wherein the role type includes root node and child nodes; The allocation strategy selection unit is used to obtain an IP address allocation strategy that matches the role type; An allocation policy execution unit is used to allocate IP addresses to the target node based on the IP address allocation policy; The IP address allocation strategy includes a first allocation strategy that matches the root node and a second allocation strategy that matches the child nodes; The first allocation strategy is as follows: each root node negotiates and determines the subnet number of its own subnet, and generates an IP address of the root node that includes the subnet number; The second allocation strategy is as follows: the subnet number is obtained by identifying the IP address of the root node, and the IP address of the subnode is generated by combining the subnet number and the interface identifier of the subnode.
8. An electronic device, characterized in that, It includes at least one processing device and a storage device connected to the processing device, wherein: The storage device is used to store computer programs; The processing device is used to execute the computer program to enable the electronic device to implement the node IP address allocation method in the wireless MESH network as described in any one of claims 1 to 6.
9. The electronic device according to claim 8, characterized in that, The electronic device is a router.
10. A computer storage medium, characterized in that, The storage medium carries one or more computer programs that, when executed by an electronic device, enable the electronic device to implement the node IP address allocation method in a wireless MESH network as described in any one of claims 1 to 6.