An IPv6-oriented network layer topology detection method

By improving the Back-to-Back probe packet and SRv6 protocol, and combining the additive feature of penalty covariance and leaf node features of subtrees, the accuracy and privacy issues in IPv6 network topology probing are solved, achieving efficient and accurate topology identification and logical loop detection.

CN117081933BActive Publication Date: 2026-05-19NANJING UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING UNIV OF SCI & TECH
Filing Date
2023-08-31
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing IPv6 network topology detection technologies suffer from problems such as low inference accuracy, inability to meet privacy protection requirements, poor adaptability to IPv6 networks, and inability to identify logical loops.

Method used

Using an improved Back-to-Back probe packet and the SRv6 protocol, the shared path length is calculated through additive covariance features with penalties to infer the basic topology of the base node pair. Neighbor nodes are added from bottom to top to form the overall topology, and topology fusion is performed through the distribution features of leaf nodes in the subtrees to identify logical loops.

Benefits of technology

It improves the accuracy of shared path length calculation, supports both strict and loose SRv6 environments, can identify logical loops in the topology, improves the accuracy and recall of topology inference, and is suitable for large-scale IPv6 networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117081933B_ABST
    Figure CN117081933B_ABST
Patent Text Reader

Abstract

The application discloses an IPv6-oriented network layer analysis topology detection method, and belongs to the technical field of network space security, and the method comprises the following steps: based on the improved Back-to-Back detection packet, the shared path length between each two network target nodes in a network target node set is acquired through a covariance additive characteristic quantity with a penalty term; the two network target nodes corresponding to the maximum value of the shared path length are taken as a base node pair; the basic topology structure of the base node pair is inferred by using an SRv6 detection packet, and a parent node is obtained; the SRv6 detection packet is used to select an insertion position meeting a preset condition on the basis of the parent node, and neighbor nodes are added from bottom to top to form an overall topology structure; the overall topology structures acquired by different detection sources are topologically fused through the distribution characteristics of sub-tree leaf nodes, and the detection of a logical loop is realized; the method can improve the accuracy and recall rate of topology inference, and can be implemented in a large-scale IPv6 network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of cyberspace security technology, and more specifically relates to a network layer topology detection method for IPv6. Background Technology

[0002] Network layer analysis (NBR) technology can indirectly estimate the performance parameters of internal network links based on end-to-end measurements without the need for measurement cooperation from internal network nodes. It is an important network measurement method that directly guides network management and optimization. It uses end-to-end path-level parameter data to infer internal link-level parameters, such as latency and packet loss rate of a specific link segment. SRv6 (Segment Routing IPv6) inserts an SRH (Segment Routing Header) extension header into IPv6 packets, pushes an explicit IPv6 address stack onto the SRH, and performs hop-by-hop forwarding by continuously updating the destination address and offset address stack through intermediate nodes. It combines the source routing advantages of SR with the simplicity and extensibility of IPv6 packets, providing a three-layer programmable space for network paths, services, and forwarding behavior, enabling it to support the diverse needs of a large number of different services.

[0003] Currently, there are two main active network topology measurement methods: one is based on internal node cooperation, and the other is based on network tomography, also known as network tomography. With increasing user demands for privacy and security, and the presence of numerous anonymous routers in networks, internal nodes are often configured not to respond to external probe requests. Therefore, the accuracy of topology probing methods based on internal node cooperation, such as Traceroute, is decreasing. Constructing a topology by passively listening to routing information often fails to obtain a complete topology and cannot meet privacy protection requirements. Current network tomography-based topology inference methods for IPv4 suffer from low accuracy, inability to identify logical loops, and failure to consider bandwidth impact, making them unsuitable for direct migration to IPv6 networks. Meanwhile, topology probing based on internal node cooperation for IPv6 fails to meet privacy protection requirements and faces the problem of non-cooperative network devices.

[0004] Therefore, overcoming the problems of low inference accuracy, inability to meet privacy protection, poor adaptability to IPv6 networks, and inability to identify logical loops in existing IPv6 network topology detection technologies is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] In view of the above problems, the present invention provides a network layer topology detection method for IPv6, so as to at least solve some of the technical problems mentioned in the background art.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] A network layer topology detection method for IPv6 includes the following steps:

[0008] S1. Based on the improved Back-to-Back probe packet, the shared path length between every two network target nodes in the network target node set is obtained through the covariance additive feature with penalty term; and the two network target nodes corresponding to the maximum value of the shared path length are taken as the base node pair.

