Data plane analysis method and device, equipment, storage medium and program product
By constructing a prefix tree and synchronizing leaf node attribute information, the problem of low data plane analysis efficiency in large-scale computer networks is solved, efficient data plane analysis is achieved, and memory usage and analysis time are reduced.
Patent Information
- Application Number
- CN202411060821.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-10-29
AI Technical Summary
The existing technology is inefficient in data plane analysis in large-scale computer networks, resulting in redundant calculations and excessive memory usage, making it difficult to complete verification in a short time.
By obtaining routing information of network node groups, a prefix tree is constructed to identify overlapping network address ranges and priorities in the target network, reducing the amount of redundant data, and synchronizing leaf node attribute information to improve data plane analysis efficiency.
Effectively filter out redundant data transmission verification processes, improve the efficiency of data plane analysis, and reduce memory usage and analysis time.
Smart Images

Figure CN118869503A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a data plane analysis method, apparatus, device, storage medium, and program product. Background Art
[0002] As the direct factor driving traffic forwarding, the data plane can explain hidden dangers such as loops and black holes in the network by analyzing the data plane, which is of great significance for ensuring the healthy operation of computer networks and eliminating potential risks. In related technologies, the idea of equivalence classes is mainly used to divide data packets to achieve data plane verification. However, this method requires dividing a large number of equivalence classes. When processing large-scale computer networks, a large number of equivalence classes will generate redundant calculations, resulting in low efficiency of data plane analysis. Summary of the invention
[0003] In view of this, the present disclosure provides a data plane analysis method, apparatus, device, storage medium and program product to solve the problem of low efficiency of data plane analysis.
[0004] In a first aspect, the present disclosure provides a data plane analysis method, which is applied to a network node in a target network, and the method includes:
[0005] Acquire first routing information of a local network node group, wherein the first routing information includes a forwarding path of the network node group and a network address range corresponding to the forwarding path;
[0006] Query the first routing information to obtain a local first forwarding path and a first network address range corresponding to the first forwarding path;
[0007] Determine first verification information based on the first network address range, where the first verification information is represented by a target address range determined by the first network address range;
[0008] The first verification information is sent based on the first forwarding path to obtain a data plane analysis result of the closed path where the first forwarding path is located.
[0009] In a second aspect, the present disclosure provides a data plane analysis method, which is applied to a control node in a target network, and the method includes:
[0010] Determine a network node group to which each network node in the target network belongs, and obtain second routing information of the network node group, wherein the second routing information includes sub-routing information of the corresponding network node, and the sub-routing information includes a network prefix and a next-hop network node;
[0011] For each of the network node groups, based on the priority of the network prefix in the second routing information and the next-hop network node corresponding to the network node, a prefix tree is obtained, wherein the prefix tree includes a plurality of nodes, the nodes are represented by the corresponding network prefix and a forwarding path, the forwarding path is obtained by the network node and the corresponding next-hop network node, and the attribute information of the node includes the forwarding path and a network address range represented by the forwarding path;
[0012] The attribute information of the leaf nodes in the prefix tree is synchronized to each network node in the corresponding network node group, so that the network node obtains the first routing information of the network node group to which it belongs, and the first routing information is used to determine the data plane analysis result of the closed path where the network node is located.
[0013] In a third aspect, the present disclosure provides a data plane analysis device, applied to a network node in a target network, the device comprising:
[0014] A routing information acquisition module, used to acquire first routing information of a local network node group, wherein the first routing information includes a forwarding path of the network node group and a network address range corresponding to the forwarding path;
[0015] a routing information query module, configured to query the first routing information to obtain a local first forwarding path and a first network address range corresponding to the first forwarding path;
[0016] A verification information determination module, configured to determine first verification information based on the first network address range, wherein the first verification information is represented by a target address range determined by the first network address range;
[0017] A data plane analysis module is used to send the first verification information based on the first forwarding path to obtain a data plane analysis result of the closed path where the first forwarding path is located.
[0018] In a fourth aspect, the present disclosure provides a data plane analysis device, applied to a control node in a target network, the device comprising:
[0019] A node information acquisition module, used to determine the network node group to which each network node in the target network belongs, and obtain second routing information of the network node group, wherein the second routing information includes sub-routing information of the corresponding network node, and the sub-routing information includes a network prefix and a next-hop network node;
[0020] A prefix tree construction module, configured to obtain a prefix tree for each of the network node groups based on the priority of the network prefix in the second routing information and the next-hop network node corresponding to the network node, wherein the prefix tree includes a plurality of nodes, the nodes are characterized by the corresponding network prefix and a forwarding path, the forwarding path is obtained through the network node and the corresponding next-hop network node, and the attribute information of the node includes the forwarding path and the network address range represented by the forwarding path;
[0021] An attribute information synchronization module is used to synchronize the attribute information of the leaf nodes in the prefix tree to each network node in the corresponding network node group, so that the network node obtains the first routing information of the network node group to which it belongs, and the first routing information is used to determine the data plane analysis result of the closed path where the network node is located.
[0022] In a fifth aspect, the present disclosure provides a network device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the data plane analysis method of any of the above-mentioned embodiments by executing the computer instructions.
[0023] In a sixth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the data plane analysis method of any of the above-mentioned embodiments.
[0024] In a seventh aspect, the present disclosure provides a computer program product, including computer instructions, and the computer instructions are used to enable a computer to execute the data plane analysis method of any of the above-mentioned embodiments.
[0025] The data plane analysis method provided by the embodiment of the present disclosure is that the control node obtains a prefix tree for each network node group based on the priority of the network prefix in the second routing information and the next hop network node corresponding to the network node; wherein the prefix tree includes multiple nodes, the nodes of the prefix tree are characterized by the corresponding network prefix and the forwarding path, the forwarding path is obtained by the network node and the corresponding next hop network node, and the attribute information of the node includes the forwarding path and the network address range represented by the forwarding path. Therefore, all overlapping network address ranges and priorities in the target network can be identified in the form of a prefix tree. Thus, the amount of redundant data in the data plane analysis process can be reduced. Then, the control node synchronizes the attribute information of the leaf node in the prefix tree to each network node in the corresponding network node group, so that the network node obtains the first routing information of the network node group to which it belongs. The network node obtains the first local forwarding path and the first network address range corresponding to the first forwarding path through the obtained first routing information query. And the target address range determined by the first network address range represents the first verification information. Then, the first verification information is sent based on the first forwarding path to obtain the data plane analysis result of the closed path where the first forwarding path is located. Since the first verification information used for data transmission is determined based on the first network address range of the first forwarding path, redundant data transmission verification processes can be effectively filtered out, thereby effectively improving the efficiency of data plane analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0027] Figure 1 is a flow chart of a data plane analysis method according to an embodiment of the present disclosure;
[0028] Figure 2 is a schematic diagram of a network address range corresponding to a forwarding path according to an embodiment of the present disclosure;
[0029] Figure 3 is a schematic diagram of interaction between network nodes for transmitting data according to an embodiment of the present disclosure;
[0030] Figure 4 is a flow chart of another data plane analysis method according to an embodiment of the present disclosure;
[0031] Figure 5is a schematic diagram of routing information of a network node according to an embodiment of the present disclosure;
[0032] Figure 6 is a schematic diagram of a prefix tree according to an embodiment of the present disclosure;
[0033] Figure 7 is a structural block diagram of a data plane analysis device according to an embodiment of the present disclosure;
[0034] Figure 8 is a structural block diagram of another data plane analysis device according to an embodiment of the present disclosure;
[0035] Fig. 9 It is a structural block diagram of a network device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0037] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0038] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0039] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0040] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0041] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0042] With the rise of technologies such as mobile Internet, computers, big data, and artificial intelligence, computer networks as infrastructure are also growing rapidly, making it extremely difficult to manually maintain and analyze computer networks. Frequent network failures have caused heavy economic losses to society and enterprises. Among them, the data plane is the direct factor driving traffic forwarding. By analyzing the data plane, we can explain hidden dangers such as loops and black holes in the network, which is of great significance for ensuring the healthy operation of the network and eliminating potential risks. However, in related technologies, automated data plane analysis tools (Data Plane Verifiers, referred to as DPVs) seem to be unable to analyze large-scale computer networks. Their high memory usage and long analysis time can no longer meet people's daily maintenance needs.
[0043] In related technologies, researchers have proposed a variety of data plane analysis tools to simulate and analyze large-scale networks. However, as the size of the network increases, the network models created by these data plane analysis tools are also growing. For example, when these data plane analysis tools are used to analyze thousands of switches and millions of routes in a large interconnected network, out of memory (OOM) and request timeout errors are encountered, which hinder further analysis of the computer network.
[0044] In some data plane analysis tools, the idea of using equivalence classes (ECs) to divide data packets is proposed to achieve sub-millisecond verification of each rule. However, due to the limitations of these tools, they still perform poorly when analyzing large-scale networks. For example, although the Deltanet data plane analysis tool has linear performance due to its innovative data structure called Atom, its large number of equivalence classes limits its scalability. On the other hand, the APKeep data plane analysis tool aims to minimize the number of equivalence classes, but when dealing with large-scale networks, too much redundant calculations will reduce its performance. In addition, although APKeep strives to limit the number of equivalence classes, the large number of equivalence classes that still exist in complex networks may overwhelm a single process or thread, thereby significantly reducing the data plane analysis performance.
[0045] Therefore, researchers further explored partitioning network models and leveraging the parallel processing capabilities of modern computing systems. Flash (also known as Flash) distributes verification tasks on different subspace verifications, solving the problem of redundant computation in large network burst update scenarios. However, this analysis method continues the idea of equivalence classes based on previous work and uses a binary decision diagram (BDD) to limit its parallelization scheme to uneven subspace partitioning. Although some data plane analysis tools transform verification tasks into a counting problem of directed acyclic graphs and convert global verification into a lightweight task on the device. Then, the computational performance of the directed acyclic graph as a preprocessor of the model severely limits the use of the algorithm in actual networks. Moreover, many finite acyclic graphs adopt the design of incremental verification, which only verifies the changed parts and is not suitable for building networks from scratch. In actual production environments, storing models of different networks consumes a lot of resources, which may result in the need to release resources and model the network from scratch, which is obviously impractical.
[0046] In summary, related technologies use equivalence classes to perform data plane analysis. When processing large-scale computer networks to analyze large-scale data plane snapshots, a large number of equivalence classes will produce redundant calculations, making it difficult to complete verification in a short time, and the memory usage is too high, resulting in low data plane analysis efficiency.
[0047] In view of this, according to an embodiment of the present disclosure, a data plane analysis method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0048] In this embodiment, a data plane analysis method is provided, which can be used for network nodes in the above-mentioned target network. Figure 1 is a flow chart of a data plane analysis method according to an embodiment of the present disclosure, such as Figure 1 As shown, the process includes the following steps:
[0049] Step S101, obtaining first routing information of a local network node group, the first routing information including a forwarding path of the network node group and a network address range corresponding to the forwarding path.
[0050] Specifically, the first routing information is sent by a control node in the target network. The control node obtains the network prefix and the next-hop network node of each network node in the network node group based on the network node group to which each network node in the target network belongs. Thus, for each network node group, a prefix tree is constructed based on the priority of the network prefix in the second routing information and the next-hop network node corresponding to the network node. Among them, the nodes of the prefix tree are characterized by the corresponding network prefix and the forwarding path between the network node and the next-hop network node, and the attribute information of the node includes the forwarding path and the network address range represented by the forwarding path. Thus, the prefix tree is used to remove the redundant data in the target network. Furthermore, the control node synchronizes the attribute information of the leaf nodes in the prefix tree to each network node in the corresponding network node group.
[0051] Step S102: query first routing information to obtain a local first forwarding path and a first network address range corresponding to the first forwarding path.
[0052] Specifically, the current network node searches the first routing information for a forwarding path corresponding to the current network node as the first forwarding path, and obtains a network address range corresponding to the first forwarding path from the first routing information as the first network address range.
[0053] Step S103: determining first verification information based on the first network address range, where the first verification information is represented by a target address range determined by the first network address range.
[0054] Specifically, if the current network node is the starting and ending network node of the closed path where the current network node is located, the first network address range is sent as the first verification information. If the current network node is an intermediate network node in the closed path, the intersection of the first network address range and the network address range sent by the previous hop network node is determined as the target address range, and the target address range is sent to the next hop network node as the first verification information.
[0055] Furthermore, the starting and ending network nodes can compare the target address range sent out with the network address range sent back by other network nodes, and determine the closed path in the target network and the data transmission performance of the closed path according to the comparison result. The identified closed path can then be used to further identify the reachability of the network address range between each network node in the target network.
[0056] Step S104: Send first verification information based on the first forwarding path to obtain a data plane analysis result of the closed path where the first forwarding path is located.
[0057] Specifically, if the current network node is the starting and ending network node of the closed path, the data plane analysis result of the closed path can be determined based on the target address range carried in the first verification information and the information transmitted back. For example, the target address range is sent as the first verification information, and the network address range returned by other network nodes is received. If the target address range sent is inconsistent with the network address range returned by other network nodes, it indicates that the data transmission of the closed path where the first forwarding path is located is abnormal. If the target address range sent is consistent with the network address range returned by other network nodes, it indicates that the data transmission of the closed path is normal.
[0058] The data plane analysis method provided in this embodiment obtains the first routing information of the local network node group to query and obtain the local first forwarding path and the first network address range corresponding to the first forwarding path. The first verification information is characterized by the target address range determined by the first network address range. Then, the first verification information is sent based on the first forwarding path to obtain the data plane analysis result of the closed path where the first forwarding path is located. Since the first verification information used for data transmission is determined based on the first network address range of the first forwarding path, it is possible to effectively filter out redundant data transmission verification processes, thereby effectively improving the efficiency of data plane analysis.
[0059] It is worth noting that a data structure named RANGES ET is introduced in the data plane analysis method of the present disclosure to represent the Internet Protocol (IP) address space, that is, the network address ranges involved in the data plane analysis method of the present disclosure are all represented by the RANGESET data structure. A RANGESET object can be represented as a set of ordered integer pairs from i=1 to k, and the i-th integer pair is represented by a next integer LB i and an upper bound integer UB i where k is the total number of ordered integer pairs in RANGESET, and the ordered integer pairs in RANGESET are sorted according to the next integer. Thus, the expression of RANGESET can be obtained as
[0060] A valid ordered integer pair should satisfy the following conditions: LB i ≤UB i and UB i +1 <LB i+1. For example, {(1,2), (4,5)} is a valid ordered integer pair, while {(1,2), (3,4)} is not a valid ordered integer pair. If there is no ordered integer pair in a RANGESET, the RANGESET is considered a false RANGESET. At the same time, if there is only one ordered integer pair in a RANGESET, and the lower bound integer is the minimum value in the IP address space, and the upper bound is the maximum value in the IP address space, then the RANGESET is considered a true RANGESET. For example, {(0,2 32 -1)} is a real RANGESET that represents the entire IPv4 address space.
[0061] RANGESET usually includes three operations: AND, OR, and NOT. It should be noted that these three operations are closed only on valid ordered integer pairs, that is, both the input data and the output data are valid RANGESET, otherwise the returned result may be unknown.
[0062] The three operations of RANGESET, AND, OR, and NOT, are explained below.
[0063] 1. AND operation: The AND operation is calculated by traversing the two input RANGESETs and comparing the upper and lower limits of each ordered integer pair. If there is overlap between the two ordered integer pairs, the AND operation will calculate the intersection of the two ordered integer pairs and add the calculated intersection to the result. For example, {(0,5), (10,15)} AND {(3,7), (12,18)} = {(3,5), (12,15)}.
[0064] 2. OR operation: The OR operation first merges all ordered integer pairs in the two RANGESET pairs into a new, ordered RANGESET. And pop the first ordered integer pair from it to initialize the ordered integer pair. Then, traverse all the ordered integer pairs in the RANGESET, compare the upper and lower bound integers of the ordered integer pairs with an ordered integer pair to determine whether a new, larger range of ordered integer pairs can be formed. If a new ordered integer pair can be formed, update the upper bound integer of the ordered integer pair, and continue to iterate and execute the above steps. If a new ordered integer pair cannot be formed, add the ordered integer pair to the result and iterate forward. For example, {(0,5),(10,15)}OR{(3,7),(12,18)}={(0,7),(10,18)}. Both operations can be completed in time complexity O(n+m); where n is the size of the first RANGESET and m is the size of the second RANGESET.
[0065] 3. NOT operation: Calculate the complement by traversing each ordered integer pair in the input range. For each gap in the ordered integer pair in the input range, a new ordered integer pair is formed. The lower bound integer of each ordered integer pair is equal to the upper bound integer of the previous integer pair plus one, and the upper bound integer of each ordered integer pair is equal to the lower bound integer of the next ordered integer pair minus one. For example, NOT{(0,5),(10,15)}={(6,9),(16,2 32 -1)}. The NOT operation can be completed in O(n) time complexity, where n is the size of RANGESET.
[0066] In some optional implementations, determining the first verification information based on the first network address range in step S103 includes:
[0067] Step a1: If the local network node is the starting and ending network node of the closed path, the first network address range is determined as the target address range.
[0068] Step a2: Generate first verification information based on the target address range.
[0069] In the data plane analysis method provided by the present embodiment, the starting and ending network nodes send the first network address range corresponding to the first forwarding path as the first verification information. Therefore, it is possible to accurately verify whether there are network nodes with abnormal data transmission on the closed path where the starting and ending network nodes are located, based on the comparison results of the information forwarded back by other network nodes and the sent first network address range, and there is no need for repeated verification of network nodes on the network with the same network prefix, thereby filtering out the verification process of repeated network nodes to improve the efficiency of data plane analysis.
[0070] In some optional implementations, if the local is a starting and ending network node of a closed path, the sending of the first verification information based on the first forwarding path in the above step S104 to obtain a data plane analysis result of the closed path where the first forwarding path is located includes:
[0071] Step b1, receiving second verification information and obtaining a second network address range, wherein the second verification information is obtained based on the first verification information.
[0072] Step b2: Compare the second network address range with the target address range to obtain a data plane analysis result of the closed path where the first forwarding path is located.
[0073] Specifically, the above step b2 includes: if the second network address range is consistent with the target address range, determining that the data plane analysis result is that the closed path data transmission is normal.
[0074] It can be understood that if the second network address range is consistent with the target address range, it indicates that the network nodes on the closed path can all forward data normally, and the performance of the network nodes on the current closed path is good.
[0075] Specifically, the above step b2 further includes: if the second network address range is inconsistent with the target address range, determining that the data plane analysis result is that the closed path data transmission is abnormal.
[0076] In some optional implementations, determining the first verification information based on the first network address range in step S103 includes:
[0077] Step c1: If the local node is an intermediate network node of the closed path, the third verification information sent by the previous-hop network node is received to obtain a third network address range.
[0078] Step c2: determine the intersection of the third network address range and the first network address range as the target address range.
[0079] Step c3: Generate first verification information based on the target address range.
[0080] It should be noted that, when the network transmission performance of the current network node is normal, the network address range obtained by the intersection of the third network address range sent by the previous hop network node and the first network address range of the current network node should be consistent with the third network address range. In this way, the data sent by the starting and ending network nodes can be forwarded back to the starting and ending network nodes. When the data sent by any intermediate network node to the next hop network node is inconsistent with the data sent by the starting and ending network nodes, it indicates that there is an abnormality in the current network node.
[0081] For example, Figure 2As shown, it is assumed that the target network includes network nodes A, B, and C, and network node A stores the real RANGESET of the IP address space of the entire target network, and the real RANGESET of the IP address space of the entire target network is represented by the network prefix P0. For example, it is assumed that network node A obtains the network address range of the forwarding path from network node A to network node B according to the first routing information as "{(LB(P1), LB(P2)-1), (LB(P3), UB(P3)), (UB(P2)+1, UB(P1))}", network node B obtains the network address range of the forwarding path from network node B to network node C according to the first routing information as "{(LB(P1), UB(P1))}", and network node C obtains the network address range of the forwarding path from network node C to network node A according to the first routing information as "{(LB(P1), UB(P1))}". At the same time, network node A obtains, based on the first routing information, that the network address range of the forwarding path from network node A to network node C is "{(LB(P2), LB(P3)-1), (UB(P3)+1, UB(P2))}".
[0082] like Figure 3As shown, network node A uses the network address range "{(LB(P0), UB(P0))}" corresponding to the network prefix P0 as the starting address, and transmits "{(LB(P1), LB(P2)-1), (LB(P3), UB(P3)), (UB(P2)+1, UB(P1))}" as a data packet to network node B. Network node B continues to intersect with the RANGESET on the edge from network node B to network node C (i.e., {(LB(P1), UB(P1))}) to obtain "{(LB(P1), LB(P2)-1), (LB(P3), UB(P3)), (UB(P2)+1, UB(P1))}", and transmits "{(LB(P1), LB(P2)-1), (LB(P3), UB(P3)), (UB(P2)+1, UB(P1))}" to network node C. After receiving the same data, network node C obtains "{(LB(P1), LB(P2)-1), (LB(P3), UB(P3)), (UB(P2)+1, UB(P1))}" based on the intersection of "{(LB(P1), LB(P2)-1), (LB(P3), UB(P3)), (UB(P2)+1, UB(P1))}" and the RANGESET on the edge from network node C to network node A (i.e., {(LB(P1), UB(P1))}), and transmits it back to network node A. Therefore, network node A finally receives the same RANGESET as the RANGESET it sent, that is, the transmission path forms a closed path. Furthermore, according to the transmission situation, it can be extended to identify data plane analysis such as full-pair reachability (i.e., IP space address reachability between all network nodes) and black holes. Among them, P1, P2, and P3 are network prefixes, the network address range of P0 is larger than that of P1, the network address range of P1 is larger than that of P2, and the network address range of P2 is larger than that of P3. At the same time, P3 has a higher priority than P2, P2 has a higher priority than P1, and P1 has a higher priority than P0. LB(P0) is the minimum address of the network address range corresponding to P0, LB(P1) is the minimum address of the network address range corresponding to P1, LB is the minimum address of the network address range corresponding to P2, LB(P3) is the minimum address of the network address range corresponding to P3, UB(P0) is the maximum address of the network address range corresponding to P0, UB(P1) is the maximum address of the network address range corresponding to P1, UB(P2) is the maximum address of the network address range corresponding to P2, and UB(P3) is the maximum address of the network address range corresponding to P3.
[0083] In this embodiment, another data plane analysis method is provided, which can be used for the control node in the above-mentioned target network. Figure 4 is a flow chart of another data plane analysis method according to an embodiment of the present disclosure, such as Figure 4As shown, the process includes the following steps:
[0084] Step S401, determine the network node group to which each network node in the target network belongs, and obtain second routing information of the network node group, the second routing information includes sub-routing information of the corresponding network node, and the sub-routing information includes a network prefix and a next-hop network node.
[0085] Specifically, each network node in the target network can be divided into different network node groups. For example, the network node groups are divided based on the location area or data center where the network nodes are located. Alternatively, each network node is randomly divided to obtain network nodes. In the data plane analysis method disclosed in the present invention, different network node methods can be arbitrarily selected to divide the network nodes in the target network. It should be noted that for the network nodes in the network node group, it is not required that each network node is physically connected. For example, Figure 5 As shown, the network node A alone can be divided into the first network node group, and the network nodes B and C can be divided into the second network node group.
[0086] It should be noted that the network prefix is used to distinguish the networks of different network types connected. The network prefix determines the size of the corresponding network and the number of hosts that can be accommodated. Each network prefix corresponds to a portion of the IP address (i.e., network address) of the identified network. In the process of routing selection, the routing selection algorithm will determine the best forwarding path based on the network prefix of the destination IP address. Therefore, the routing table of each network node usually includes the network prefix of the destination network and the information of the next-hop network node. The sub-routing information corresponding to each network node can be obtained by querying the routing table corresponding to the network node.
[0087] For example, Figure 5 As shown, the sub-routing information of each network node includes the network prefix of the network to which the network node is connected and the corresponding next-hop network node. For example, the sub-routing information of network node A includes network prefixes P1, P2, and P3, and the sub-routing information of network node A also includes the next-hop network node B corresponding to P1, the next-hop network node C corresponding to P2, and the next-hop network node B corresponding to P3. The sub-routing information of network node B includes the network prefix P1, and the sub-routing information of network node B also includes the next-hop network node C corresponding to P1. The sub-routing information of network node C includes network prefixes P1 and P2, and the sub-routing information of network node C also includes the next-hop network node A corresponding to P1 and the next-hop network node A corresponding to P2.
[0088] It should be noted that for each network node, the sub-routing information also includes the default preset network prefix. If the network node adopts the routing forwarding rule corresponding to the preset network prefix, all data packets will be discarded. Among them, the preset network prefix is usually represented by 0.0.0.0 / 0 or :: / 0, and the network address range corresponding to the preset network prefix includes all network addresses of the target network, that is, it covers the entire IP address space of the target network.
[0089] Step S402, for each network node group, based on the priority of the network prefix in the second routing information and the next-hop network node corresponding to the network node, a prefix tree is obtained, the prefix tree includes multiple nodes, the node is represented by the corresponding network prefix and the forwarding path, the forwarding path is obtained through the network node and the corresponding next-hop network node, the node attribute information includes the forwarding path and the network address range represented by the forwarding path.
[0090] It should be noted that the priority of a network prefix is usually related to the prefix length of the network prefix. The longer the network prefix, the higher the priority of the network prefix. In addition, there is a hierarchical relationship between the network prefixes. The higher the priority of the network prefix, the smaller the network address range corresponding to the network prefix. The network address range corresponding to the highest priority network prefix in the target network belongs to the network address range corresponding to the lowest priority network prefix. That is, the network address range of the previous level priority is less than or equal to the network address range of the current level priority.
[0091] For example, Figure 5 As shown, Figure 5 The four network prefixes shown Among them, the priority of P3 is higher than that of P2, the priority of P2 is higher than that of P1, and the priority of P1 is higher than that of P0.
[0092] Specifically, for each network node group, based on the priority of the network prefix in the second routing information, the network prefix and the corresponding forwarding path can be used as nodes to construct a prefix tree. Among them, the node corresponding to the network prefix with the highest priority is the leaf node, and the node corresponding to the network prefix with the lowest priority (that is, the above-mentioned preset network prefix) is the root node. The forwarding path is used to determine the next-hop network node to which the traffic of the corresponding network prefix is forwarded from the current network node. For example, {P1, [(B:C), (C, A)]} means that network node B forwards the traffic of P1 to network node C, and network node C forwards the traffic of P1 to network node A. It should be noted that in the prefix tree, the prefix space of each child node is a subset of its parent node.
[0093] Specifically, the prefix tree of each network node group may be traversed, and the RANGESET may be segmented according to the change of the forwarding behavior (ie, the change of the forwarding path) during the traversal process to obtain the attribute information corresponding to each node in the prefix tree.
[0094] It should be noted that in the data plane analysis method disclosed in the present invention, all network address ranges involved adopt the RANGESET data structure.
[0095] Step S403, synchronizing the attribute information of the leaf nodes in the prefix tree to each network node in the corresponding network node group, so that the network node obtains the first routing information of the network node group to which it belongs, and the first routing information is used to determine the data plane analysis result of the closed path where the network node is located.
[0096] It should be noted that after traversing the prefix tree and determining the attribute information corresponding to each node based on the changes in the forwarding paths corresponding to the nodes during the traversal process, the attribute information corresponding to the leaf nodes of the prefix tree will include all the forwarding paths of the network node group and the network address range of each forwarding path after the network address is segmented based on RANGESET.
[0097] The data plane analysis method provided in this embodiment obtains a prefix tree for each network node group based on the priority of the network prefix in the second routing information and the next-hop network node corresponding to the network node; wherein the prefix tree includes multiple nodes, the nodes of the prefix tree are characterized by the corresponding network prefix and the forwarding path, the forwarding path is obtained by the network node and the corresponding next-hop network node, and the attribute information of the node includes the forwarding path and the network address range represented by the forwarding path. Therefore, all overlapping network address ranges and priorities in the target network can be identified in the form of a prefix tree. Thereby, the amount of redundant data in the data plane analysis process can be reduced. Then, the attribute information of the leaf node in the prefix tree is synchronized to each network node in the corresponding network node group, so that the network node obtains the first routing information of the network node group to which it belongs, and determines the data plane analysis result of the closed path where the network node is located based on the first routing information. Therefore, the efficiency of data plane analysis can be effectively improved.
[0098] In some optional embodiments, the above step S402 obtains a prefix tree for each network node group based on the priority of the network prefix in the second routing information and the next-hop network node corresponding to the network node, including: for each network node group, calling the thread corresponding to the network node group to obtain the prefix tree by using the thread based on the priority of the network prefix in the second routing information and the next-hop network node corresponding to the network node.
[0099] The data plane analysis method provided in this embodiment calls the thread corresponding to the network node group to obtain a prefix tree based on the priority of the network prefix in the second routing information and the next hop network node corresponding to the network node. Therefore, the prefix tree can be constructed in parallel, thereby further improving the efficiency of data plane analysis.
[0100] It should be noted that in the data plane analysis method disclosed in the present invention, a RANGESET data structure is used to represent the IP address space. Therefore, AND, OR and NOT operations can be implemented based on the data structure to overcome the parallel limitations of data structures (such as BDD data structures) in related technologies. For each network node group, a separate process can be assigned to calculate the prefix tree of the network node to accelerate the data plane analysis process. Thus, the data plane analysis efficiency can be improved and the data plane analysis process can be accelerated by optimizing the use of multi-core systems.
[0101] In some optional implementations, obtaining a prefix tree based on the priority of the network prefix in the second routing information and the next hop network node corresponding to the network node in the above step S402 includes:
[0102] Step d1: construct a node based on the network prefix in the second routing information and the forwarding path corresponding to the network prefix.
[0103] Step d2, determining the hierarchical relationship of each node in the prefix tree based on the priority of the network prefix.
[0104] Step d3: for each node, based on the attribute information of the previous node and the forwarding path corresponding to the network prefix of the current node, configure the attribute information of the current node to obtain a prefix tree.
[0105] It should be noted that the above steps d1 to d3 are executed by the process corresponding to the network node group.
[0106] For example, Figure 6As shown, the prefix tree of the first network node group can be constructed based on the sub-routing information of network node A, and each node of the prefix tree includes a network prefix and the forwarding behavior (i.e., forwarding path) of all network nodes based on the network prefix. For example, the root node of the prefix tree of the first network node group is "P0, A: drop", the child node of the root node is "P1, A: B", the child node of "P1, A: B" is "P2, A: C", and the child node of "P2, A: C" is "P3, A: B". Among them, "P3, A: B" is the leaf node of the prefix tree of the first network node group. The root node of the prefix tree of the second network node group is "P0, B: drop, C: drop", the child node of the root node is "P1, B: C, C: A", and the child node of "P1, B: C, C: A" is "P2, C: A". Among them, "P2, C: A" is the leaf node of the prefix tree of the second network node group. drop represents the routing rule for discarding data packets configured for each network node.
[0107] Specifically, for the prefix tree of each network node group, a depth-first search (DFS) can be used to traverse each prefix tree, thereby calculating all RANGESETs according to the change of the forwarding path to obtain the network address range of each forwarding path in the network node group. Figure 6 As shown, taking the prefix tree of the second network node group as an example, when traversing the root node of the prefix tree, it is found that each network node has a routing rule that discards all data packets. Therefore, the attribute information of the root node is B: drop, C: drop, and the corresponding network address range is the network address range corresponding to P0. When traversing to P1, it is detected that the forwarding path has changed relative to the default routing rule, and the forwarding path is changed to "B: C, C: A", because the network prefix P1 has a higher priority than P0. Therefore, RANGESET is split into the network address range corresponding to "P0-P1" and the network address range corresponding to P1, that is, the attribute information corresponding to the node where P1 is located is "B: drop, C: drop" The corresponding network address range is the network address range corresponding to "P0-P1", and the network address range corresponding to "B: C, C: A" is the network address range corresponding to P1. When traversing to P2, since the forwarding path is "C: A", compared with the previous traversal, the forwarding path has not changed, so the division of RANGESET remains unchanged, that is, the node where P2 is located ( Figure 6 The attribute information corresponding to the forwarding path in the attribute information corresponding to the leaf node is "B: drop, C: drop". After the traversal is completed, the network address range corresponding to the forwarding path in the attribute information corresponding to the leaf node can be used as the formula of the final RANGESET. Then, the formula is executed to determine the RANGESET forwarded from one network node to another network node in the network node group.
[0108] For example, Figure 6 As shown, taking the prefix tree of the first network node group as an example, when traversing the root node of the prefix tree, it is found that each network node has a routing rule that discards all data packets. Therefore, the network address range corresponding to the attribute information of the root node "A: drop" is "the network address range corresponding to P0". When traversing to P1, it is detected that the forwarding path has changed relative to the default routing rule, and the forwarding path has changed to "A: B". Since the network prefix P1 has a higher priority than P0. Therefore, RANGESET is split into the network address range corresponding to "P0-P1" and the network address range corresponding to P1, that is, the network address range corresponding to the attribute information "A: drop" corresponding to the node where P1 is located is the network address range corresponding to "P0-P1", and the network address range corresponding to "A: B" is the network address range corresponding to P1. When traversing to P2, since the forwarding path is changed to "A: C", compared with the forwarding path of the previous traversal, RANGESET is split to obtain the network address range corresponding to "P1-P2" and the network address range corresponding to P2. That is, the attribute information corresponding to the node where P2 is located is "A: drop", the corresponding network address range is the network address range corresponding to "P0-P1", the corresponding network address range of "A: B" is the network address range corresponding to "P1-P2", and the corresponding network address range of "A: C" is the network address range corresponding to "P2". When traversing to P3 at last, since the forwarding path is changed to "A: B", RANGESET continues to split to obtain the network address range corresponding to "P1-P2+P3" and the network address range corresponding to "P2-P3". That is, the attribute information corresponding to the node where P3 is located is "A: drop", the corresponding network address range is the network address range corresponding to "P0-P1", the corresponding network address range of "A: B" is the network address range corresponding to "P1-P2+P3", and the corresponding network address range of "A: C" is the network address range corresponding to "P2-P3".
[0109] After the prefix tree traversal is completed, the network address range corresponding to the forwarding path in the attribute information corresponding to the leaf node can be used as the formula of the final RANGESET. Then, the formula is executed to determine the RANGESET forwarded from one network node to another network node in the network node group. Among them, P1, P2 and P3 are RANGESET.
[0110] For example, based on the attribute information that the network address range corresponding to "A:B" is the network address range corresponding to "P1-P2+P3", network node A forwards the data packet of "P1-P2+P3" to network node B. The operation of "P1-P2+P3" can be represented by "OR(AND(P1,NOT(P2)),P3)", and the RANGESET (i.e., network address range) obtained by the final operation is "{(LB(P1),LB(P2)-1), (LB(P3),UB(P3)), (UB(P2)+1,UB(P1))}". LB(P1) is the minimum address of the network address range corresponding to P1, LB(P2) is the minimum address of the network address range corresponding to P2, LB(P3) is the minimum address of the network address range corresponding to P3, UB(P1) is the maximum address of the network address range corresponding to P1, UB(P2) is the maximum address of the network address range corresponding to P2, and UB(P3) is the maximum address of the network address range corresponding to P3.
[0111] The data plane analysis method provided in this embodiment determines the hierarchical relationship of each node in the prefix tree based on the priority of the network prefix, and for each node in the prefix tree, configures the attribute information of the current node based on the attribute information of the previous node and the forwarding path corresponding to the network prefix of the current node. Therefore, the priority relationship between each network prefix can be clarified, thereby orderly removing redundant data to improve data analysis efficiency.
[0112] In some optional implementations, the attribute information of the previous node includes at least one first forwarding path and a network address range corresponding to the at least one first forwarding path; then, the above step d3 includes:
[0113] Step d31: for each node, determine the second forwarding path corresponding to the current node.
[0114] Step d32: If the second forwarding path does not exist in at least one of the first forwarding paths, the network address range of the network prefix corresponding to the current node is determined as the network address range corresponding to the second forwarding path.
[0115] Step d33: when the third forwarding path of the previous node is different from the second forwarding path, the network address of at least one first forwarding path is updated based on the network address range of the network prefix corresponding to the current node.
[0116] Step d34: if the second forwarding path does not exist in at least one first forwarding path, the second forwarding path, the network address range corresponding to the second forwarding path, at least one first forwarding path and its updated network address are configured as attribute information of the current node.
[0117] Step d35: If a second forwarding path exists in at least one first forwarding path, the at least one first forwarding path and its updated network address are configured as attribute information of the current node.
[0118] For example, Figure 6 As shown, taking the current node as the node where P2 is located as an example, when the prefix tree of the first network node group traverses to P2, the second forwarding path corresponding to P2 is "A:C". Since the first forwarding path "A:drop" and "A:B" in the attribute information of the historically traversed forwarding path or the previous node (i.e., the node where P1 is located) does not contain "A:C", the network address range corresponding to P2 is used as the network address range of the second forwarding path "A:C" and added to the attribute information corresponding to the node where P2 is located. At the same time, since the forwarding path changes when traversing from the node where P1 is located to the node where P2 is located, it is necessary to update the network address range corresponding to the forwarding path contained in the attribute information of the node where P1 is located based on the network address range corresponding to P2, for example Figure 6 As shown, the network address range corresponding to "A:B" is updated to the network address range corresponding to "P1-P2".
[0119] It should be noted that, when the third forwarding path of the previous node is the same as the second forwarding path, the network address of at least one first forwarding path remains unchanged.
[0120] In some optional implementations, the updating of the network address of at least one first forwarding path based on the network address range of the network prefix corresponding to the current node in the above step d33 includes:
[0121] Step d331: Determine a first address range to be updated based on a union of the network address range of the corresponding network prefix and the network address range corresponding to the second forwarding path.
[0122] Step d332: Update the network address corresponding to the second forwarding path based on the first address range to be updated.
[0123] Step d333: Determine a second address range to be updated based on the intersection of the complement of the network address range of the corresponding network prefix and the network address range corresponding to the third forwarding path.
[0124] Step d334: Update the network address range corresponding to the third forwarding path based on the second address range to be updated.
[0125] It should be noted that, when at least one first forwarding path includes the second forwarding path, the above steps d331 and d332 are performed. When at least one first forwarding path includes the third forwarding path, the above steps d333 and d334 are performed.
[0126] In some optional embodiments, the data plane analysis method of the present invention also includes: obtaining the prefix length of the network prefix; determining the priority of the network prefix based on the prefix length, the priority is positively correlated with the prefix length, and the prefix length is negatively correlated with the size of the network address range corresponding to the network prefix.
[0127] In some optional implementations, the data plane analysis method of the present disclosure further includes: obtaining data plane analysis results reported by each network node in the target network; and fusing each data plane analysis result to obtain a target data plane analysis result of the target network.
[0128] It is worth noting that although the Atom of DeltaNet used in the related art and the RANGESET used in the present disclosure are used to divide the data structure of the IP address space. However, there are significant differences between the two. In order to ensure the global uniqueness of its data in the entire network, Atom needs to limit its availability and parallel capabilities in specific scenarios. While the RANGESET used in the present disclosure uses equivalence classes to prevent the fragmentation of the IP address space, it does not enforce global uniqueness. Therefore, compared with the related art, it is more scalable and parallelizable.
[0129] In this embodiment, a data plane analysis device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0130] This embodiment provides a data plane analysis device, which is applied to a network node in a target network, such as Figure 7 As shown, the device comprises:
[0131] The routing information acquisition module 701 is used to acquire first routing information of a local network node group, where the first routing information includes a forwarding path of the network node group and a network address range corresponding to the forwarding path;
[0132] The routing information query module 702 is used to query the first routing information to obtain a local first forwarding path and a first network address range corresponding to the first forwarding path;
[0133] A verification information determination module 703, configured to determine first verification information based on the first network address range, wherein the first verification information is represented by a target address range determined by the first network address range;
[0134] The data plane analysis module 704 is configured to send first verification information based on the first forwarding path to obtain a data plane analysis result of the closed path where the first forwarding path is located.
[0135] In some optional implementations, the verification information determination module 703 includes:
[0136] A first address range determining unit, configured to determine the first network address range as a target address range if the local node is a start or end network node of a closed path;
[0137] The first verification information generating unit is configured to generate first verification information based on a target address range.
[0138] In some optional implementations, the data plane analysis module 704 includes:
[0139] A first verification information receiving unit, configured to receive second verification information and obtain a second network address range if the local node is a starting or ending network node of a closed path, wherein the second verification information is obtained based on the first verification information;
[0140] The data plane analysis unit is used to compare the second network address range with the target address range to obtain a data plane analysis result of the closed path where the first forwarding path is located.
[0141] In some optional implementations, the data plane analysis unit includes:
[0142] The data plane analysis subunit is used to determine that the data plane analysis result is that the closed path data transmission is normal if the second network address range is consistent with the target address range.
[0143] In some optional implementations, the verification information determination module 703 further includes:
[0144] The second address range determining unit receives the third verification information sent by the previous hop network node to obtain the third network address range if the local node is an intermediate network node of the closed path;
[0145] An address range intersection calculation unit, used to determine the intersection of the third network address range and the first network address range as a target address range;
[0146] The second verification information generating unit is configured to generate the first verification information based on the target address range.
[0147] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0148] The data plane analysis device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0149] In this embodiment, another data plane analysis device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated here. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0150] This embodiment provides a data plane analysis device, which can be used for the control node in the above-mentioned target network, such as Figure 8 As shown, the device comprises:
[0151] The node information acquisition module 801 is used to determine the network node group to which each network node in the target network belongs, and obtain the second routing information of the network node group, wherein the second routing information includes the sub-routing information of the corresponding network node, and the sub-routing information includes the network prefix and the next-hop network node;
[0152] A prefix tree building module 802 is used to obtain a prefix tree for each network node group based on the priority of the network prefix in the second routing information and the next-hop network node corresponding to the network node, wherein the prefix tree includes multiple nodes, the nodes are characterized by the corresponding network prefix and the forwarding path, the forwarding path is obtained by the network node and the corresponding next-hop network node, and the attribute information of the node includes the forwarding path and the network address range represented by the forwarding path;
[0153] The attribute information synchronization module 803 is used to synchronize the attribute information of the leaf nodes in the prefix tree to each network node in the corresponding network node group, so that the network node obtains the first routing information of the network node group to which it belongs. The first routing information is used to determine the data plane analysis result of the closed path where the network node is located.
[0154] In some optional implementations, the prefix tree building module 802 includes:
[0155] The target process calling unit is used to call the thread corresponding to each network node group for each network node group, so as to obtain a prefix tree based on the priority of the network prefix in the second routing information and the next hop network node corresponding to the network node by using the thread.
[0156] In some optional implementations, the prefix tree building module 802 includes:
[0157] A prefix tree node construction unit, configured to construct a node based on a network prefix in the second routing information and a forwarding path corresponding to the network prefix;
[0158] A hierarchical relationship determination unit, used to determine the hierarchical relationship of each node in the prefix tree based on the priority of the network prefix;
[0159] The attribute information configuration unit is used to configure the attribute information of the current node for each node based on the attribute information of the previous node and the forwarding path corresponding to the network prefix of the current node to obtain a prefix tree.
[0160] In some optional implementations, the attribute information of the previous node includes at least one first forwarding path and a network address range corresponding to the at least one first forwarding path; and the attribute information configuration unit includes:
[0161] A forwarding path determining unit, configured to determine, for each node, a second forwarding path corresponding to the current node;
[0162] A first address configuration unit, configured to determine the network address range of the network prefix corresponding to the current node as the network address range corresponding to the second forwarding path if the second forwarding path does not exist in at least one of the first forwarding paths;
[0163] A second address configuration unit, configured to update a network address of at least one first forwarding path based on a network address range of a network prefix corresponding to a current node when a third forwarding path of a previous node is different from a second forwarding path;
[0164] a third address configuration unit, configured to configure the second forwarding path, the network address range corresponding to the second forwarding path, the at least one first forwarding path and the updated network address thereof as attribute information of the current node if the second forwarding path does not exist in the at least one first forwarding path;
[0165] The fourth address configuration unit is configured to configure the at least one first forwarding path and its updated network address as the attribute information of the current node if the second forwarding path exists in the at least one first forwarding path.
[0166] In some optional implementations, the second address configuration unit includes:
[0167] A sum operation subunit, configured to determine a first address range to be updated based on a union of a network address range of the corresponding network prefix and a network address range corresponding to the second forwarding path;
[0168] A first address updating subunit, configured to update a network address corresponding to the second forwarding path based on the first address range to be updated;
[0169] A difference operation subunit, configured to determine a second address range to be updated based on an intersection of a complement of a network address range of the corresponding network prefix and a network address range corresponding to the third forwarding path;
[0170] The second address updating subunit is used to update the network address range corresponding to the third forwarding path based on the second address range to be updated.
[0171] In some optional implementations, the data plane analysis device of the present disclosure further includes:
[0172] A prefix length acquisition module, used to obtain the prefix length of the network prefix;
[0173] The priority determination module is used to determine the priority of the network prefix based on the prefix length, the priority is positively correlated with the prefix length, and the prefix length is negatively correlated with the size of the network address range corresponding to the network prefix.
[0174] In some optional implementations, the data plane analysis device of the present disclosure further includes:
[0175] An analysis result acquisition module is used to obtain data plane analysis results reported by each network node in the target network;
[0176] The analysis result analysis module is used to fuse the analysis results of each data plane to obtain the target data plane analysis result of the target network.
[0177] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0178] The data plane analysis device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0179] The present disclosure also provides a network device having the above Figure 7 and / or Figure 8 The data plane analysis device is shown.
[0180] See also Fig. 9 , Fig. 9 is a structural block diagram of a network device provided by an optional embodiment of the present disclosure, such as Fig. 9 As shown, the network equipment includes: one or more processors 901, memory 902, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Each component utilizes different buses to communicate with each other, and can be installed on a common mainboard or installed in other ways as required. The processor can process the instructions executed in the network equipment, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple network equipment can be connected, and each device provides part of the necessary operation (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 901 is taken as an example.
[0181] The processor 901 may be a central processing unit, a network processor or a combination thereof. The processor 901 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.
[0182] The memory 902 stores instructions executable by at least one processor 901 so as to enable at least one processor 901 to implement the method shown in the above embodiment.
[0183] The memory 902 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created according to the use of the network device, etc. In addition, the memory 902 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 902 may optionally include a memory remotely arranged relative to the processor 901, and these remote memories may be connected to the network device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0184] The memory 902 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 902 may also include a combination of the above types of memory.
[0185] The network device also includes a communication interface 903, which is used for the network device to communicate with other devices or communication networks.
[0186] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0187] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0188] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A data plane analysis method, It is characterized in that Applied to a network node in a target network, the method comprises: Acquire first routing information of a local network node group, where the first routing information includes a forwarding path of the network node group and a network address range corresponding to the forwarding path; Query the first routing information to obtain a local first forwarding path and a first network address range corresponding to the first forwarding path; Determine first verification information based on the first network address range, where the first verification information is represented by a target address range determined by the first network address range; The first verification information is sent based on the first forwarding path to obtain a data plane analysis result of a closed path where the first forwarding path is located.
2. The data plane analysis method according to claim 1, It is characterized in that The determining the first verification information based on the first network address range includes: If the local is the starting and ending network node of the closed path, the first network address range is determined as the target address range; The first verification information is generated based on the target address range.
3. The data plane analysis method according to claim 2, It is characterized in that The sending the first verification information based on the first forwarding path to obtain a data plane analysis result of a closed path where the first forwarding path is located includes: receiving second verification information to obtain a second network address range, wherein the second verification information is obtained based on the first verification information; The second network address range is compared with the target address range to obtain a data plane analysis result of the closed path where the first forwarding path is located.
4. The data plane analysis method according to claim 3, It is characterized in that The comparing the second network address range with the target address range to obtain a data plane analysis result of the closed path where the first forwarding path is located includes: If the second network address range is consistent with the target address range, it is determined that the data plane analysis result is that the closed path data transmission is normal.
5. The data plane analysis method according to claim 1, It is characterized in that The determining the first verification information based on the first network address range includes: If the local is an intermediate network node of the closed path, receiving the third verification information sent by the previous-hop network node to obtain a third network address range; Determine the intersection of the third network address range and the first network address range as the target address range; The first verification information is generated based on the target address range.
6. A data plane analysis method, It is characterized in that Applied to a control node in a target network, the method comprises: Determine a network node group to which each network node in the target network belongs, and obtain second routing information of the network node group, wherein the second routing information includes sub-routing information of the corresponding network node, and the sub-routing information includes a network prefix and a next-hop network node; For each of the network node groups, based on the priority of the network prefix in the second routing information and the next-hop network node corresponding to the network node, a prefix tree is obtained, wherein the prefix tree includes a plurality of nodes, the nodes are represented by the corresponding network prefix and a forwarding path, the forwarding path is obtained by the network node and the corresponding next-hop network node, and the attribute information of the node includes the forwarding path and a network address range represented by the forwarding path; The attribute information of the leaf nodes in the prefix tree is synchronized to each network node in the corresponding network node group, so that the network node obtains the first routing information of the network node group to which it belongs, and the first routing information is used to determine the data plane analysis result of the closed path where the network node is located.
7. The data plane analysis method according to claim 6, It is characterized in that The obtaining a prefix tree based on the priority of the network prefix in the second routing information and the next hop network node corresponding to the network node includes: constructing the node based on the network prefix in the second routing information and a forwarding path corresponding to the network prefix; Determining the hierarchical relationship of each of the nodes in the prefix tree based on the priority of the network prefix; For each of the nodes, based on the attribute information of the previous node and the forwarding path corresponding to the network prefix of the current node, the attribute information of the current node is configured to obtain the prefix tree.
8. The data plane analysis method according to claim 7, It is characterized in that The attribute information of the previous node includes at least one first forwarding path and a network address range corresponding to the at least one first forwarding path; for each of the nodes, based on the attribute information of the previous node and the forwarding path corresponding to the network prefix of the current node, configuring the attribute information of the current node to obtain the prefix tree includes: For each of the nodes, determining a second forwarding path corresponding to the current node; If the second forwarding path does not exist in the at least one first forwarding path, determining the network address range of the network prefix corresponding to the current node as the network address range corresponding to the second forwarding path; In a case where the third forwarding path of the previous node is different from the second forwarding path, updating the network address of the at least one first forwarding path based on the network address range of the network prefix corresponding to the current node; If the second forwarding path does not exist in the at least one first forwarding path, the second forwarding path, the network address range corresponding to the second forwarding path, the at least one first forwarding path and the updated network address configuration thereof are used as the attribute information of the current node; If the second forwarding path exists in the at least one first forwarding path, the at least one first forwarding path and its updated network address are configured as attribute information of the current node.
9. The data plane analysis method according to claim 8, It is characterized in that The updating of the network address of the at least one first forwarding path based on the network address range of the network prefix corresponding to the current node includes: Determine a first address range to be updated based on a union of a network address range of the corresponding network prefix and a network address range corresponding to the second forwarding path; Updating the network address corresponding to the second forwarding path based on the first address range to be updated; Determine a second address range to be updated based on an intersection of a complement of a network address range of the corresponding network prefix and a network address range corresponding to the third forwarding path; The network address range corresponding to the third forwarding path is updated based on the second address range to be updated.
10. The data plane analysis method according to claim 6, It is characterized in that The method further comprises: Obtaining a prefix length of the network prefix; The priority of the network prefix is determined based on the prefix length, the priority is positively correlated with the prefix length, and the prefix length is negatively correlated with the size of the network address range corresponding to the network prefix.
11. The data plane analysis method according to claim 6, It is characterized in that The method further comprises: Obtaining data plane analysis results reported by each network node in the target network; The data plane analysis results are integrated to obtain a target data plane analysis result of the target network.
12. The data plane analysis method according to claim 6, It is characterized in that The step of obtaining a prefix tree for each of the network node groups based on the priority of the network prefix in the second routing information and the next hop network node corresponding to the network node includes: For each of the network node groups, a thread corresponding to the network node group is called to obtain a prefix tree using the thread based on the priority of the network prefix in the second routing information and the next hop network node corresponding to the network node.
13. A data plane analysis device, It is characterized in that Applied to a network node in a target network, the device comprises: A routing information acquisition module, used to acquire first routing information of a local network node group, wherein the first routing information includes a forwarding path of the network node group and a network address range corresponding to the forwarding path; a routing information query module, configured to query the first routing information to obtain a local first forwarding path and a first network address range corresponding to the first forwarding path; A verification information determination module, configured to determine first verification information based on the first network address range, wherein the first verification information is represented by a target address range determined by the first network address range; A data plane analysis module is used to send the first verification information based on the first forwarding path to obtain a data plane analysis result of the closed path where the first forwarding path is located.
14. A data plane analysis device, It is characterized in that Applied to a control node in a target network, the device comprises: A node information acquisition module, used to determine the network node group to which each network node in the target network belongs, and obtain second routing information of the network node group, wherein the second routing information includes sub-routing information of the corresponding network node, and the sub-routing information includes a network prefix and a next-hop network node; A prefix tree construction module, configured to obtain a prefix tree for each of the network node groups based on the priority of the network prefix in the second routing information and the next-hop network node corresponding to the network node, wherein the prefix tree includes a plurality of nodes, the nodes are characterized by the corresponding network prefix and a forwarding path, the forwarding path is obtained through the network node and the corresponding next-hop network node, and the attribute information of the node includes the forwarding path and the network address range represented by the forwarding path; An attribute information synchronization module is used to synchronize the attribute information of the leaf nodes in the prefix tree to each network node in the corresponding network node group, so that the network node obtains the first routing information of the network node group to which it belongs, and the first routing information is used to determine the data plane analysis result of the closed path where the network node is located.
15. A network device, It is characterized in that include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the data plane analysis method described in any one of claims 1 to 5 and / or the data plane analysis method described in any one of claims 6 to 12 by executing the computer instructions.
16. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the data plane analysis method described in any one of claims 1 to 5, and / or the data plane analysis method described in any one of claims 6 to 12.
17. A computer program product, It is characterized in that The method comprises computer instructions, wherein the computer instructions are used to cause a computer to execute the data plane analysis method according to any one of claims 1 to 5 and / or the data plane analysis method according to any one of claims 6 to 12.
