Address association relationship determination method, apparatus, device, and computer storage medium
By constructing routing trees and address trees, the IP address associations are automatically determined, solving the problems of time-consuming and labor-intensive manual data entry and poor data accuracy in existing technologies. This achieves efficient and accurate determination of IP address associations and improves the efficiency of network fault handling.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANDAN BRANCH OF CHINA MOBILE GRP HEBEI COMPANYLIMITED
- Filing Date
- 2022-07-06
- Publication Date
- 2026-06-02
AI Technical Summary
The lack of automated methods for determining IP address associations in existing network management systems leads to time-consuming and labor-intensive manual data entry, poor data accuracy, and inability to update data in a timely manner.
By collecting subnet routes and device identifiers of network devices, a routing tree and an address tree are constructed. The association relationship of IP addresses is determined by using subnet inclusion relationships, and computer-based automated processing is implemented.
It reduces manpower and time costs, improves the efficiency and accuracy of determining IP address associations, enables timely updates to the network structure, and enhances the efficiency of network fault handling.
Smart Images

Figure CN117411823B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer science, and in particular relates to a method, apparatus, device and computer storage medium for determining address association. Background Technology
[0002] With the continuous development of internet services, data services based on IP (Internet Protocol) are increasing dramatically, such as leased internet lines, home broadband, and IDC (Internet Data Center). According to IP address management requirements, each used IP address needs to maintain attribute information such as status, device, and association relationships. The association relationship mainly refers to the routing method advertised by the subnet corresponding to the IP address, including network devices, addresses, and routing methods. Through these association relationships, network maintenance personnel can quickly understand the routing address range and advertising path to which an IP address belongs. When encountering network faults, network maintenance personnel no longer need to log into devices at each level from the core layer, aggregation layer to the access layer to find the route; they can directly query the association relationship by IP address to gain a clear understanding of the entire network structure and routing, thus quickly locating the fault.
[0003] Currently, network management systems primarily focus on network topology, i.e., the connections between devices, lacking information on IP address associations. While a few network management systems combine network topology and IP address associations, these associations are mainly obtained via BGP (Border Gateway Protocol) for backbone networks, not for access networks. Therefore, to comprehensively understand IP address associations within the network, manual input is currently the primary method for setting these associations. However, manual input requires maintenance personnel to log in offline to each device, traversing levels to verify the subnet route and devices along the route, consuming significant time and manpower. Summary of the Invention
[0004] This application provides a method, apparatus, device, and computer storage medium for determining address associations, which can quickly determine address associations without manual input, saving manpower and time.
[0005] In a first aspect, embodiments of this application provide a method for determining address association relationships, including:
[0006] Collect subnet routes and device identifiers for multiple devices in the network;
[0007] A routing tree is constructed based on the subnet inclusion relationship among multiple subnet routes, where each node in the routing tree corresponds to a subnet route.
[0008] For each leaf node in the routing tree, determine the corresponding IP address. The IP address corresponding to the leaf node is the IP address contained in the subnet route corresponding to the leaf node in the network.
[0009] The address tree is obtained by connecting the address nodes under the leaf nodes. The address nodes store the IP address and device identifier corresponding to the leaf node. The device identifier corresponding to the leaf node is the device identifier corresponding to the subnet route of the leaf node.
[0010] For an IP address in the network, the address tree is traversed upwards from the address node where the IP address is located to determine the target subnet route through which the IP address passes and the target device identifier corresponding to the target subnet route.
[0011] As one possible implementation, a routing tree is constructed based on the subnet inclusion relationship between multiple subnet routes, including:
[0012] Grouping multiple subnet routes yields at least one subnet set, where subnet routes within the same subnet set belong to the same subnet segment, and subnet routes in different subnet sets belong to different subnet segments;
[0013] For each subnet set, a routing tree corresponding to the subnet set is constructed based on the subnet inclusion relationships between the subnet routes in the subnet set.
[0014] As one possible implementation, a routing tree corresponding to the subnet set is constructed based on the subnet inclusion relationships between subnet routes in the subnet set, including:
[0015] The subnet routes in the subnet set are sorted in descending order of mask, and the subnet routes with the same mask are sorted in ascending order of address.
[0016] The sorted subnet routes are traversed from front to back, and the subnet inclusion relationships between subnet routes in the subnet set are determined according to the classless inter-domain routing rules.
[0017] Based on the subnet inclusion relationship, construct the routing tree corresponding to the subnet set.
[0018] As one possible implementation, the method further includes:
[0019] For an IP address in the network, obtain the device identifier in the address node where the IP address is located;
[0020] Identify the target device corresponding to the device identifier and obtain the network topology map of the target device;
[0021] In the network topology diagram, identify the target device node corresponding to the target device identifier;
[0022] Add the target subnet route to the corresponding target device node to obtain the address topology map.
[0023] As one possible implementation, the method further includes:
[0024] After obtaining the address topology map, identify the device nodes in the address topology map that have not been added to the subnet route, and delete the device nodes from the address topology map.
[0025] As one possible implementation, the method includes:
[0026] Before constructing a routing tree based on the subnet inclusion relationship between multiple subnet routes, the multiple subnet routes are preprocessed so that the routing tree can be constructed based on the subnet inclusion relationship between the preprocessed multiple subnet routes.
[0027] Preprocessing includes filtering, deduplication, and / or format conversion. Filtering includes removing private network routes and proxy addresses, deduplication includes removing duplicate subnet routes, and format conversion includes converting the subnet route format to a preset storage format.
[0028] As one possible implementation, the method further includes:
[0029] Construct a hash table where the subnet segment is the key and the storage address of the routing tree of the subnet set corresponding to the subnet segment is the value.
[0030] Secondly, embodiments of this application also provide an address association determination device, the device comprising:
[0031] The data acquisition unit is used to collect subnet routes and device identifiers of multiple devices in the network.
[0032] A routing tree building unit is used to build a routing tree based on the subnet inclusion relationship between multiple subnet routes, wherein each node in the routing tree corresponds to a subnet route;
[0033] The determining unit is used to determine the IP address corresponding to the leaf node in the routing tree, wherein the IP address corresponding to the leaf node is the IP address contained in the subnet route corresponding to the leaf node in the network.
[0034] The address tree construction unit is used to connect address nodes under leaf nodes to obtain an address tree. The address nodes store the IP address and device identifier corresponding to the leaf node, and the device identifier corresponding to the leaf node is the device identifier corresponding to the subnet route of the leaf node.
[0035] The relationship determination unit is used to traverse the address tree upwards from the address node where the IP address is located for an IP address in the network, and determine the target subnet route and the target device identifier corresponding to the target subnet route.
[0036] Thirdly, embodiments of this application also provide an address association determination device, the device comprising: a processor and a memory storing computer program instructions;
[0037] When the processor executes the computer program instructions, it implements the address association determination method as described in any one of the first aspects.
[0038] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the address association determination method as described in any one of the first aspects.
[0039] Fifthly, embodiments of this application also provide a computer program product, wherein instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform the address association determination method as described in any one of the first aspects.
[0040] The address association determination method, apparatus, device, and computer storage medium of this application embodiment collect subnet routes and device identifiers of multiple devices in a network. A routing tree is constructed based on the subnet inclusion relationships among the multiple subnet routes. Each node in the routing tree corresponds to a subnet route. For leaf nodes in the routing tree, the IP address contained in the subnet route corresponding to the leaf node and the corresponding device identifier are stored in the address node. This address node is then connected to the leaf node to obtain the address tree. For an IP address in the network, the address tree is traversed upwards from the address node containing the IP address to determine the target subnet route through which the IP address passes and the target device identifier corresponding to the target subnet route. Compared to manual input, determining the IP address association based on the address tree requires less manpower and time, and is more efficient. Attached Figure Description
[0041] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is a flowchart illustrating a method for determining address associations according to an embodiment of this application;
[0043] Figure 2 This is a schematic diagram of the routing tree structure provided in one embodiment of this application;
[0044] Figure 3 This is a schematic diagram of the address tree structure provided in one embodiment of this application;
[0045] Figure 4 This is a schematic diagram of a network topology provided in one embodiment of this application;
[0046] Figure 5 This is a schematic diagram of an address map provided in one embodiment of this application;
[0047] Figure 6 This is a schematic diagram of the structure of an address association determination device provided in one embodiment of this application;
[0048] Figure 7 This is a schematic diagram of an address relationship management system provided in one embodiment of this application;
[0049] Figure 8 This is a schematic diagram of the structure of an address association determination device provided in one embodiment of this application. Detailed Implementation
[0050] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0051] It should be noted that, in this document, relational terms such as "first" and "second" are used merely 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..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0052] Currently, the method of manually entering IP address associations presents a problem of difficulty in drawing the address association relationships. This is mainly because a large number of IP addresses are already in use in the existing network. When manually entering IP addresses, it takes a lot of time and manpower to log in to the device for each IP address and query the subnet routes published by the device.
[0053] In addition to the issues mentioned above, manual data entry also suffers from poor data accuracy. Because network structures change frequently and services are constantly being cut off, subnet routing masks, access locations, and other parameters also change. Furthermore, new devices are frequently added to the network, and manual operations are often delayed, leading to low data accuracy.
[0054] To address the problems of the prior art, embodiments of this application provide a method, apparatus, device, and computer storage medium for determining address association relationships. The method for determining address association relationships provided in this application embodiment will be described first below.
[0055] Figure 1 A flowchart illustrating an embodiment of the address association determination method provided in this application is shown. Figure 1 As shown, the address association determination method provided in this application embodiment may include the following steps:
[0056] S11. Collect subnet routes and device identifiers of multiple devices in the network.
[0057] S12. Construct a routing tree based on the subnet inclusion relationship between multiple subnet routes, wherein each node in the routing tree corresponds to a subnet route.
[0058] S13. For the leaf nodes in the routing tree, determine the IP address corresponding to the leaf node, where the IP address corresponding to the leaf node is the IP address contained in the subnet route corresponding to the leaf node in the network.
[0059] S14. Connect the address nodes under the leaf nodes to obtain the address tree. The address nodes store the IP address and device identifier corresponding to the leaf node. The device identifier corresponding to the leaf node is the device identifier corresponding to the subnet route of the leaf node.
[0060] S15. For an IP address in the network, traverse the address tree upwards from the address node where the IP address is located to determine the target subnet route through which the IP address passes and the target device identifier corresponding to the target subnet route.
[0061] This application discloses a method for determining address association relationships. It collects subnet routes and device identifiers from multiple devices in a network, constructs a routing tree based on the subnet inclusion relationships between these routes, and assigns each node in the routing tree to a specific subnet route. For each leaf node in the routing tree, the address of the IP address contained in the subnet route corresponding to the leaf node and its corresponding device identifier are stored in an address node. This address node is then connected to the leaf node, thus obtaining the address tree. For each IP address in the network, the address tree is traversed upwards from the address node containing the IP address to determine the target subnet route and the target device identifier corresponding to that IP address. Compared to manual input, determining IP address association relationships based on an address tree requires less manpower and time, and is more efficient. Furthermore, the address association relationship determination method provided in this application can be implemented by a computer, resulting in more timely updates and more accurate address association relationships compared to manual methods, thereby improving network fault handling efficiency.
[0062] The specific implementation methods for each of the above steps are described below.
[0063] In some embodiments, when collecting subnet routes and device identifiers of multiple devices in the network in S11, the multiple devices in the network whose subnet routes need to be collected, as well as the content to be collected for each device, can be determined first. Then, for each device, the device identifier of the device is collected, and the subnet route of the device is collected based on the content to be collected.
[0064] In one example, the device identifier can be collected using a preset instruction for collecting device identifiers, or it can be manually input through an input module, and the identifier collected based on the input module is not specifically limited in this regard.
[0065] In one example, when determining which devices need to have their subnet routes collected, all devices in the network can be identified as devices for which subnet routes need to be collected, thereby achieving address association across the entire network. Alternatively, the computer or user can select a subset of devices in the network as devices for which subnet routes need to be collected based on actual needs, thereby achieving targeted address association.
[0066] In one example, due to the different network protocols configured at different network layers, the content to be collected for each device can be determined according to the actual configuration. Taking a mobile network as an example, the devices typically include provincial core routers, municipal core routers, municipal aggregation routers, municipal aggregation switches, metropolitan area network aggregation switches, WLAN / IDC core switches, etc. For provincial core routers, the collected content can include directly connected routes, dynamic routes (OSPF), static routes, and / or BGP routes; for municipal core routers, the collected content can include directly connected routes, OSPF routes, and / or static routes; for municipal aggregation routers, the collected content can include directly connected routes, user network routes (UNR), static routes, and / or OSPF routes; and for municipal aggregation switches, the collected content can include directly connected routes and / or static routes.
[0067] In one example, for simplicity of implementation, a human-computer interaction-based data collection command can be used to collect subnet routes of devices. However, since devices in the network may come from different manufacturers, and different manufacturers may use different applicable data collection commands, it is advisable to select the appropriate data collection command for the specific device manufacturer when collecting subnet routes. For example, the command to collect static routes for Cisco devices can be `show ip route connected`, while the command to collect static routes for Huawei devices can be `display ip routing-table protocol direct`.
[0068] In some embodiments, when constructing the routing tree in S12, considering that the number of collected subnet route entries may be large, but the network topology hierarchy or subnet inclusion relationship may be relatively small, in order to reduce the number of lookups and improve address lookup efficiency, a low-level multi-branch tree can be constructed as the routing tree.
[0069] In one example, the network segments published by devices in the network are usually large aggregate segments, with a relatively small number, perhaps only a dozen or so, but a large number of detailed routes. Therefore, in order to facilitate quick querying of the routing tree later, when building the routing tree, the collected subnet routes can be grouped into at least one subnet set, and then the corresponding routing tree can be built for each group.
[0070] In one example, when dividing the collected multiple subnet routes into at least one subnet set, subnet routes belonging to the same subnet segment can be assigned to the same subnet set, and subnet routes belonging to different subnet segments can be assigned to different subnet sets. The division of subnet segments can be set according to the actual situation.
[0071] In one example, for a mobile network, the collected subnet routes can be grouped according to Class B addresses. Subnet routes belonging to the same Class B subnet segment can be grouped into the same subnet set, while subnet routes belonging to different Class B subnet segments can be grouped into different subnet sets. Subnet routes smaller than Class B can be uniformly stored as Class B for simplified storage.
[0072] After grouping the subnet routes, for each subnet set, a routing tree corresponding to that subnet set can be constructed based on the subnet inclusion relationships between the subnet routes in the subnet set.
[0073] In one example, when constructing the routing tree corresponding to a subnet set, the subnet routes in the subnet set can be sorted in descending order of their masks. For subnet routes with the same mask, they can be sorted in ascending order of their addresses. The sorted subnet routes are then traversed from front to back. Based on the classless inter-domain routing rules, the subnet inclusion relationships between the subnet routes in the subnet set are determined. Then, based on these subnet inclusion relationships, the routing tree corresponding to the subnet set is constructed. This method allows for the rapid construction of the routing tree corresponding to a subnet set.
[0074] In one example, when traversing the sorted subnet routes from front to back, the subnet routes and the set of child subnet routes S = {s1, s2, s3, ..., s4} are calculated according to the Classless Inter-Domain Routing (CIDR) rules. n}, where each element of the set is of the form {s} i ,{s i1 s i2 s i3 ...s ik}},s i For the parent subnet routing, {s i1 s i2 s i3 ...s ik} is the parent subnet route s i The child subnet route set can be stored as pointers to facilitate the construction of the routing tree.
[0075] A routing tree is constructed based on the above set. When constructing the routing tree, the subnet route without a parent subnet route is taken as the root node. Then, based on the above set, the child subnet routes of the subnet route corresponding to the root node are taken as the child nodes of the root node. This process is repeated, and the child nodes of each child node are determined according to a recursive algorithm until all child nodes are determined to be empty, thus completing the construction of the routing tree.
[0076] For example, assuming a subnet set contains routes for the subnets 183.198.0.0 / 16, 183.198.0.0 / 22, 183.198.4.0 / 22, 183.198.0.0 / 24, 183.198.1.0 / 24, 183.198.4.0 / 24, and 183.198.5.0 / 24, the routing tree corresponding to this subnet set constructed based on the above method is as follows: Figure 2 As shown.
[0077] To facilitate subsequent determination of subnet routes and corresponding devices based on the routing tree, the subnet routes and corresponding device identifiers for each node in the routing tree can be recorded. For example, a new set LS = {(s1, dev1), (s2, dev1), (s3, dev3), ..., (s... m ,dev m The elements of this set are the subnet routes and device identifiers corresponding to the nodes, where s m This represents the subnet routes stored in node m, dev m This represents the device identifier corresponding to node m. The device identifier corresponding to a node is also the device identifier corresponding to the subnet route of that node, i.e., dev. m It is a subnet router. m The corresponding device identifier. Specifically, the device identifier corresponding to a subnet route is the device identifier of the device to which that subnet route belongs. For example, when collecting subnet routes, if subnet route B for device A is collected, then the device identifier corresponding to subnet route B is the device identifier of device A.
[0078] In this embodiment of the application, the routing tree constructed in the above manner has the advantages of low hierarchy and easy querying. Moreover, the routing tree is constructed based on the subnet inclusion relationship, and the association relationship between subnets can be determined according to the routing tree.
[0079] In some embodiments, after the routing tree is constructed, in S13, when determining the IP address corresponding to the leaf node in each routing tree, the IP address in the network can be determined first, and then for each leaf node, the target IP address in the subnet route corresponding to the leaf node is determined based on the CIDR rules, and then the target IP address is used as the IP address corresponding to the leaf node.
[0080] For example, assuming a network with IP addresses including 183.198.0.1, 183.198.0.2, 183.198.4.1, and 183.198.5.2, based on CIDR rules, it can be determined that 183.198.0.1 and 183.198.0.2 are included in the subnet route of 183.198.0.0 / 24, 183.198.4.1 is included in the subnet route of 183.198.4.0 / 24, and 183.198.5.2 is included in the subnet route of 183.198.0.0 / 24. In the subnet routes of 3.198.5.0 / 24, it can be seen that the leaf nodes of the subnet routes of 183.198.0.0 / 24 correspond to IP addresses of 183.198.0.1 and 183.198.0.2, the leaf nodes of the subnet routes of 183.198.4.0 / 24 correspond to IP addresses of 183.198.4.1, and the leaf nodes of the subnet routes of 183.198.5.0 / 24 correspond to IP addresses of 183.198.5.2.
[0081] In some embodiments, after determining the IP address corresponding to the leaf node, in S14, for each routing tree, an address node is connected to the leaf node of the routing tree to obtain an address tree. The address node stores the IP address and device identifier corresponding to the leaf node. The device identifier corresponding to the leaf node is the device identifier corresponding to the subnet route of the leaf node.
[0082] In the current network, addresses are usually advertised in the form of subnets. The access device of each IP address is the same as the device corresponding to the longest subnet route to which the IP address belongs. Therefore, the device identifier corresponding to the leaf node of the IP address is the access device of that IP address.
[0083] As an example, the access devices with IP addresses are shown in the table below:
[0084]
[0085]
[0086] In this context, HESJ-MC-CMNET-BRAS04-ME60 is the device identifier corresponding to subnet route 183.198.0.0 / 24. Since IP addresses 183.198.0.1 and 183.198.0.3 are included in subnet route 183.198.0.0 / 24, the access device identifier for IP addresses 183.198.0.1 and 183.198.0.3 is HESJ-MC-CMNET-BRAS04-ME60. 0; HESJ-MC-CMNET-BRAS07-ME60 is the device identifier corresponding to subnet route 183.198.1.0 / 24, and IP address 183.198.1.1 is included in subnet route 183.198.1.0 / 24, so the access device identifier for IP address 183.198.1.1 is HESJ-MC-CMNET-BRAS07-ME60; HETSH-PC-CMNET-RT01-NE5 KE is the device identifier corresponding to subnet route 211.143.64.0 / 27. IP addresses 211.143.64.1 and 211.143.64.15 are included in subnet route 211.143.64.0 / 27. Therefore, the access device identifier for IP addresses 211.143.64.1 and 211.143.64.15 is HETSH-PC-CMNET-RT01-NE5KE; HETSH-PC-CMNET-RT 01-NE40E is the device identifier corresponding to subnet route 211.143.104.0 / 30. IP addresses 211.143.104.105 and 211.143.104.106 are included in subnet route 211.143.64.0 / 27. Therefore, the access device identifier for IP addresses 211.143.104.105 and 211.143.104.106 is HETSH-PC-CMNET-RT01-NE40E.
[0087] In one example, because the number of IP addresses in the network is limited, there may be leaf nodes that do not have corresponding IP addresses. For such leaf nodes, there is no need to connect them to address nodes.
[0088] In one example, a leaf node may correspond to multiple IP addresses, and multiple address nodes can be connected to the leaf node corresponding to multiple IP addresses. Each address node stores an IP address and a device identifier. Different address nodes store different IP addresses, but the device identifiers can be the same.
[0089] Furthermore, in one example, the IP address and device identifier in the address node can be stored in key-value pairs, where the key stores the IP address and the value stores the device identifier.
[0090] For example, Figure 2 Taking the routing tree shown as an example, the leaf nodes corresponding to the subnet routes of 183.198.0.0 / 24 have IP addresses of 183.198.0.1 and 183.198.0.2, and their corresponding device identifiers are HESJ-MC-CMNET-BRAS04-ME60; the leaf nodes corresponding to the subnet routes of 183.198.4.0 / 24 have IP addresses of 183.198.4.1, and their corresponding device identifiers are HESJ-MC-CMNET-BRAS07-ME60; the leaf nodes corresponding to the subnet routes of 183.198.5.0 / 24 have IP addresses of 183.198.5.2, and their corresponding device identifiers are HESJ-MC-CMNET-BRAS11-ME60; then the address tree constructed based on the above content is as follows: Figure 3 As shown.
[0091] In the example embodiments of this application, the constructed address tree can accurately and intuitively reflect the relationship between IP addresses, subnet routes, and devices, and based on this, the address relationship of IP addresses can be quickly determined.
[0092] In some embodiments, after the address tree is constructed, the IP address whose address association needs to be determined can be identified in S15. Then, for the IP address, the address tree is traversed upwards from the address node where the IP address is located. The routing tree node of the path is determined. Each routing tree node corresponds to a subnet route and a device identifier. Therefore, the target subnet route of the IP address path and the target device identifier corresponding to the target subnet route can be determined.
[0093] In this embodiment of the application, the device that can quickly determine the subnet route of the IP address path can be determined by traversing the address tree, saving time and effort.
[0094] As another implementation of this application, in order to understand the address relationships more intuitively, after S15, the subnet relationship of IP addresses can be merged with the network topology to obtain an address topology map, so as to comprehensively present the address relationships.
[0095] In one example, for an IP address, the device identifier in the address node where the IP address is located can be obtained, the target device corresponding to the device identifier can be determined, and the network topology map of the target device can be obtained. After determining the target subnet route through which the IP address passes and the target device identifier corresponding to the target subnet route, the target device node corresponding to the target device identifier can be determined in the network topology map. Then, the subnet name of the target subnet route is added to the corresponding target device node, thereby obtaining the address topology map.
[0096] Most existing network management systems have already calculated a relatively complete network topology based on routing tables or link-layer protocols. Therefore, after determining the access device corresponding to the IP address, a network topology map with that access device as the starting node can be obtained from the network management system.
[0097] For example, when determining the association of the IP address 211.143.104.124, the process first involves finding the address tree containing that IP address, then identifying the address node containing that IP address within that address tree, and finally retrieving the device identifier from that address node. Taking the device identifier HELAF-MC-CMNET-BRAS02-ME60 as an example, the following information is obtained based on this device identifier: Figure 4 The network topology diagram shown, based on the address tree, identifies the target subnet routes for this IP address as 211.143.104.124 / 30, 211.143.104.0 / 22, and 211.143.64.0 / 18. According to the previously constructed set LS, the device identifier corresponding to 211.143.104.124 / 30 is HELAF-MC-CMNET-BRAS02-ME60, the device identifiers corresponding to 211.143.104.0 / 22 are HELAF-PC-CMNET-RT01-NE5KE and HELAF-PC-CMNET-RT02-NE5KE, and the device identifiers corresponding to 211.143.64.0 / 18 are HESJ-PB-CMNET-RT01-NE5KE-1 and HECAZ-PB-CMNET-RT01-NE5KE-1. Based on this, for... Figure 4 Adding corresponding subnet routes to each device node in the network topology shown will result in the following: Figure 5 The address topology diagram shown.
[0098] In the embodiments of this application, the address relationships can be presented in a topological form through the above method, which is more intuitive. When performing fault analysis, the relationship between addresses can be understood more quickly, so that the network is no longer a "black box", thereby improving the efficiency of fault handling.
[0099] In one example, to quickly determine the address tree where an IP address is located, a hash table can be built during or after the construction of the routing tree. The hash table uses the subnet segment as the key and the storage address of the routing tree of the subnet set corresponding to the subnet segment as the value. The storage address of the routing tree is the storage address of the address tree generated based on that routing tree.
[0100] Based on the hash table mentioned above, when determining the address association of IP addresses, the IP addresses can first be aggregated into subnets, and then the storage address corresponding to the subnet can be determined based on the hash table. This leads to the storage address of the address tree where the IP address is located, allowing for quick access to the address tree.
[0101] For example, when determining the association of the IP address 211.143.104.124, it can first be aggregated into a Class B address 211.143.0.0 / 16. Then, by looking up the hash table, the storage address corresponding to the subnet 211.143.0.0 / 16 can be determined, and the address tree containing 211.143.104.124 can be found from that storage address.
[0102] Furthermore, after obtaining the address topology map, it can be determined whether there are any device nodes in the address topology map that have not been added to the subnet route. If so, the device nodes that have not been added to the subnet route can be deleted from the address topology map, because these devices may be irrelevant devices, thus ensuring the accuracy of the address topology map.
[0103] As another implementation of this application, in order to facilitate the construction of the routing tree and improve the efficiency of the routing tree construction, the collected multiple subnet routes can be preprocessed before S12, and then the routing tree can be constructed in S12 based on the subnet inclusion relationship between the preprocessed multiple subnet routes.
[0104] In one example, preprocessing includes filtering, deduplication, and / or format conversion. Filtering includes removing private network routes and proxy addresses; format conversion includes converting the subnet route format to a preset storage format; and deduplication primarily removes duplicate subnet routes, where duplicate subnet routes refer to subnet routes with identical address prefixes and masks.
[0105] In one example, when performing format conversion, a routing storage model can be pre-set according to actual needs, and then the subnet routes can be stored according to the routing storage model to achieve format conversion, so that the subnet routes retain relevant information. For example, the routing storage model includes at least the subnet name, next-hop interface, protocol priority, cost value, etc.
[0106] In one example, deduplication can be performed first based on routing protocol priority. Assuming the priority of routing protocols from highest to lowest is: directly connected routing protocol (direct), static routing protocol (static), user routing protocol (unr), dynamic routing protocol (OSPF), and OASE protocol (oase), then if duplicate subnet routes are found, only the highest priority subnet route will be retained. For example, if 111.63.1.0 / 30 can be learned from both directly connected routes and OSPF routes, then only the directly connected route record will be retained.
[0107] Furthermore, because the OSPF dynamic routing protocol learns from each other and introduces directly connected and static external routes, there may be a large number of duplicate routes in the collected subnet routes. When deduplicating OSPF routes, the following two rules apply: First, subnet routes are sorted by cost value, with lower cost values retained first; second, deduplication is based on the next-hop IP address of the subnet route. If the next-hop IP address of a subnet route exists in the directly connected routing table, that subnet route is deleted.
[0108] Furthermore, considering that to improve reliability, large aggregated address ranges in the existing network will have routes advertised on at least two devices, after the above deduplication rules, if multiple (including two) identical subnet routes still exist, one will be randomly retained.
[0109] Based on the address association determination method provided in the above embodiments, this application also provides specific implementations of the address association determination device. Please refer to the following embodiments.
[0110] First see Figure 6 The address association determination device provided in this application embodiment includes the following units:
[0111] The acquisition unit 601 is used to acquire subnet routes and device identifiers of multiple devices in the network;
[0112] The routing tree construction unit 602 is used to construct a routing tree based on the subnet inclusion relationship between multiple subnet routes, wherein each node in the routing tree corresponds to a subnet route;
[0113] The determining unit 603 is used to determine the IP address corresponding to the leaf node in the routing tree, wherein the IP address corresponding to the leaf node is the IP address contained in the subnet route corresponding to the leaf node in the network.
[0114] Address tree construction unit 604 is used to connect address nodes under leaf nodes to obtain an address tree. The address nodes store the IP address and device identifier corresponding to the leaf node, and the device identifier corresponding to the leaf node is the device identifier corresponding to the subnet route of the leaf node.
[0115] The relationship determination unit 605 is used to traverse the address tree upwards from the address node where the IP address is located for an IP address in the network, and determine the target subnet route through which the IP address passes and the target device identifier corresponding to the target subnet route.
[0116] The address association determination device in this application collects subnet routes and device identifiers of multiple devices in the network. It constructs a routing tree based on the subnet inclusion relationships among these routes, with each node in the routing tree corresponding to a subnet route. For each leaf node in the routing tree, the address of the IP address contained in the subnet route corresponding to the leaf node and the corresponding device identifier are stored in an address node. This address node is then connected to the leaf node, thus obtaining the address tree. For each IP address in the network, the address tree is traversed upwards from the address node containing the IP address to determine the target subnet route and the target device identifier corresponding to that IP address. Compared to manual input, determining IP address associations based on an address tree requires less manpower and time, resulting in higher efficiency. Furthermore, the address association determination method provided in this application can be implemented by a computer, allowing for more timely updates compared to manual methods. Therefore, the determined address associations are more accurate, thereby improving network fault handling efficiency.
[0117] In one example, route tree building unit 602 is used for:
[0118] Grouping multiple subnet routes yields at least one subnet set, where subnet routes within the same subnet set belong to the same subnet segment, and subnet routes in different subnet sets belong to different subnet segments;
[0119] For each subnet set, a routing tree corresponding to the subnet set is constructed based on the subnet inclusion relationships between the subnet routes in the subnet set.
[0120] In one example, a routing tree corresponding to the subnet set is constructed based on the subnet inclusion relationships between subnet routes in the subnet set, including:
[0121] The subnet routes in the subnet set are sorted in descending order of mask, and the subnet routes with the same mask are sorted in ascending order of address.
[0122] The sorted subnet routes are traversed from front to back, and the subnet inclusion relationships between subnet routes in the subnet set are determined according to the classless inter-domain routing rules.
[0123] Based on the subnet inclusion relationship, construct the routing tree corresponding to the subnet set.
[0124] In one example, the above-mentioned device may further include:
[0125] The topology merging unit is used to obtain the device identifier in the address node where the IP address is located for an IP address in the network; determine the target device corresponding to the device identifier and obtain the network topology map of the target device; determine the target device node corresponding to the target device identifier in the network topology map; add the target subnet route to the corresponding target device node to obtain the address topology map.
[0126] In one example, the above-mentioned device may further include:
[0127] The topology modification unit is used to determine, after obtaining the address topology map, the device nodes that have not been added to the address topology map and delete them from the address topology map.
[0128] In one example, the above-mentioned device may further include:
[0129] The preprocessing unit is used to preprocess multiple subnet routes before constructing a routing tree based on the subnet inclusion relationship between multiple subnet routes, so as to construct a routing tree based on the subnet inclusion relationship between the preprocessed multiple subnet routes;
[0130] Preprocessing includes filtering, deduplication, and / or format conversion. Filtering includes removing private network routes and proxy addresses, deduplication includes removing duplicate subnet routes, and format conversion includes converting the subnet route format to a preset storage format.
[0131] In one example, the above-mentioned device may further include:
[0132] The table creation unit is used to construct a hash table, where the hash table uses the subnet segment as the key and the storage address of the routing tree of the subnet set corresponding to the subnet segment as the value.
[0133] To implement the address association determination method provided in the above embodiments, this application also provides a specific implementation of an address relationship management system. Please refer to the following embodiments.
[0134] First see Figure 7 The address relationship management system provided in this application embodiment may include the following modules: a route acquisition module, a route analysis module, an association relationship calculation module, and a topology presentation module.
[0135] The routing acquisition module is used to collect subnet routes and device identifiers of devices in the network. These devices may include provincial network core routers, municipal aggregation routers, municipal core routers, metropolitan area network aggregation switches, WLAN / IDC core switches, etc.
[0136] In one example, the route acquisition module can collect subnet routes via the northbound interface of the data network management system according to a preset collection period. The collection period can be set according to actual needs, for example, daily. The route acquisition module mainly involves two steps: first, confirming the content to be collected; second, confirming the collection command. After collection, the subnet routes can be categorized and stored, for example, stored in different collection files according to different route types. The collection files are then uploaded to a designated server for subsequent analysis. Because each device in the network has a different loopback address, the file name for each device's subnet route can be uniformly named: Routing Protocol + Device Loopback Address for easy differentiation.
[0137] The routing analysis module analyzes and processes the collected subnet routes, such as filtering and deduplicating them according to rules, and storing them uniformly in a specific routing storage model, so that the correlation calculation module can directly extract the data. The main purpose of the routing analysis module is to remove duplicate learned subnet routes and calculate the access devices corresponding to their IP addresses.
[0138] The relationship calculation module is used to construct an address tree based on the subnet routes in the routing storage model. This includes building the routing tree and grafting address nodes onto the routing tree to obtain the address tree. Furthermore, it can combine this with an external network management interface to obtain a network topology diagram between devices and merge the subnet relationships of IP addresses determined based on the address tree with the network topology to obtain a more intuitive address relationship diagram.
[0139] The topology presentation module is mainly used to present the relationships between IP addresses, subnet routes, and devices in a topology format, and the topology supports refreshing, exporting, and dragging and dropping.
[0140] In one example, the topology presentation module in the address relationship management system can be connected to the address management module in the IP address management system, allowing the presentation and editing of the topology of relationships within the IP address management system. The IP address management system, in addition to the address management module, may also include a network segment management module, a subnet management module, and a process management module, etc.
[0141] Figure 8 A schematic diagram of the hardware structure of the address association determination device provided in an embodiment of this application is shown.
[0142] The device for determining address associations may include a processor 801 and a memory 802 storing computer program instructions.
[0143] Specifically, the processor 801 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0144] Memory 802 may include mass storage for data or instructions. For example, and not limitingly, memory 802 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 802 may include removable or non-removable (or fixed) media. Where appropriate, memory 802 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 802 is non-volatile solid-state memory.
[0145] Memory 802 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, typically, memory 802 includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this disclosure.
[0146] The processor 801 reads and executes computer program instructions stored in the memory 802 to implement any of the address association determination methods in the above embodiments.
[0147] In one example, the address association determination device may also include a communication interface 803 and a bus 810. For example, Figure 8 As shown, the processor 801, memory 802, and communication interface 803 are connected through bus 810 and complete communication with each other.
[0148] The communication interface 803 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0149] Bus 810 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 810 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.
[0150] Furthermore, in conjunction with the address association determination method in the above embodiments, this application embodiment can provide a computer storage medium for implementation. This computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the address association determination methods in the above embodiments.
[0151] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0152] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0153] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0154] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0155] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. An address association relationship determination method, characterized by, include: Collect subnet routes and device identifiers for multiple devices in the network; A routing tree is constructed based on the subnet inclusion relationship among the multiple subnet routes, wherein each node in the routing tree corresponds to a subnet route; For each leaf node in the routing tree, determine the IP address corresponding to the leaf node, wherein the IP address corresponding to the leaf node is an IP address contained in the subnet route corresponding to the leaf node in the network; An address tree is obtained by connecting address nodes under the leaf nodes. The address nodes store the IP address and device identifier corresponding to the leaf node. The device identifier corresponding to the leaf node is the device identifier corresponding to the subnet route of the leaf node. For an IP address in the network, the address tree is traversed upwards from the address node where the IP address is located to determine the target subnet route through which the IP address passes and the target device identifier corresponding to the target subnet route.
2. The method of claim 1, wherein, The step of constructing a routing tree based on the subnet inclusion relationship among the multiple subnet routes includes: The multiple subnet routes are grouped to obtain at least one subnet set, wherein the subnet routes in the same subnet set belong to the same subnet segment, and the subnet routes in different subnet sets belong to different subnet segments; For each subnet set, a routing tree corresponding to the subnet set is constructed based on the subnet inclusion relationship between the subnet routes in the subnet set.
3. The method of claim 2, wherein, The step of constructing a routing tree corresponding to the subnet set based on the subnet inclusion relationship between subnet routes in the subnet set includes: The subnet routes in the subnet set are sorted in descending order of mask, and the subnet routes with the same mask are sorted in ascending order of address. The sorted subnet routes are traversed from front to back, and the subnet inclusion relationships between the subnet routes in the subnet set are determined according to the classless inter-domain routing rules. Based on the subnet inclusion relationship, construct the routing tree corresponding to the subnet set.
4. The method of claim 1, wherein, The method further includes: For each IP address in the network, obtain the device identifier in the address node where the IP address is located; Identify the target device corresponding to the device identifier and obtain the network topology map of the target device; In the network topology diagram, determine the target device node corresponding to the target device identifier; The target subnet route is added to the corresponding target device node to obtain the address topology map.
5. The method according to claim 4, characterized in that, The method further includes: After obtaining the address topology map, determine the device nodes in the address topology map that have not been added to the subnet route, and delete the device nodes from the address topology map.
6. The method according to claim 1, characterized in that, The method includes: Before constructing a routing tree based on the subnet inclusion relationship between the multiple subnet routes, the multiple subnet routes are preprocessed so that the routing tree can be constructed based on the subnet inclusion relationship between the preprocessed multiple subnet routes; The preprocessing includes filtering, deduplication, and / or format conversion, wherein the filtering includes removing private network routes and proxy addresses, the deduplication includes removing duplicate subnet routes, and the format conversion includes converting the format of the subnet routes to a preset storage format.
7. The method according to claim 2, characterized in that, The method further includes: Construct a hash table, wherein the hash table uses the subnet segment as the key and the storage address of the routing tree of the subnet set corresponding to the subnet segment as the value.
8. An address association determination device, characterized in that, The device includes: The data acquisition unit is used to collect subnet routes and device identifiers of multiple devices in the network. A routing tree construction unit is used to construct a routing tree based on the subnet inclusion relationship among multiple subnet routes, wherein each node in the routing tree corresponds to a subnet route; The determining unit is configured to determine the IP address corresponding to the leaf node in the routing tree, wherein the IP address corresponding to the leaf node is an IP address contained in the subnet route corresponding to the leaf node in the network; The address tree construction unit is used to connect address nodes under the leaf nodes to obtain an address tree, wherein the address nodes store the IP address and device identifier corresponding to the leaf node, and the device identifier corresponding to the leaf node is the device identifier corresponding to the subnet route of the leaf node; The relationship determination unit is used to traverse the address tree upwards from the address node where the IP address is located for the IP address in the network, and determine the target subnet route through which the IP address passes and the target device identifier corresponding to the target subnet route.
9. An address association determination device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the address association determination method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the address association determination method as described in any one of claims 1-7.