[0009] S2. Use SRv6 probe packets to infer the basic topology of the base node pair and obtain the parent node;

[0010] S3. Using the SRv6 probe packet, select an insertion position that meets the preset conditions based on the parent node, and add neighboring nodes from bottom to top to form the overall topology.

[0011] S4. By using the distribution characteristics of leaf nodes in the subtrees, the overall topology obtained from different detection sources is fused to achieve the detection of logical loops.

[0012] Furthermore, the improved Back-to-Back probe packet includes two sets of Back-to-Back probe packets; wherein:

[0013] The first set of Back-to-Back probe packets had no payload data.

[0014] The second set of Back-to-Back probe packets contains payload data, and the overall message length is less than the link PMTU;

[0015] Both the first set of Back-to-Back probe packets and the second set of Back-to-Back probe packets consist of two ICMPv6 Request packets.

[0016] Furthermore, the additive covariance characteristic with penalty term is expressed as:

[0017]

[0018] Where M1 and M2 represent the common path length metrics obtained from two sets of Back-to-Back probe packets with different loads, and the penalty term is... The penalty is used to measure the impact of network conditions on the detection results.

[0019] Further, step S2 specifically includes:

[0020] S21. Determine the SRv6 environment type of the base node by responding to the message; the SRv6 environment type includes strict SRv6 environment and loose SRv6 environment;

[0021] S22. Based on the response time difference, determine the basic topology to which the base node pair belongs in the strict SRv6 environment or the loose SRv6 environment; the basic topology includes binary tree structure and linear topology.

[0022] S23. If the base node pair is a binary tree structure, then create a parent node; if the base node pair is a linear topology, then take the node closer to the root node as the parent node.

[0023] Further, step S21 specifically includes:

[0024] S211. Send SRv6 messages containing the addresses of the two nodes in the Segment List to the two network target nodes in the base node pair respectively;

[0025] S212. Obtain the response message of the base node pair: If response messages are received from both network target nodes in the base node pair, it indicates that the base node pair belongs to the strict SRv6 environment.

[0026] If a response message is received from one of the network target nodes in the base node pair, it indicates that the base node pair belongs to a loose SRv6 environment.

[0027] Further, step S22 specifically includes:

[0028] (1) Determine the basic topology to which the base node pair belongs in the strict SRv6 environment;

[0029] Construct an ICMPv6 Request packet with an SRv6 extension header;

[0030] Configure the Flags field and Segment List field of the SRv6 extension header, and set the Segment List[1] to the address with the shortest response time;

[0031] The response time difference between the ICMPv6 Request packet with the SRv6 extension header and the last two elements in the Segment List field is recorded as the first response time difference.

[0032] The response time difference between the arrival of an ICMPv6 Request packet without an SRv6 extension header to the last two elements in the Segment List field is denoted as the second response time difference.

[0033] The first response time difference and the second response time difference are compared: if the first response time difference and the second response time difference are equal, it indicates that the base node pair belongs to the binary tree structure; if the first response time difference and the second response time difference are not equal, it indicates that the base node pair belongs to the linear topology structure.

[0034] (2) Determine the basic topology to which the base node pair belongs in the loose SRv6 environment;

[0035] Construct an SRv6 message observation node, and determine whether the base node supports SRv6 by checking whether the SRv6 message observation node has executed the End SID function;

[0036] Adjust the stack order of addresses in the Segment List, set the first hop to the network target node that supports the SRv6 probe packet, that is, set Segment List[0] to a node that does not support SRv6; set Segment List[1] to the address of a node that supports SRv6;

[0037] The response time difference between the two network target nodes in the base node pair is obtained through the SRv6 probe packet and is denoted as the third response time difference.

[0038] The response time difference between the two network target nodes in the base node pair when an ICMPv6 Request packet without an SRv6 extension header is obtained is denoted as the fourth response time difference.

[0039] Compare the third response time difference with the fourth response time difference: if the third response time difference is equal to the fourth response time difference, or if the third response time difference is equal to 0, then the base node pair belongs to the linear topology.

[0040] Furthermore, step S3 specifically includes:

[0041] Add the parent node to the set of network target nodes, remove the base node pair from the set of network target nodes, calculate the shared path length between the parent node and other remaining network target leaf nodes, and select the network target leaf node with the longest shared path length with the parent node as the target point.

