A method and device for detecting network elements in IPv6 network space
By determining the anonymity of network elements in an IPv6 network and utilizing ICMPv6 and SNMP protocols, the problem of low network element detection efficiency in IPv6 networks is solved, enabling fast and accurate network element traversal and topology formation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ACADEMY OF BROADCASTING SCI STATE ADMINISTATION OF PRESS PUBLICATION RADIO FILM & TELEVISION
- Filing Date
- 2021-12-27
- Publication Date
- 2026-06-23
AI Technical Summary
Existing topology discovery mechanisms based on ICMP and SNMP are ineffective in detecting and managing the large number of network elements in IPv6 networks, resulting in insufficient timeliness and failing to meet the needs of automatic discovery.
By determining whether a network element is anonymous, and using a preset probe program to find the IPv6 global unicast address based on the ICMPv6 protocol, and combining the SNMP protocol to obtain known network element information, a network topology is formed.
It enables rapid traversal of all network element devices in a sparse IPv6 network space, quickly forming network element usage information, thus improving detection efficiency and accuracy.
Smart Images

Figure CN116405362B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a method and apparatus for detecting network elements in IPv6 network space. Background Technology
[0002] IPv6 is a crucial cornerstone of cable television networks, and its widespread adoption will decisively drive the development of emerging applications such as the Internet of Things (IoT) and smart TVs. In the future nationwide cable television network, every relevant network element will have its own IPv6 address, allowing users to access these elements via the network. Currently, IPv4 address space is nearing exhaustion, while IPv6 will provide cable television networks with virtually unlimited address space. This means that all network elements involved in the entire cable television broadcasting process, including home smart network elements and set-top boxes used by users, can have their own IP addresses, be integrated into the cable television network, and be subject to unified management, enabling bidirectional communication across the entire network.
[0003] Currently, almost all methods for detecting the activity of network elements within a network are based on ICMP. According to the new IPv6 global unicast address format given in RFC 3587, the address length is 128 bits, with the interface ID occupying 64 bits. Therefore, the number of nodes in an IPv6 subnet can reach 2^64. For such a large number, if ICMP probing is still used to detect the liveness of hosts within the subnet, the timeliness of the results will not meet the needs of automatic discovery. Therefore, the probing methods used in IPv4 are no longer suitable for IPv6 networks.
[0004] In IPv4, the next-hop information entry of the IP address in the MIB information is often used to discover subnet information connected to network elements. However, in IPv6 routing tables, the next-hop information entry is often represented by the link-local address, which cannot be globally routed. Therefore, the SNMP (Simple Network Management Protocol)-based topology discovery mechanism in IPv4 will be difficult to implement in IPv6 without modification.
[0005] Existing methods use the next-hop information entry of the IP address in the MIB information to discover subnet information connected to network elements. However, in IPv6 routing tables, the next-hop information entry is often represented by a link-local address, which cannot be globally routed. Therefore, the SNMP (Simple Network Management Protocol)-based topology discovery mechanism in IPv4 is difficult to implement in IPv6. Summary of the Invention
[0006] This invention provides a method and apparatus for detecting network elements in IPv6 network space, enabling rapid traversal of all network element devices in a sparse IPv6 network space, and quickly forming the network element usage status in the IPv6 network space based on the generated form.
[0007] This invention provides a method for detecting network elements in IPv6 network space, comprising:
[0008] Obtain a list of network elements to be detected, wherein the list of network elements to be detected records multiple first network elements to be detected;
[0009] For each first network element, perform a probe to obtain the second network element directly connected to that first network element;
[0010] For each second network element, determine whether it is an anonymous network element. If it is, use a preset probe program based on the seed nodes in the preset seed set to find the IPv6 global unicast address of the anonymous network element in order to determine the network element information of the anonymous network element. If it is not an anonymous network element, determine whether the second network element is known. If it is unknown, add the second network element to the list of network elements to be probed.
[0011] Repeat the detection until the first network element in the list of network elements to be detected is detected;
[0012] Based on the network element information of each second network element, a network topology for the IPv6 network space is formed.
[0013] In some embodiments, performing a probe on each first network element to obtain a second network element directly connected to the first network element includes:
[0014] Determine whether the first network element supports the SNMP protocol;
[0015] If supported, read the configuration information of the first network element and obtain the IPv6 routing table information of the first network element in order to obtain the second network element directly connected to the network element to be detected.
[0016] If not supported, a preset probe program is invoked to search for information about the first network element in order to obtain the second network element directly connected to the first network element. The preset probe program is implemented based on the ICMPv6 protocol.
[0017] In some embodiments, determining whether the second network element is an anonymous network element includes:
[0018] Determine whether the value of the next-hop address information of the second network element is an IPv6 global unicast address;
[0019] If so, then the second network element is directly marked using the corresponding IPv6 global unicast address;
[0020] If the value of the next-hop address information of the second network element is a local link address, then check whether other interfaces of the second network element have IPv6 global unicast addresses. If so, mark them; otherwise, determine that the second network element is an anonymous network element.
[0021] In some embodiments, the preset seed set is constructed by obtaining the address prefixes from the IPv6 routing table of the actual network, and the preset seed set includes at least one set of IP addresses with different prefixes.
[0022] In some embodiments, using a preset probe program to find the IPv6 global unicast address of the anonymous network element includes:
[0023] Using a preset probe program, UDP packets are continuously sent to each target host based on the ICMPv6 protocol, where the target host is an IP address in the preset seed set;
[0024] The IPv6 global unicast address of the anonymous network element is located based on the response message information fed back by the network element in the link between the preset probe program and the target host.
[0025] In some embodiments, using a preset probe program to find the IPv6 global unicast address of the anonymous network element further includes:
[0026] The known network element information and the preset seed set are used to remove duplicates, so that the IPv6 global unicast address of the anonymous network element is uniquely identified.
[0027] In some embodiments, the network topology of the IPv6 network space is formed based on the network element information of each second network element, including:
[0028] Merge second network elements with the same domain name; and
[0029] For second network elements whose domain names cannot be resolved based on network element information, merging is performed using system information.
[0030] This invention also provides a network element detection device for IPv6 network space. The network element detection device includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, it implements the steps of the network element detection method for IPv6 network space described in the various embodiments of this disclosure.
[0031] This invention, through its design, first determines whether a network element is an anonymous network element, and then uses a preset probe program to find the IPv6 global unicast address of that anonymous network element, thereby enabling a rapid list of network elements to be probed.
[0032] Perform probes to quickly traverse all network elements in a sparse IPv6 network space and, based on the formed...
[0033] The form can quickly generate information on the usage of network elements in the IPv6 network space.
[0034] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0035] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0036] Figure 1 This is a basic flowchart of the network element detection method for IPv6 network space disclosed herein;
[0037] Figure 2 A flowchart illustrating a specific example of the network element detection method for IPv6 network space disclosed herein;
[0038] Figure 3 This is a flowchart of the network element detection method for IPv6 network space disclosed herein. Detailed Implementation
[0039] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0040] This disclosure provides a method for detecting network elements in IPv6 network space, including:
[0041] In step S101, a list of network elements to be detected is obtained, which records multiple network elements to be detected. For example, a list of IPv6 addresses in a sparse IPv6 address space can be obtained as the list of network elements to be detected.
[0042] In step S102, each first network element is probed to obtain the second network element directly connected to it. That is, each first network element in the list of network elements to be probed is probed for the first time. The purpose of this probe is to obtain the second network element directly connected to it. In step S103, the second network element is probed again. By performing the probe in this staged manner, the probe speed of the IPv6 network space can be greatly accelerated.
[0043] In step S103, for each second network element, it is determined whether the second network element is an anonymous network element. If so, based on the seed nodes in the preset seed set, a preset probe program is used to find the IPv6 global unicast address of the anonymous network element to determine its network element information. If it is not an anonymous network element, it is determined whether the second network element is known. If it is unknown, the second network element is added to the list of network elements to be probed. In practical application scenarios, IPv6 addresses are not assigned to network element nodes, but are directly assigned to the network interfaces of the network element. That is, each network element's network interface can simultaneously possess a global unicast address, a link-local address, and a site-local address. Suppose that some interfaces of a network element that only supports the IPv6 protocol stack are only configured with link-local addresses or site-local addresses, the routing table of the network element connected to it may use link-local addresses or site-local addresses to identify the network element. In this case, the network element is an anonymous network element. The method disclosed herein utilizes a pre-defined probe program to locate the IPv6 global unicast address of the anonymous network element, thereby determining the IPv6 global unicast address of the anonymous network element and achieving the purpose of probing. As an example, a list of IPv6 addresses within the obtained sparse IPv6 address space can be used as a pre-defined seed set.
[0044] In step S104, the detection is repeated until the detection of each first network element in the list of network elements to be detected is completed. That is, for the list of network elements to be detected, the second network elements directly connected to each first network element are repeatedly detected, and the second network elements are also detected, in order to obtain the network element information of the anonymous network element.
[0045] In step S105, a network topology for the IPv6 network space is formed based on the network element information of each second network element.
[0046] This invention, through its design, first determines whether a network element is an anonymous network element, and then uses a preset probe program to find the IPv6 global unicast address of that anonymous network element, thereby enabling a rapid list of network elements to be probed.
[0047] Perform probes to quickly traverse all network elements in a sparse IPv6 network space and, based on the formed...
[0048] The form can quickly generate information on the usage of network elements in the IPv6 network space.
[0049] In some embodiments, performing a probe on each first network element to obtain a second network element directly connected to the first network element includes:
[0050] The algorithm first determines whether the first network element supports the SNMP protocol. If it does, it reads the configuration information of the first network element and obtains its IPv6 routing table information to identify the second network elements directly connected to it. The gateway running the algorithm is selected as the starting point for the search. The algorithm accesses the MIB (Multi-Input Source) database to determine if the first network element supports IPv6 SNMP. If it does, the algorithm accesses the IPv6 routing table information in the MIB database to obtain all adjacent second network elements. Some vendors' network elements do not adequately support or support SNMP under IPv6. In some network environments, many network nodes disable SNMP to avoid security risks associated with SNMP services. By using the aforementioned determination steps, the detection speed is improved for nodes that support the SNMP protocol, thus enabling the discovery of as many network elements as possible.
[0051] If not supported, a preset probe program is invoked to search for information about the first network element in order to obtain the second network element directly connected to it. This preset probe program is implemented based on the ICMPv6 protocol. In other words, when it is determined that the first network element does not support the SNMP protocol, the ICMPv6 probe program is used as a supplement, discovering network elements that do not support SNMP and those with link-local addresses as their next hop, thus ensuring the integrity and accuracy of the network structure to a certain extent.
[0052] In some embodiments, determining whether the second network element is an anonymous network element includes:
[0053] Determine whether the value of the next-hop address information of the second network element is an IPv6 global unicast address;
[0054] If so, then the second network element is directly marked using the corresponding IPv6 global unicast address;
[0055] If the value of the next-hop address information of the second network element is a local link address, then check whether other interfaces of the second network element have IPv6 global unicast addresses. If so, mark them; otherwise, determine that the second network element is an anonymous network element.
[0056] The method disclosed herein aims to obtain the IPv6 global unicast address and location of a first or second network element. In this example, determining whether the second network element is an anonymous network element involves first checking if the value of its next-hop address information is an IPv6 global unicast address. If it is, the second network element is marked using that address, and the probing of the next network element is then performed. If the next-hop address information does not contain an IPv6 global unicast address, the other interfaces of the second network element are checked for IPv6 global unicast addresses. If they do, the element is marked; otherwise, it is determined to be an anonymous network element.
[0057] In some embodiments, the preset seed set is constructed by obtaining address prefixes from the IPv6 routing table of the actual network, and the preset seed set includes at least one set of IP addresses with different prefixes. For example, in the aforementioned example, the preset seed set can be based on a list of IPv6 addresses within the obtained sparse IPv6 address space. Alternatively, the seed set can be constructed by obtaining address prefixes from the IPv6 routing table of the actual network, and the seed set consists of a set of IP addresses with different prefixes, which can be specifically set according to actual needs.
[0058] In some embodiments, using a preset probe program to find the IPv6 global unicast address of the anonymous network element includes: using the preset probe program to continuously send UDP packets to each target host based on the ICMPv6 protocol, wherein the target host is an IP address in the preset seed set; and finding the IPv6 global unicast address of the anonymous network element based on the response packet information fed back by the network element in the link between the preset probe program and the target host.
[0059] One specific detection method can be as follows:
[0060] Using a pre-defined probe program, a series of UDP packets with decreasing TTL values are sent to the destination address (target host) in the seed set based on the ICMPv6 protocol.
[0061] Each target host always decrements its TTL value by 1 before forwarding the packet. If the TTL value becomes 0, a TTL timeout message is sent to the source address.
[0062] Because the TTL value of ICMPv6 packets forwarded by network elements in the link gradually decreases with each transmission, if the TTL value drops to 0 at a certain network element before the packet reaches its destination, that network element will return an ICMPv6 response packet with its global unicast address on one of its interfaces as the source address. The probe program can then use this returned response packet information to obtain the global unicast address of that network element and mark the anonymous network element.
[0063] In some embodiments, using a preset probe program to find the IPv6 global unicast address of the anonymous network element further includes: using known network element information and the preset seed set to perform deduplication, so as to uniquely identify the IPv6 global unicast address of the anonymous network element.
[0064] In some embodiments, forming a network topology for the IPv6 network space based on the network element information of each second network element includes: merging second network elements with the same domain name; and for second network elements whose domain names cannot be resolved based on network element information, merging is performed using system information. For the information of the searched network elements and their neighbor discovery network element chain, related domain names are resolved, and network elements with the same domain name are merged. For network elements whose domain names cannot be resolved, system information factors such as hardware information and version information are used to determine whether they are duplicates, and multi-address network elements are merged.
[0065] This disclosure also proposes an implementation example of a network element detection method in IPv6 network space, such as... Figure 2 As shown, it includes the following steps:
[0066] Step S201: Determine the IPv6 address of the local gateway and the list of network elements to be detected. Prepare the following lists: information of the searched network elements and their neighbor discovery network element linked list, list of network elements to be detected, list of network elements with known connection relationships, and list of global IPv6 addresses in the seed set.
[0067] Step S202: Take a network element from the list of network elements to be detected, determine whether it supports the SNMP protocol, and if not, call the ICMPv6-based topology discovery probe program to search for the network element's information, obtain the network elements directly connected to it, and save the information of the searched network element and its neighbor discovery network element linked list. For example... Figure 3 As shown, if supported, its configuration information is read, and the IPv6 routing table information of the network element is obtained. The network elements directly connected to it are then saved to the information of the searched network elements and its neighbor discovery network element chain.
[0068] Step S203: Perform the following for each next-hop network element of this network element:
[0069] Check if it is an anonymous network element. If so, use probes from different nodes to find the IPv6 global unicast address and location of the anonymous network element using seeds in the IPv6 global address list in the seed set. If found, replace the corresponding local link address with that address.
[0070] Check if the network element already has a known connection relationship in the list of network elements. If not, insert the network element into the list of network elements to be detected.
[0071] Add the network element to the list of network elements with known connections, and delete it from the list of network elements to be detected.
[0072] Step S204: Determine if the list of network elements to be detected is empty. If it is not empty, proceed to step S302; otherwise, all reachable network elements have been detected, and all relevant information is stored in the information of the searched network elements and their neighbor discovered network element chain.
[0073] Step S205: For the information of the searched network elements and their neighbor discovery network element chain, resolve the relevant domain names and merge network elements with the same domain name. For network elements whose domain names cannot be resolved, determine whether they are duplicates based on system information factors such as hardware information and version information, and merge multi-address network elements.
[0074] The method disclosed herein can quickly discover more network elements by designing a probe program and using the SNMP protocol in a collaborative detection approach. By determining whether a network element is anonymous and using a preset probe program to find the IPv6 global unicast address of that anonymous network element, it can quickly perform probing on the list of network elements to be probed. This enables rapid traversal of all network element devices in a sparse IPv6 network space and quickly establishes the network element usage status in the IPv6 network space based on the generated list.
[0075] This invention also provides a network element detection device for IPv6 network space. The network element detection device includes a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, it implements the steps of the network element detection method for IPv6 network space described in the various embodiments of this disclosure.
[0076] 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 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. 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 apparatus that includes that element.
[0077] 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.
[0078] 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 ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (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.
[0079] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A method for detecting network elements in IPv6 network space, characterized in that, include: Obtain a list of network elements to be detected, wherein the list of network elements to be detected records multiple first network elements to be detected; For each first network element, perform a probe to obtain the second network element directly connected to that first network element; For each second network element, determine whether the second network element is an anonymous network element. If so, based on the seed nodes in the preset seed set, use the preset probe program to find the IPv6 global unicast address of the anonymous network element in order to determine the network element information of the anonymous network element. If it is not an anonymous network element, then determine whether the second network element is known. If it is unknown, then add the second network element to the list of network elements to be detected. Repeat the detection until the first network element in the list of network elements to be detected is detected; Based on the network element information of each second network element, a network topology for the IPv6 network space is formed; The preset seed set is constructed by obtaining the address prefixes from the IPv6 routing table of the actual network, and the preset seed set includes at least one set of IP addresses with different prefixes; Using a pre-defined probe program to find the IPv6 global unicast address of this anonymous network element includes: Using a preset probe program, UDP packets are continuously sent to each target host based on the ICMPv6 protocol, where the target host is an IP address in the preset seed set; Based on the response message information fed back by network elements in the link between the preset probe program and the target host, the IPv6 global unicast address of the anonymous network element is found. Determining whether the second network element is an anonymous network element includes: Determine whether the value of the next-hop address information of the second network element is an IPv6 global unicast address; If so, then the second network element is directly marked using the corresponding IPv6 global unicast address; If the value of the next-hop address information of the second network element is a local link address, then check whether other interfaces of the second network element have IPv6 global unicast addresses. If so, mark them; otherwise, determine that the second network element is an anonymous network element.
2. The network element detection method for IPv6 network space as described in claim 1, characterized in that, For each first network element, a probe is performed to identify the second network elements directly connected to that first network element, including: Determine whether the first network element supports the SNMP protocol; If supported, read the configuration information of the first network element and obtain the IPv6 routing table information of the first network element in order to obtain the second network element directly connected to the network element to be detected. If not supported, a preset probe program is invoked to search for information about the first network element in order to obtain the second network element directly connected to the first network element. The preset probe program is implemented based on the ICMPv6 protocol.
3. The network element detection method for IPv6 network space as described in claim 1, characterized in that, Using a pre-defined probe program to find the IPv6 global unicast address of this anonymous network element also includes: The known network element information and the preset seed set are used to remove duplicates, so that the IPv6 global unicast address of the anonymous network element is uniquely identified.
4. The network element detection method for IPv6 network space as described in claim 1, characterized in that, Based on the network element information of each second network element, the network topology of the IPv6 network space includes: Merge second network elements with the same domain name; and For second network elements whose domain names cannot be resolved based on network element information, merging is performed using system information.
5. A network element detection device for IPv6 network space, characterized in that, The network element detection device includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, implements the steps of the network element detection method for IPv6 network space as described in any one of claims 1 to 4.