Networking method, apparatus, device, and storage medium
By searching and filtering wireless signals in a wireless LAN based on signal strength, prefix subnet length, and access layer, and using a dynamic conversion PD server to generate an IPv6 prefix pool, the problem of terminal devices in a wireless LAN being unable to obtain IPv6 addresses is solved, thus achieving high-quality IPv6 network communication.
Patent Information
- Application Number
- CN202310876777.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-17
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2043-07-17
AI Technical Summary
In wireless LANs without fixed infrastructure, the inability of terminal devices to obtain IPv6 addresses leads to a decline in network communication quality.
When the WAN interface of the router device to be networked does not receive IPv6 information, it searches for the wireless signal of the upstream router device, obtains the signal strength, the prefix subnet length and access level of the IPv6 prefix response, selects the target wireless signal for networking, and uses a dynamic conversion PD server to realize the automatic generation and allocation of the IPv6 prefix pool.
It enables rapid connection to IPv6 networks, improves network communication quality, avoids the problem of terminal devices being unable to obtain IPv6 addresses, and enhances user experience.
Smart Images

Figure CN116723589B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network communication technology, and in particular to a networking method, apparatus, device, and storage medium. Background Technology
[0002] Wireless LANs can be divided into two categories: those with fixed infrastructure and those without. Wireless LANs without fixed infrastructure are also called self-organizing networks, such as home broadband networks and emergency rescue networks. In this scenario, due to environmental limitations in equipment cabling, when multiple routers are connected in series, even if both the routers and terminal devices support IPv6, the home gateway and routers are in routing mode by default. This often results in terminal devices being unable to obtain IPv6 addresses or IPv6 prefixes because the self-organizing network is based on DHCPv6 PD prefix iterative allocation.
[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main objective of this invention is to provide a networking method, apparatus, device, and storage medium, which aims to solve the technical problem that terminal devices in existing self-organizing networks cannot obtain IPv6 addresses.
[0005] To achieve the above objectives, the present invention provides a networking method, the method comprising the following steps:
[0006] When the WAN interface of the router to be networked does not receive IPv6 information sent from the upstream router, the wireless signal of the upstream router is searched according to the WAN interface to obtain at least one wireless signal;
[0007] Obtain the signal strength of each wireless signal, as well as the prefix subnet length and access layer of the corresponding IPv6 prefix response for each wireless signal;
[0008] The target wireless signal is selected from the wireless signals based on the signal strength, the prefix subnet length, and at least one of the access layers;
[0009] The target wireless signal is used to control the routing device to be networked to form a network with the upstream routing device.
[0010] Optionally, selecting the target wireless signal from the wireless signals based on at least one of the signal strength, the prefix subnet length, and the access layer includes:
[0011] The wireless signals are sorted according to their signal strength.
[0012] Identify candidate wireless signals among the various wireless signals that contain the IPv6 prefix;
[0013] The target wireless signal is selected from the candidate wireless signals according to the sorting results. The target wireless signal is the candidate wireless signal that has an IPv6 prefix and the strongest signal strength.
[0014] Optionally, after selecting the target wireless signal from the candidate wireless signals according to the sorting result, the method further includes:
[0015] When multiple candidate wireless signals with the same signal strength exist, the target wireless signal is determined based on at least one of the prefix subnet length and access layer of each candidate wireless signal.
[0016] Optionally, determining the target wireless signal based on at least one of the prefix subnet length and access layer of each candidate wireless signal includes:
[0017] Compare the prefix subnet lengths of each candidate wireless signal;
[0018] When the prefix subnet lengths of the candidate wireless signals are different, the target wireless signal is determined from the candidate wireless signals based on the comparison results. The target wireless signal is the candidate wireless signal with the same signal strength and the shortest prefix subnet length.
[0019] Optionally, before searching for at least one wireless signal from the upstream routing device based on the WAN interface when no IPv6 information is received by the routing device to be networked, the method further includes:
[0020] Send an IPv6 prefix request to the upstream routing device and receive a prefix response message from the upstream routing device based on the prefix request;
[0021] The IPv6 prefix in the prefix response message is split into prefix subnets to obtain multiple IPv6 prefix subnets;
[0022] An IPv6 prefix subnet pool is generated based on the plurality of IPv6 prefix subnets. When a networking request is received from a lower-level routing device, a target IPv6 prefix subnet is selected from the IPv6 prefix subnet pool, and the target IPv6 prefix subnet is fed back to the lower-level routing device.
[0023] Optionally, generating an IPv6 prefix subnet pool based on the plurality of IPv6 prefix subnets includes:
[0024] According to preset interconnection rules, the multiple IPv6 prefix subnets are divided into interconnection addresses and multiple IPv6 free prefix subnets;
[0025] Get the prefix subnet length of each IPv6 free prefix subnet;
[0026] An IPv6 prefix subnet pool is constructed based on the prefix subnet length and the IPv6 free prefix subnets.
[0027] Furthermore, to achieve the above objectives, the present invention also proposes a networking device, the networking device comprising:
[0028] The search module is used to search for the wireless signal of the upstream router device based on the WAN interface when the WAN interface of the router device to be networked does not receive IPv6 information, and obtain at least one wireless signal.
[0029] The acquisition module is used to acquire the signal strength of each wireless signal, the prefix subnet length of the corresponding IPv6 prefix response of each wireless signal, and the access layer.
[0030] The selection module is configured to select a target wireless signal from among the wireless signals based on at least one of the signal strength, the prefix subnet length, and the access layer;
[0031] The networking module is used to control the router device to be networked and the upstream router device to form a network based on the target wireless signal.
[0032] In addition, to achieve the above objectives, the present invention also proposes a networking device, the networking device comprising: a memory, a processor, and a networking program stored in the memory and executable on the processor, the networking program being configured to implement the steps of the networking method described above.
[0033] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing a networking program, which, when executed by a processor, implements the steps of the networking method described above.
[0034] This invention, when the WAN interface of the router device to be networked does not receive IPv6 information, searches for at least one wireless signal emitted by the upstream router device through the WAN interface. It obtains the signal strength of each wireless signal, the prefix subnet length of the corresponding IPv6 prefix response, and the access level. Based on at least one of these factors, a target wireless signal is selected from the wireless signals. This allows the router device to be networked to connect to the upstream router device via the target wireless signal, thereby achieving rapid IPv6 network connectivity. By filtering connectable wireless signals based on their signal strength, prefix subnet length, and access level, the optimal IPv6 network quality is achieved. This avoids the technical problem in existing self-organizing networks where terminal devices cannot obtain IPv6 addresses, thus improving network communication quality. Attached Figure Description
[0035] Figure 1 This is a schematic diagram of the network equipment of the hardware operating environment involved in the embodiments of the present invention;
[0036] Figure 2 This is a flowchart illustrating the first embodiment of the networking method of the present invention;
[0037] Figure 3 This is a schematic diagram of a home self-organizing network architecture according to an embodiment of the networking method of the present invention;
[0038] Figure 4 This is a flowchart illustrating the second embodiment of the networking method of the present invention;
[0039] Figure 5 This is a flowchart illustrating the third embodiment of the networking method of the present invention;
[0040] Figure 6 This is a timing diagram of a self-organizing network according to an embodiment of the networking method of the present invention;
[0041] Figure 7 This is a tree network topology diagram of a home network routing device according to an embodiment of the networking method of the present invention;
[0042] Figure 8 This is a structural block diagram of the first embodiment of the networking device of the present invention.
[0043] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0044] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0045] Reference Figure 1 , Figure 1 This is a schematic diagram of the network device structure of the hardware operating environment involved in the embodiments of the present invention.
[0046] like Figure 1As shown, the networking device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0047] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the networking equipment and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0048] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a networking program.
[0049] exist Figure 1 In the network device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the network device of the present invention can be set in the network device, and the network device calls the network program stored in the memory 1005 through the processor 1001 and executes the network method provided in the embodiment of the present invention.
[0050] This invention provides a networking method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating a first embodiment of a networking method according to the present invention.
[0051] In this embodiment, the networking method includes the following steps:
[0052] Step S10: When the WAN interface of the router to be networked does not receive IPv6 information sent from the upstream router, search for the wireless signal of the upstream router based on the WAN interface to obtain at least one wireless signal.
[0053] It should be noted that the execution subject of the method in this embodiment can be a device with functions such as network communication, routing and forwarding, and data forwarding, such as a router or home gateway, or other devices with the same or similar functions. In this embodiment and the following embodiments, the device to be networked is described using a routing device as an example.
[0054] It is worth noting that in traditional technologies, routing devices in ad hoc networks operate in default routing mode. Routers in default mode do not have a built-in DHCPv6PD server, causing terminal devices connected to the routing device to be unable to obtain IPv6 addresses. To solve this problem, those skilled in the art typically adjust the routing device's mode to bridge mode. Adjusting the routing device's mode requires specialized communication knowledge and is quite difficult to implement. Furthermore, if a new router needs to be connected to the ad hoc network or after restoring factory settings, the routing device's operating mode needs to be readjusted. Therefore, the existing methods for solving this problem are inefficient and ineffective.
[0055] Among them, reference Figure 3 , Figure 3 This is a schematic diagram of the home self-organizing network structure in this embodiment. In the default mode, the router only has the function of obtaining IPv6 addresses through its WAN interface. Even if the router sends an IPv6 address prefix allocation request to the gateway, the gateway cannot allocate IPv6 address prefixes because it does not have a prefix pool. As a result, the terminals connected to the router cannot obtain IPv6 addresses and therefore cannot use IPv6 to connect to the network.
[0056] In addition, DHCPv6 (Dynamic Host Configuration Protocol for IPv6) is a protocol for dynamically allocating IP addresses in IPv6 networks. DHCPv6 is the IPv6 version of the DHCP protocol in IPv4 networks. With DHCPv6, network administrators can automatically assign IP addresses, DNS servers, default gateways and other network configuration information to IPv6 devices, simplifying the network management process.
[0057] DHCPv6-PD (Prefix Delegation) is an extension of DHCPv6, with its basic protocol defined in RFC 3633. Through prefix delegation, downstream prefix requesting clients submit prefix allocation requests to upstream prefix delegation servers. The prefix delegation server then allocates a suitable prefix address to the requesting client. The downstream client automatically subdivides the obtained prefix (typically less than 64 bits) into 64-bit prefix-length subnet segments and then uses Routing Advertisements (RA) to distribute the subdivided address prefixes to user links directly connected to the host. This achieves automatic address configuration for the host, and importantly, it transmits network configuration parameters such as addresses from the server to the IPv6 client host.
[0058] For ease of explanation, the routing device to be networked in this embodiment and the following embodiments is a router, and the upstream routing device is a gateway.
[0059] It should be understood that, due to the special nature of network routing, when a WAN port is detected to be active and a valid IPv6 prefix can be obtained through a wired medium between the WAN interface of the device to be networked and the LAN interface of the upstream device, the wired medium should be used first to obtain the IPv6 prefix. If the WAN interface of the device to be networked cannot obtain a valid IPv6 prefix through a wired medium, the step of searching for the wireless signal of the upstream device based on the WAN interface can be performed to realize a hybrid network of wireless and wired communication and improve network efficiency.
[0060] In the specific implementation, in order to enable the WAN interface of the router device to perform wireless signal scanning, this embodiment also needs to modify the router device to be networked to have the function of "dynamic PD conversion". The "dynamic PD conversion" server is different from the traditional DHCPv6 PD server. Although both are PD servers, the traditional DHCPv6 PD server is manually configured, while the IPv6 prefix pool of the "dynamic PD conversion" server is automatically generated by the system program without manual configuration intervention. It can be regarded as a new extended function based on RFC-3633.
[0061] In practice, searching for the wireless signal of the upstream routing device can be done by scanning the signal strength of the Service Set Identifier (SSID) around the routing device to be networked.
[0062] Step S20: Obtain the signal strength of each wireless signal and the prefix subnet length and access layer of the corresponding IPv6 prefix response for each wireless signal.
[0063] It is understandable that signal strength refers to the strength of the wireless signal received by the routing device in the network during wireless communication, usually expressed by a Signal Strength Indicator (SSI) or Received Signal Strength Indicator (RSSI). The unit of wireless signal strength can be decibels per milliwatt (dBm) or a percentage; the prefix subnet length can be replaced by "the number of 64-bit prefix entries that can be accommodated" in this embodiment. The larger the number of 64-bit prefix entries that can be accommodated, the longer the prefix subnet length; the access level refers to the position of the wireless signal in the ad hoc network. Generally speaking, the closer it is to the Broadband Remote Access Server (BRAS), the higher its access level. In addition, since this embodiment adopts the principle of prioritizing the largest prefix address when allocating prefixes, the access level in this embodiment can also be related to the size of the prefix address. The larger the prefix address, the higher the access level.
[0064] Step S30: Select a target wireless signal from the wireless signals based on at least one of the signal strength, the prefix subnet length, and the access layer.
[0065] In practical implementation, since there may be multiple routing devices in an ad hoc network, such as Figure 3 In the aforementioned home self-organizing network, routing devices include home gateway devices, home routers, and terminals with routing functions. When a device to be networked needs to connect to the self-organizing network, multiple wireless signals may be detected. However, some routing devices cannot obtain IPv6 addresses, causing the router to be networked connected to these devices to also be unable to obtain IPv6 addresses, thus affecting the user experience.
[0066] In practice, an optimal target wireless signal can be selected from the scanned wireless signals based on signal strength, prefix subnet length, and at least one of the access layer, thereby reducing network fluctuations and improving the user experience.
[0067] Step S40: Control the router device to be networked to form a network with the upstream router device according to the target wireless signal.
[0068] In practical implementation, since the wireless signal broadcast by the upper-level routing device corresponds to its local area network interface, after determining the target wireless signal, the wide area network interface of the routing device to be networked can be controlled to connect with the local area network interface of the upper-level routing device corresponding to the target wireless signal through wired media or wireless signal, so that the routing device to be networked also has functions such as routing forwarding, network data transmission, and providing IPv6 addresses.
[0069] This embodiment connects the WAN interface of the device to be networked and the LAN interface of the upstream router via a wired medium. However, when no IPv6-related information is received, the WAN interface searches for at least one wireless signal emitted by the upstream router. By acquiring the signal strength of each wireless signal, the prefix subnet length of the corresponding IPv6 prefix response, and the access level, a target wireless signal is selected from the wireless signals based on at least one of these factors. This allows the device to be networked to connect to the upstream router based on the target wireless signal, enabling rapid IPv6 network connectivity. By filtering connectable wireless signals based on signal strength, prefix subnet length, and access level, the optimal IPv6 network quality is achieved. This avoids the technical problem in existing self-organizing networks where terminal devices cannot obtain IPv6 addresses, thus improving network communication quality.
[0070] refer to Figure 4 , Figure 4 This is a flowchart illustrating a second embodiment of a networking method according to the present invention.
[0071] Based on the first embodiment described above, in this embodiment, step S30 includes:
[0072] Step S301: Sort the wireless signals according to their signal strength.
[0073] It should be noted that the process of sorting the wireless signals according to their signal strength can be to sort the wireless signals according to their strength order, prioritizing the acquisition and judgment of the IPv6 prefix of the wireless signals with stronger signals scanned by the routing device to be networked.
[0074] Step S302: Identify candidate wireless signals among the wireless signals that have the IPv6 prefix.
[0075] Understandably, since the LAN port of the upstream routing device can perform routing forwarding, in order to avoid invalid signal connections, this embodiment can identify candidate wireless signals with IPv6 prefixes among the wireless signals, so that they can be filtered according to signal strength to obtain wireless signals that meet the requirements of the routing device to be networked.
[0076] In a specific implementation, this embodiment can also prioritize the access of a router (LAN port) with a strong SSID signal and capable of obtaining an IPv6 prefix. However, if the SSID signal is strong but cannot obtain an IPv6 prefix, the SSID signal is abandoned, and the next strongest SSID signal is selected for connection. The connection is then checked to see if an IPv6 prefix can be obtained. Once an IPv6 prefix can be obtained, the SSID signal at this point is taken as the target wireless signal, and the connection is made to the LAN port corresponding to the target wireless signal.
[0077] Step S303: Select a target wireless signal from the candidate wireless signals according to the sorting results. The target wireless signal is the candidate wireless signal that has an IPv6 prefix and the strongest signal strength.
[0078] It is understandable that when a device scans for wireless signals, it usually divides them into different levels based on signal strength. During the comparison and sorting of signal strength, wireless signals with the same signal strength may appear. If the device connects to a wireless signal with the same signal strength, it can obtain an IPv6 prefix. In this case, the target wireless signal to be connected to can be determined by at least one of the following: the prefix subnet length and the access layer of the wireless signal.
[0079] Furthermore, after selecting the target wireless signal from the candidate wireless signals according to the sorting result, the method further includes:
[0080] When multiple candidate wireless signals with the same signal strength exist, the target wireless signal is determined based on at least one of the prefix subnet length and access layer of each candidate wireless signal.
[0081] It should be noted that, in order to provide better network communication performance and enable the routing device to be networked to support more networked terminal devices, this embodiment can prioritize determining the target wireless signal based on the length of the prefix subnet when the signal strength is the same.
[0082] Further, determining the target wireless signal based on at least one of the prefix subnet length and access layer of each candidate wireless signal includes:
[0083] Compare the prefix subnet lengths of each candidate wireless signal;
[0084] When the prefix subnet lengths of the candidate wireless signals are different, the target wireless signal is determined from the candidate wireless signals based on the comparison results. The target wireless signal is the candidate wireless signal with the same signal strength and the shortest prefix subnet length.
[0085] In practice, if multiple Wi-Fi signals with the same signal strength are found in the vicinity, and the lengths of the prefix subnets that "accommodate the number of 64-bit prefix entries" are different, the WAN interface of the router device to be networked will preferentially select the Wi-Fi signal corresponding to the prefix subnet that "accommodates the most 64-bit prefix entries" to connect to the LAN interface of the upstream router device. This is because the more 64-bit prefix entries the prefix proxy can accommodate, the more routers it can connect in series with downstream, which means it can support more network users.
[0086] Furthermore, the networking method further includes:
[0087] When the prefix subnet lengths of all candidate wireless signals are the same, a target wireless signal is determined from the candidate wireless signals according to the access level. The target wireless signal is a candidate wireless signal with the same signal strength, the same prefix subnet length, and the highest access level.
[0088] In practical implementation, if multiple Wi-Fi signals with the same signal strength are found in the vicinity, and the prefix subnet length for "accommodating 64-bit prefix entries" is the same, the WAN interface of the routing device to be networked will preferentially select the Wi-Fi signal with a higher access level. That is, in a tree-like network structure, the closer to the root, the higher the access level. If the prefix proxy selects the largest 64-bit prefix for the interconnection address when splitting the address, then the prefix subnet with the "larger prefix address" represents a higher access level.
[0089] In addition, since the above-mentioned wireless signals do not have security measures such as password verification, that is, security issues have not been considered, they can mainly be used for emergency rescue or hotspot coverage scenarios, allowing the protected personnel to use Wi-Fi to quickly access the IPv6 network.
[0090] For example, if the routing device to be networked receives three identical IPv6 prefixes from different routers or gateways: 2409:8020:1000:100c:: / 63, 2409:8020:1000:1008:: / 63, and 2409:8020:1000:1000:: / 63, then selecting the prefix subnet with the larger IP address, 2409:8020:1000:100c:: / 63, indicates a higher access level. This setting can prevent the self-organized network from forming loops and eliminates the need for manual configuration.
[0091] This embodiment selects the best target wireless signal from among the various wireless signals based on at least one of the following: signal strength, prefix subnet length, and access layer of the scanned wireless signal. This enables IPv6 network communication between the device to be networked and the upstream routing device, thereby improving the adoption rate of IPv6 networks.
[0092] refer to Figure 5, Figure 5 This is a flowchart illustrating a third embodiment of a networking method according to the present invention.
[0093] Based on the second embodiment described above, a third embodiment of the networking method of the present invention is proposed. In this embodiment, before step S10, the method further includes:
[0094] Step S01: Send an IPv6 prefix request to the upstream routing device and receive a prefix response message from the upstream routing device based on the prefix request.
[0095] It should be noted that the upstream routing device may be a delegated server, a broadband remote access server, a gateway device, or a router, depending on the routing device to be networked. This embodiment does not impose specific restrictions on this. In this embodiment, the routing device is a home gateway as an example, and the upstream routing device is a delegated server as an example.
[0096] refer to Figure 6 , Figure 6 This is a network timing diagram for a home self-organizing network. In order to enable the routing device to be networked to request access, an IPv6 prefix or IPv6 address will be assigned to the routing device to be networked. In this embodiment, an IPv6 prefix subnet pool is first built in the storage space of the routing devices that have been assembled in the self-organizing network, so as to facilitate the allocation of IPv6 prefix or IPv6 address.
[0097] Step S02: Split the IPv6 prefix in the prefix response message into a prefix subnet to obtain multiple IPv6 prefix subnets.
[0098] It should be noted that splitting the IPv6 prefix in the prefix response message refers to splitting it according to the number of bits in the prefix, for example: (See reference) Figure 7 , Figure 7The diagram shows a tree-structured network topology for a home network routing device. In this topology, the IPv6 prefix length in the prefix response message received by the first-level router is 60 bits: 2409:8020:1000:1000:: / 60. For this prefix, the following prefix subnetting can be performed: (1) 1 / 60 subnet: 2409:8020:1000:1000:: / 60; (2) 2 / 61 subnets: 2409:8020:1000:1000:: / 61 and 2409:8020:1000:1008:: / 61; (3) 4 / 62 subnets: 2409:8020:1000:1000: : / 62, 2409:8020:1000:1004:: / 62, 2409:8020:1000:1008:: / 62 and 2409:8020:1000:100c:: / 62; (4) 8 / 63 subnets: 2409:8020:1000:1000:: / 63, 2409:8020:1000:1002:: / 63... and 2409:8020:1000:100e:: / 63; (5) 16 / 64 subnets: 2409:8020:1000:1000:: / 64~2409:8020:1000:100f:: / 64.
[0099] Step S03: Generate an IPv6 prefix subnet pool based on the plurality of IPv6 prefix subnets, so that when a networking request is received from a lower-level routing device, a target IPv6 prefix subnet is selected from the IPv6 prefix subnet pool, and the target IPv6 prefix subnet is fed back to the lower-level routing device.
[0100] In the specific implementation, the home gateway device sends an IPv6 prefix request and, based on the prefix response message replied by the upstream delegated server, automatically splits the idle IPv6 prefixes that have not been allocated to the home gateway device into prefix subnets of different lengths. During the splitting, the prefix subnets that can accommodate the most 64-bit prefix entries are reserved as much as possible, and an IPv6 prefix pool is generated in the built-in DHCPv6 "dynamic conversion PD" server.
[0101] After generating the IPv6 prefix pool, if a router on a certain port of the local area network sends a DHCPv6 prefix request, the IPv6 prefix pool in the "Dynamic Conversion PD" server will be used to respond, and the prefix subnet that "accommodates the most 64-bit prefix entries" will be allocated first, so that the local area network side of the downstream home router can obtain the IPv6 prefix, which is convenient for supporting more routers or terminals.
[0102] Furthermore, when generating the IPv6 prefix subnet pool, since the home gateway device may need to directly provide IPv6 address services to other terminal devices, it will itself occupy an IPv6 address or IPv6 prefix. Simultaneously, to improve network utilization, the generation of the IPv6 prefix subnet pool based on the multiple IPv6 prefix subnets includes:
[0103] According to preset interconnection rules, the multiple IPv6 prefix subnets are divided into interconnection addresses and multiple IPv6 free prefix subnets;
[0104] Get the prefix subnet length of each IPv6 free prefix subnet;
[0105] An IPv6 prefix subnet pool is constructed based on the prefix subnet length and the IPv6 free prefix subnets.
[0106] It is worth noting that the home gateway device may also need to provide IPv6 network services to the terminal device. In this embodiment, a prefix is reserved in the divided 64-bit prefix to serve as the interconnection address of the home gateway device. The interconnection address is a unique address that identifies and locates a computer or other network device on the Internet. In the IPv6 protocol, the interconnection address is represented by a 128-bit binary number, usually presented in colon-separated hexadecimal form.
[0107] Since the IPv6 prefix is 64 bits, there are two ways to obtain the interconnection address (i.e., IPv6 address) of the home gateway device: 1. Stateless Address Autoconfiguration (SLAAC): In this case, M=0, the terminal host initiates a router request, and the gateway allocates a 64-bit prefix to the terminal host through a Router Advertisement (RA) message. The terminal host generates the last 64 bits according to algorithms such as EUI64, and combines them into a 128-bit IPv6 address; 2. DHCPv6 Stateful Automatic Allocation: In this case, M=1, the terminal host initiates a non-temporary address authentication request to the proxy server, and the proxy server directly allocates a 128-bit IPv6 address to the terminal host.
[0108] However, routers / home gateway devices are different from terminal hosts. By default, routers or home gateway devices not only need to apply for IPv6 addresses for use on the WAN interface side, but also need to apply for prefixes for terminal hosts on the LAN interface side through the IPv6 address prefix request assigned to the prefix request router.
[0109] In this embodiment, the selection of the interconnect address can be either the smallest or the largest 64-bit prefix. This embodiment does not impose specific limitations on this. When different 64-bit prefixes are selected as interconnect addresses, their selection varies depending on the access hierarchy of the prefix address in the tree network tray. For example, using the largest 64-bit prefix as the interconnect address (i.e., 2409:8020:1000:100f:: / 64) for interconnection... The IPv6 free prefix subnets are: one / 61 subnet: 2409:8020:1000:1000:: / 61, one / 62 subnet: 2409:8020:1000:1008:: / 62, one / 63 subnet: 2409:8020:1000:100c:: / 63, and one / 64 subnet: 2409:8020:1000:100e:: / 64.
[0110] In a specific implementation, in order to enable the routing device requesting network formation to carry more routers or terminal devices, this embodiment can assign an IPv6 prefix to the routing device requesting network formation according to the priority of the prefix subnet length.
[0111] The priorities of the four IPv6 free prefix subnets mentioned above are as follows: highest priority: 2409:8020:1000:1000:: / 61 (accommodating 8 64-bit prefix entries); second priority: 2409:8020:1000:1008:: / 62 (accommodating 4 64-bit prefix entries); third priority: 2409:8020:1000:100c:: / 63 (accommodating 2 64-bit prefix entries); fourth priority: 2409:8020:1000:100e:: / 64 (accommodating 1 64-bit prefix entry). The priority is determined according to the rule that the shorter the prefix subnet, the higher the priority, or according to the number of 64-bit prefix entries that can be accommodated. This embodiment does not impose specific restrictions on this.
[0112] In practical implementation, when a home gateway receives a DHCPv6 prefix request from a home router on a LAN port, it responds using the IPv6 prefix pool, prioritizing the allocation of the subnet with the largest number of 64-bit prefix entries. This ensures that the LAN side of the downstream home router can obtain an IPv6 prefix. For example, if the LAN port receives an IA_PD request from the first downstream router, it can first allocate the highest priority subnet, 2409:8020:1000:1000:: / 61 (which can accommodate 8 64-bit prefix entries). This allows downstream routers to continue splitting prefixes. If the LAN port receives a prefix request from a second downstream router, since the highest priority prefix is already occupied, the second priority prefix 2409:8020:1000:1008:: / 62 (which can accommodate 4 64-bit prefix entries) can be allocated. If a third IA_PD request is received, the third priority prefix 2409:8020:1000:100c:: / 63 (which can accommodate 2 64-bit prefix entries) can be allocated, until there are no more free IPv6 prefixes.
[0113] If the wireless router receives a prefix request from an invalid downstream router, it can also allocate an idle IPv6 prefix according to the above process. This embodiment will not elaborate on this further.
[0114] In practice, if a large number of routing devices request network deployment, resulting in the IPv6 prefix subnet pool being exhausted, a prefix request can be sent again to the upstream routing device to obtain more free IPv6 prefix subnet prefixes.
[0115] Furthermore, a downstream router can include a prefix in its prefix request as an indication to the requesting router that it wishes to use the prefix. When the requesting router recognizes the requesting router, it uses a response message to populate the prefix request with the prefix. The downstream requesting router can include one or more prefix options in the response message, and the upstream router returns the prefix and other information about the prefix request to the requesting router in the prefix options section of the feedback message.
[0116] This embodiment constructs an IPv6 prefix subnet pool by escalating privileges, so that when a next router requests to join the network, a prefix subnet that can accommodate more 64-bit prefix entries can be allocated, thereby increasing the adoption rate of IPv6.
[0117] Furthermore, this embodiment of the invention also proposes a storage medium storing a networking program, which, when executed by a processor, implements the steps of the networking method described above.
[0118] Since this storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.
[0119] Reference Figure 8 , Figure 8 This is a structural block diagram of the first embodiment of the networking device of the present invention.
[0120] like Figure 8 As shown, the networking device proposed in this embodiment of the invention includes:
[0121] The search module 10 is used to search for the wireless signal of the upstream routing device based on the WAN interface when the WAN interface of the routing device to be networked does not receive IPv6 information, and obtain at least one wireless signal.
[0122] The acquisition module 20 is used to acquire the signal strength of each wireless signal, the prefix subnet length of the corresponding IPv6 prefix response of each wireless signal, and the access layer.
[0123] The selection module 30 is used to select a target wireless signal from the wireless signals based on at least one of the signal strength, the prefix subnet length, and the access layer.
[0124] The networking module 40 is used to control the routing device to be networked to form a network with the local routing system according to the target wireless signal.
[0125] In one embodiment, the selection module 30 is further configured to sort the wireless signals according to the signal strength; determine the candidate wireless signals among the wireless signals that have an IPv6 prefix; and select a target wireless signal from the candidate wireless signals according to the sorting result, wherein the target wireless signal is the candidate wireless signal that has an IPv6 prefix and has the largest signal strength.
[0126] In one embodiment, the selection module 30 is further configured to determine the target wireless signal based on at least one of the prefix subnet length and access layer of each candidate wireless signal when there are multiple candidate wireless signals with the same signal strength.
[0127] In one embodiment, the selection module 30 is further configured to compare the prefix subnet lengths of each candidate wireless signal; when the prefix subnet lengths of each candidate wireless signal are different, the target wireless signal is determined from each candidate wireless signal according to the comparison results, wherein the target wireless signal is the candidate wireless signal with the same signal strength and the shortest prefix subnet length.
[0128] In one embodiment, the selection module 30 is further configured to determine a target wireless signal from among the candidate wireless signals according to the access level when the prefix subnet lengths of each candidate wireless signal are the same. The target wireless signal is a candidate wireless signal with the same signal strength, the same prefix subnet length, and the highest access level.
[0129] In one embodiment, the search module 10 is further configured to send an IPv6 prefix request to an upper-level routing device and receive a prefix response message from the upper-level routing device based on the prefix request; split the IPv6 prefix in the prefix response message into prefix subnets to obtain multiple IPv6 prefix subnets; generate an IPv6 prefix subnet pool based on the multiple IPv6 prefix subnets, so that when a networking request is received from a lower-level routing device, a target IPv6 prefix subnet is selected from the IPv6 prefix subnet pool, and the target IPv6 prefix subnet is fed back to the lower-level routing device.
[0130] In one embodiment, the search module 10 is further configured to divide the plurality of IPv6 prefix subnets into interconnection addresses and a plurality of IPv6 free prefix subnets according to preset interconnection rules; obtain the prefix subnet length of each IPv6 free prefix subnet; and construct an IPv6 prefix subnet pool according to the prefix subnet length and the IPv6 free prefix subnets.
[0131] This embodiment connects the WAN interface of the device to be networked and the LAN interface of the upstream router via a wired medium. However, when no IPv6-related information is received, the WAN interface searches for at least one wireless signal emitted by the upstream router. By acquiring the signal strength of each wireless signal, the prefix subnet length of the corresponding IPv6 prefix response, and the access level, a target wireless signal is selected from the wireless signals based on at least one of these factors. This allows the device to be networked to connect to the upstream router based on the target wireless signal, enabling rapid IPv6 network connectivity. By filtering connectable wireless signals based on signal strength, prefix subnet length, and access level, the optimal IPv6 network quality is achieved. This avoids the technical problem in existing self-organizing networks where terminal devices cannot obtain IPv6 addresses, thus improving network communication quality.
[0132] It should be understood that although the steps in the flowcharts of this application's embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0133] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.
[0134] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.
[0135] In addition, for technical details not described in detail in this embodiment, please refer to the networking method provided in any embodiment of the present invention, which will not be repeated here.
[0136] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system 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 system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0137] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0138] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0139] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A networking method, characterized in that, The networking method includes: When the WAN interface of the router device to be networked does not receive IPv6 information, it searches for the wireless signal of the upstream router device based on the WAN interface and obtains at least one wireless signal. Obtain the signal strength of each wireless signal, as well as the prefix subnet length and access layer of the corresponding IPv6 prefix response for each wireless signal; The target wireless signal is selected from the wireless signals based on the signal strength, the prefix subnet length, and at least one of the access layers; The target wireless signal is used to control the routing device to be networked to form a network with the upstream routing device. The step of selecting a target wireless signal from among the wireless signals based on the signal strength, the prefix subnet length, and at least one of the access layers includes: The wireless signals are sorted according to their signal strength. Identify candidate wireless signals among the various wireless signals that contain the IPv6 prefix; Based on the sorting results, a target wireless signal is selected from the candidate wireless signals. The target wireless signal is the candidate wireless signal that has an IPv6 prefix and has the strongest signal strength. When multiple candidate wireless signals with the same signal strength exist, the target wireless signal is determined based on at least one of the prefix subnet length and access layer of each candidate wireless signal.
2. The networking method as described in claim 1, characterized in that, The step of determining the target wireless signal based on at least one of the prefix subnet length and access layer of each candidate wireless signal includes: Compare the prefix subnet lengths of each candidate wireless signal; When the prefix subnet lengths of the candidate wireless signals are different, the target wireless signal is determined from the candidate wireless signals based on the comparison results. The target wireless signal is the candidate wireless signal with the same signal strength and the shortest prefix subnet length.
3. The networking method as described in claim 2, characterized in that, The networking method further includes: When the prefix subnet lengths of all candidate wireless signals are the same, a target wireless signal is determined from the candidate wireless signals according to the access level. The target wireless signal is a candidate wireless signal with the same signal strength, the same prefix subnet length, and the highest access level.
4. The networking method according to any one of claims 1-3, characterized in that, Before the step of searching for the wireless signal of the upstream routing device based on the WAN interface and obtaining at least one wireless signal when no IPv6 information is received on the WAN interface of the routing device to be networked, the method further includes: Send an IPv6 prefix request to the upstream routing device and receive a prefix response message from the upstream routing device based on the prefix request; The IPv6 prefix in the prefix response message is split into prefix subnets to obtain multiple IPv6 prefix subnets; An IPv6 prefix subnet pool is generated based on the plurality of IPv6 prefix subnets. When a networking request is received from a lower-level routing device, a target IPv6 prefix subnet is selected from the IPv6 prefix subnet pool, and the target IPv6 prefix subnet is fed back to the lower-level routing device.
5. The networking method as described in claim 4, characterized in that, The step of generating an IPv6 prefix subnet pool based on the plurality of IPv6 prefix subnets includes: According to preset interconnection rules, the multiple IPv6 prefix subnets are divided into interconnection addresses and multiple IPv6 free prefix subnets; Get the prefix subnet length of each IPv6 free prefix subnet; An IPv6 prefix subnet pool is constructed based on the prefix subnet length and the IPv6 free prefix subnets.
6. A networking device, characterized in that, The networking device includes: The search module is used to search for the wireless signal of the upstream router device based on the WAN interface when the WAN interface of the router device to be networked does not receive IPv6 information, and obtain at least one wireless signal. The acquisition module is used to acquire the signal strength of each wireless signal, the prefix subnet length of the corresponding IPv6 prefix response of each wireless signal, and the access layer. The selection module is configured to select a target wireless signal from among the wireless signals based on at least one of the signal strength, the prefix subnet length, and the access layer; The networking module is used to control the router device to be networked and the upstream router device to form a network according to the target wireless signal. The selection module is also used to sort the wireless signals according to the signal strength; Identify candidate wireless signals among the various wireless signals that contain the IPv6 prefix; Based on the sorting results, a target wireless signal is selected from the candidate wireless signals. The target wireless signal is the candidate wireless signal that has an IPv6 prefix and has the strongest signal strength. When multiple candidate wireless signals with the same signal strength exist, the target wireless signal is determined based on at least one of the prefix subnet length and access layer of each candidate wireless signal.
7. A networking device, characterized in that, The networking device includes: a memory, a processor, and a networking program stored in the memory and executable on the processor, the networking program being configured to implement the networking method as described in any one of claims 1 to 5.
8. A storage medium, characterized in that, The storage medium stores a networking program, which, when executed by a processor, implements the networking method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Full IP communication interconnection system of Ad Hoc network and IPv6 network
CN101588293A
Mesh network addressing
CN106416201A