[0042] The SRv6 probe packet is used to select an insertion position that meets the preset conditions from the target point, and neighboring nodes are added from bottom to top to form the overall topology.

[0043] Further, the insertion position that meets the preset conditions specifically includes: in the set of network target nodes, if there exists a network target leaf node n that meets the preset conditions, then that network target node is used as the insertion node; the preset conditions are expressed as:

[0044]

[0045] in, and This represents the two network target nodes in the base node pair. Indicates base node pair The common path length metric; n represents the inserted node. Indicates the base node The common path length metric between the inserted node n and the node n; Δ≤min e∈E d(e), where e represents any logical link in the logical link set E, and d(e) represents its length, which is the minimum value less than or equal to the length of all logical links.

[0046] Further, step S4 specifically includes:

[0047] Based on the distribution of network target nodes, the feature sequences of newly added nodes detected by different detection sources are obtained; the feature sequences include the IPv6 addresses and feature values ​​of all network target nodes;

[0048] Adjust the feature sequence so that the addresses of newly added nodes at the same positions are the same;

[0049] Calculate the cosine similarity of feature sequences between different newly added nodes, and select the pair of newly added nodes with the highest cosine similarity for topology fusion.

[0050] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a network layer topology detection method for IPv6, which has the following beneficial effects:

[0051] 1. Based on the improved Back-to-Back probe packet, the shared path length is calculated using the shared path length penalty algorithm, which can reduce the impact of different link bandwidths on the probe results and greatly improve the accuracy of shared path length calculation compared with the current methods.

[0052] 2. By utilizing the SRv6 protocol and configuring OAM, the basic topology of the target node is determined more accurately. This method supports both strict SRv6 and loose SRv6 environments, fundamentally improving the shortcomings of traditional network layering methods that can only determine the binary tree structure of edge node topology. It can determine the topological relationship between non-leaf nodes, thus enabling the method to be applied in real networks.

[0053] 3. Through topology fusion, logical loop structures in the topology can be identified, which improves the shortcomings of traditional network tomography, which can only obtain tree-like topologies. This improves the accuracy and recall of topology inference, and can be implemented in large-scale IPv6 networks, laying the foundation for subsequent cyberspace mapping work. Attached Figure Description

[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0055] Figure 1 This is a schematic diagram of the network layer topology detection method for IPv6 provided in an embodiment of the present invention.

[0056] Figure 2 This is a schematic diagram of the network layer topology detection method for IPv6 provided in an embodiment of the present invention.

[0057] Figure 3 This is an example diagram of shared path detection provided in an embodiment of the present invention.

[0058] Figure 4 Example diagram of topology probing time provided for embodiments of the present invention.

[0059] Figure 5 A schematic diagram of SRv6 probe message parameter design provided for an embodiment of the present invention.

[0060] Figure 6 An example diagram of node insertion position provided in an embodiment of the present invention.

[0061] Figure 7 This is a line graph illustrating the algorithm efficiency comparison provided in an embodiment of the present invention. Detailed Implementation

[0062] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0063] See Figure 1 and Figure 2 As shown in the figure, this invention discloses a network layer topology detection method for IPv6, including the following steps:

[0064] S1. Based on the improved Back-to-Back probe packet, the shared path length between every two network target nodes in the network target node set is obtained through the covariance additive feature with penalty term; and the two network target nodes corresponding to the maximum value of the shared path length are taken as the base node pair.

[0065] S2. Use SRv6 probe packets to infer the basic topology of the base node pair and obtain the parent node;

[0066] S3. Using SRv6 probe packets, select an insertion position that meets the preset conditions based on the parent node, and add neighboring nodes from bottom to top to form the overall topology.

[0067] S4. By using the distribution characteristics of leaf nodes in the subtrees, the overall topology obtained from different detection sources is fused to achieve the detection of logical loops.

[0068] The steps described above will be explained in detail below.

[0069] In step S1 above, the shared path length between every two network target nodes is mainly calculated. To this end, this embodiment of the invention proposes a shared path measurement method based on an improved Back-to-Back probe packet; wherein the improved Back-to-Back probe packet includes two sets of Back-to-Back probe packets with different loads and lengths, such as... Figure 3 As shown; the first group of Back-to-Back probe packets is a traditional Back-to-Back probe packet with no payload data, consisting of two ICMPv6Request packets; the second group of Back-to-Back probe packets has a payload, and the overall message length is less than the maximum transmission unit (e.g., link PMTU) in the transmission path; this second group of Back-to-Back probe packets also consists of two ICMPv6Request packets; in actual operation, the payload of the second group of Back-to-Back probe packets should be as large as possible, and its payload can be set to 1350 bytes;

[0070] The difference between the measurement results of the first group of Back-to-Back probe packets and the second group of Back-to-Back probe packets measures the impact of bandwidth or congestion on the probe results in this measurement. Based on the traditional shared path length measurement formula with covariance as the additive metric, the difference is used as a penalty. Among them, (1) is the traditional shared path metric formula, and Y1 and Y2 represent the response times of the two probe packets, respectively. (2) is the reconstructed shared path metric calculation formula with penalty, that is, the covariance additive feature with penalty.

[0071] Metric = Cov(Y1, Y2) (1)

[0072]

[0073] Where M1 and M2 represent the common path length metrics detected by two sets of Back-to-Back probe packets with different loads, and the penalty term is... The penalty is used to measure the impact of network conditions on the detection results;

[0074] The shared path length between any two network target nodes is calculated using the shared path metric formula. The nodes are then sorted from largest to smallest, and the two network target nodes corresponding to the maximum shared path length are selected as the base node pair.

[0075] In step S2 above, the basic topology of the base node pair is determined, specifically including:

[0076] S21. Determine the SRv6 environment type of the base node through the response message; SRv6 environment types include strict SRv6 environment and loose SRv6 environment;

[0077] The basic topology can be found in [reference]. Figure 4 As shown, points R1 and R2 are a pair of base nodes; in Figure 4 In the diagram, the left side represents a binary tree structure, denoted as Topology 1. The right side represents the parent-child relationship (i.e., a linear topology), denoted as Topology 2. First, it's necessary to determine whether R1 and R2 support the SRv6 bearer protocol. This is achieved by sending an SRv6 message containing the addresses of both nodes in the Segment List, with the parameters configured as follows: Figure 5 As shown; if response messages from both can be received, it means that both R1 and R2 support SRv6 and belong to a strict SRv6 environment; if only one node's response message can be received, it means that it is a loose SRv6 environment.

[0078] S22. Determine the basic topology of the base node pair in a strict SRv6 environment or a loose SRv6 environment by the response time difference; the basic topology includes binary tree structure and linear topology.

[0079] (1) Strict SRv6 environment

[0080] In a strict SRv6 environment, all nodes support the SRv6 protocol. Construct an ICMPv6 Request packet with an SRv6 extension header. The packet configuration is as follows: Figure 5As shown, the Flags and Segment List fields of the SRv6 extension header in the probe message are configured respectively. The Flags field is set to 0x20, that is, the 0-bit is set to 1. By setting the 0-bit to 1, segment-by-segment detection is implemented, causing devices in the specified path to respond with ICMPv6 Reply messages. The last element in the Segment List field is Receiver1, followed by Receiver2. In practice, the probe message will first pass through Receiver1, then Receiver2. T1 and T2 represent the delays in the arrival of ICMPv6 Request packets with SRv6 extension headers at Receiver1 and Receiver2 respectively. Let ΔT = |T2 - T1|, where ΔT represents the first response time difference. Then, ordinary ICMPv6 Request messages (i.e., ICMPv6 without SRv6 extension headers) are sent again to Receiver1 and Receiver2 respectively. (Request data packet), using T′1 and T′2 to represent the response delays of Receiver1 and Receiver2 respectively, let ΔT′=|T′2-T′1|, where ΔT′ represents the second response time difference; compare ΔT and ΔT′, if they are equal, it means it is topology two, otherwise it means it is topology one.

[0081] (2) Loose SRv6 environment

[0082] In a loose SRv6 environment, only some nodes support SRv6. Construct an SRv6 packet test node and observe whether the node executes the End SID function to determine whether the base node supports SRv6. Then adjust the stack order of the addresses in SegmentList, set the first hop to the target node that supports SRv6, and let the probe packet traverse the two nodes in sequence. Set Segment List[0] to the node that does not support SRv6; set Segment List[1] to the address of the node that supports SRv6.

[0083] The probe steps in strict SRv6 yield ΔT = |T4 - T3| and ΔT' = |T4' - T3'|; where T4, T3 and T4', T4' correspond to the ICMPv6 probe delay and SR probe message delay of R2 and R1, respectively; the difference between T4' and T3' may be twice the difference between T4 and T3, or equal to 0. As long as one of the equations in (3) is satisfied, it can be inferred that the topology of R1 and R2 is a linear topology:

[0084]

[0085] S23. If the base node pair is a binary tree structure, then create a parent node; if the base node pair is a linear topology, then the node closer to the root node is taken as the parent node.

[0086] Step S3 above specifically includes:

[0087] Add the parent node to the set of network target nodes, remove the base node pair from the set of network target nodes, and calculate the shared path length between the parent node and other remaining network target leaf nodes. The calculation formula is as follows:

[0088]

[0089] Where k represents the other network target nodes in the network target node set besides the parent node, i.e., the network target leaf nodes; f represents the parent node; Let c(f) represent the length of the common path between k and f; c(f) represents all child nodes of f, and z represents one of the child nodes. This represents the length of the common path between k and z.

[0090] Select the target leaf node with the longest shared path length with its parent node as the target point; use SRv6 probe packets to select an insertion position that meets the preset conditions from the target point; based on the insertion position, add neighboring nodes from bottom to top to form the overall topology.

[0091] Based on the basic topology and shared path length, there are three insertion positions: the target node's parent node, child node, and sibling node; see details below. Figure 6 As shown, there are a total of such topologies under the two topologies. Figure 6 The six possibilities are shown; in response, this invention proposes an SRv6-based insertion position determination method that can adapt to dynamic changes in nodes, specifically including:

[0092] (1) First, find the two target nodes with the longest shared path. As the base node, step 2 determines the topological structure of the two nodes. If it's a binary tree relationship, then... and Create a parent node f; otherwise, set the target node that is closer to the source node as the parent node f, and pair the nodes. Remove the parent node from the target node set and then add the parent node to the target node set.

[0093] (2) In the target node set, if there exists a node n such that n satisfies the following condition: or The absolute value of the difference between the shared path lengths satisfies:

[0094]

[0095] in, and This represents the two network target nodes in the base node pair. Indicates base node pair The common path length metric; n represents the inserted node. Indicates the base node The common path length metric between the inserted node n and the node n; Δ≤min e∈E d(e), where e represents any logical link in the logical link set E, and d(e) represents its length, which is the minimum length of all logical links less than or equal to it. Then the sum of n nodes... Nodes sharing the same parent node, which conforms to... Figure 6 The leftmost insertion method, where the parent node of node n is... The nearest common parent node of the node;

[0096] (3) Determine the topological relationship between the parent node and the node to be inserted using step S2. If it matches topology one, then the insertion method is as follows: Figure 6 The insertion method in the middle, namely n and The nearest common parent of each node forms a linear topology; otherwise, the insertion method is the rightmost one, i.e., n and n. The nearest common parent node of a node becomes its sibling node;

[0097] (4) Calculate the shared path length between the parent node and other target leaf nodes in the network. The formula for calculating the shared path with a target leaf node is shown in the above formula (4); that is, calculate the average of the shared path lengths between all child nodes of the parent node and the target node.

[0098] Step S3 above begins with a subset containing all target nodes. In each step, it selects a possible neighboring node pair (i.e., sibling nodes, which share the same parent node in the topology tree), removes them from the target node set, creates a new node as its parent node, adds it to the original tree, and adds that parent node to the target node set. This process iterates until only one node remains in the target node set, which becomes a child node of the root node (the probe source).

[0099] In step S4 above, each probe source obtains a network topology containing some unknown nodes. The key to topology fusion is finding the positions of these unknown nodes in different topologies, that is, finding the same nodes in different probe results. For each probe source, the set of network target nodes is fixed. Therefore, the topology structure from the subtree rooted at each intermediate node to its leaf node often changes less than the topology structure from the probe source to the intermediate node. Furthermore, the overall topology structure is built from bottom to top, so the same node in different topologies often has a more similar structure at the bottom layer. Therefore, this embodiment of the invention proposes a topology fusion method based on the leaf node distribution characteristics of subtrees in this step. It represents the leaf node feature sequence of newly added nodes in different probe results, then calculates the feature sequence similarity to find the same node in different topologies, and for successfully matched nodes, it complements the distribution of edges between them; specifically:

[0100] First, in the tree-like topology obtained from each probe source, a subtree structure is constructed using all intermediate nodes as roots and the target node set as leaf nodes. The root node is encoded according to the positions of the leaf nodes contained in the subtree. The feature sequence of each intermediate node is a two-dimensional array containing the IPv6 addresses of all leaf nodes and its depth. This depth is calculated from the bottom up as relative distance, rather than from the root, because the probe source changes in different probe processes while the probed nodes remain unchanged. Second, since the feature sequences of intermediate nodes in each probe result are known, the cosine similarity of the feature sequences between different network target nodes is calculated, and the node with the highest similarity is selected as the same node. Finally, for nodes that are successfully matched, the distribution of edges is supplemented.

[0101] Step 4 is described in detail below:

[0102] Input the set of detection results from m detectors: R = {T1 = (V1, E1), T2 = (V2, E2), ..., T...} m (V m E m The topology T containing only the target node. final V i (i∈[1,m]) represents the set of nodes for the i-th detection result, E i (i∈[1,m]) represents the set of edges of the i-th probe result.

[0103] 1) Eigenvalue calculation. For each detection result... intermediate node For The subtree rooted at a certain point has leaf nodes as follows: target node set A subset of D sub={t1,t2,...,t n}and Let D sub The feature value of each target node t is I(t) = dep max -dep(t), where dep max The depth of the entire tree is represented by t, and the depth of the target node in the subtree is represented by dep(t).

[0104] 2) Feature sequence representation. Calculate D sub The feature values ​​of the target node are used to obtain the node. The characteristic sequence is:

[0105]

[0106] 3) Similarity calculation. For any two distinct tree topologies T′ and T″ in R, p≠q, where W′ and W″ are the sets of intermediate nodes of T′ and T″ respectively. The feature sequences of nodes p and q are obtained. The unique identifiers in the first row of both sequences are processed to ensure the identifier order of the two matrices is consistent. The default eigenvalue is set to 0. The second row of the two matrices is considered as two n-dimensional vectors, denoted as... and Then calculate the cosine similarity.

[0107] 4) Select the pair of nodes with the highest similarity in different topologies and add them to T as the same node. final At the same time, supplement the distribution of edges, T final The set of edges in the middle is the union of all edges in the detection results.

[0108] Output topology fusion result T final .

[0109] In summary, this invention provides a network layering topology probing method for IPv6. It sends improved Back-to-Back probe packets to the IPv6 network and calculates the shared path length using a covariance formula with penalties. It achieves accurate topology inference of target nodes and determination of insertion point locations through the path programmability of the SRv6 protocol and the in-path measurement function of the OAM protocol. It uses the leaf node distribution characteristics of subtrees for topology fusion, constructing a general topology from tree-like topologies obtained from different probe sources to detect logical loops. Figure 7 As shown, under the same packet volume, the embodiments of the present invention have higher accuracy. The present invention has advantages such as high adaptability to IPv6 networks, high detection efficiency, and high accuracy. Under the premise of ensuring privacy requirements, it can provide a more efficient and accurate IPv6 network topology detection scheme.

[0110] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0111] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A network layer topology detection method for IPv6, characterized in that, Includes the following steps: S1. Based on the improved Back-to-Back probe packet, the shared path length between every two network target nodes in the network target node set is obtained through the covariance additive feature with penalty term; and the two network target nodes corresponding to the maximum value of the shared path length are taken as the base node pair. S2. Use SRv6 probe packets to infer the basic topology of the base node pair and obtain the parent node; S3. Using the SRv6 probe packet, select an insertion position that meets the preset conditions based on the parent node, and add neighboring nodes from bottom to top to form the overall topology. S4. By using the distribution characteristics of leaf nodes in the subtrees, the overall topology obtained from different detection sources is topologically fused to achieve the detection of logical loops; Step S2 specifically includes: S21. Determine the SRv6 environment type of the base node by responding to the message; the SRv6 environment type includes strict SRv6 environment and loose SRv6 environment; S22. Based on the response time difference, determine the basic topology to which the base node pair belongs in the strict SRv6 environment or the loose SRv6 environment; the basic topology includes binary tree structure and linear topology. S23. If the base node pair is a binary tree structure, then create a parent node; if the base node pair is a linear topology, then take the node closer to the root node as the parent node. Step S22 specifically includes: (1) Determine the basic topology to which the base node pair belongs in the strict SRv6 environment; Construct an ICMPv6 Request packet with an SRv6 extension header; Configure the Flags field and Segment List field of the SRv6 extension header, and set the Segment List[1] to the address with the shortest response time; The response time difference between the ICMPv6 Request packet with the SRv6 extension header and the last two elements in the Segment List field is recorded as the first response time difference. The response time difference between the arrival of an ICMPv6 Request packet without an SRv6 extension header to the last two elements in the Segment List field is denoted as the second response time difference. The first response time difference and the second response time difference are compared: if the first response time difference and the second response time difference are equal, it indicates that the base node pair belongs to the binary tree structure; if the first response time difference and the second response time difference are not equal, it indicates that the base node pair belongs to the linear topology structure. (2) Determine the basic topology to which the base node pair belongs in the loose SRv6 environment; Construct an SRv6 message observation node, and determine whether the base node supports SRv6 by checking whether the SRv6 message observation node has executed the End SID function; Adjust the stack order of addresses in the Segment List, set the first hop to the network target node that supports the SRv6 probe packet, that is, set Segment List[0] to a node that does not support SRv6; set Segment List[1] to the address of a node that supports SRv6; The response time difference between the two network target nodes in the base node pair is obtained through the SRv6 probe packet and is denoted as the third response time difference. The response time difference between the two network target nodes in the base node pair when an ICMPv6 Request packet without an SRv6 extension header is obtained is denoted as the fourth response time difference. Compare the third response time difference with the fourth response time difference: if the third response time difference is equal to the fourth response time difference, or if the third response time difference is equal to 0, then the base node pair belongs to the linear topology.

2. The network layer topology detection method for IPv6 according to claim 1, characterized in that, The improved Back-to-Back probe packet includes two sets of Back-to-Back probe packets; wherein: The first set of Back-to-Back probe packets had no payload data. The second set of Back-to-Back probe packets contains payload data, and the overall message length is less than the link PMTU; Both the first group of Back-to-Back probe packets and the second group of Back-to-Back probe packets consist of two ICMPv6Request packets.

3. The network layer topology detection method for IPv6 according to claim 2, characterized in that, The additive covariance characteristic with penalty is represented as follows: ; in, and These represent the common path length metrics obtained from two sets of Back-to-Back probe packets with different loads, with the penalty term being... The penalty is used to measure the impact of network conditions on the detection results.

4. The network layer topology detection method for IPv6 according to claim 1, characterized in that, Step S21 specifically includes: S211. Send SRv6 messages containing the addresses of the two nodes in the Segment List to the two network target nodes in the base node pair respectively. S212. Obtain the response message of the base node pair: If response messages are received from both network target nodes in the base node pair, it indicates that the base node pair belongs to the strict SRv6 environment. If a response message is received from one of the network target nodes in the base node pair, it indicates that the base node pair belongs to a loose SRv6 environment.

5. The network layer topology detection method for IPv6 according to claim 1, characterized in that, Step S3 specifically includes: Add the parent node to the set of network target nodes, remove the base node pair from the set of network target nodes, calculate the shared path length between the parent node and other remaining network target leaf nodes, and select the network target leaf node with the longest shared path length with the parent node as the target point. The SRv6 probe packet is used to select an insertion position that meets the preset conditions from the target point, and neighboring nodes are added from bottom to top to form the overall topology.

6. The network layer topology detection method for IPv6 according to claim 5, characterized in that, The insertion position that meets the preset conditions specifically includes: in the set of network target nodes, if there exists a network target leaf node n that meets the preset conditions, then that network target node is used as the insertion node; the preset conditions are expressed as: ; in, and This represents the two network target nodes in the base node pair. Indicates base node pair The common path length metric; n represents the inserted node. Indicates the base node The common path length metric between the inserted node n and the node n itself; , Represents any logical link in the logical link set E. This indicates its length, which is the minimum value less than or equal to the length of all logical links.

7. The network layer topology detection method for IPv6 according to claim 1, characterized in that, Step S4 specifically includes: Based on the distribution of network target nodes, the feature sequences of newly added nodes detected by different detection sources are obtained; the feature sequences include the IPv6 addresses and feature values ​​of all network target nodes; Adjust the feature sequence so that the addresses of newly added nodes at the same positions are the same; Calculate the cosine similarity of feature sequences between different newly added nodes, and select the pair of newly added nodes with the highest cosine similarity for topology fusion.