Identification method for interface address of IPv6 router

Through the Thompson sampling and target mapping mechanism based on sliding windows, combined with PDCP progressive segmentation, the problem of improper resource allocation in IPv6 router interface discovery is solved, and efficient and fast interface discovery and location recognition are achieved.

CN120434166APending Publication Date: 2025-08-05ZHONGYUAN ENGINEERING COLLEGE
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510627747.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

The existing IPv6 router interface discovery method is difficult to allocate detection resources adaptively, resulting in unnecessary detection and difficult to effectively cover the IPv6 network, and it is impossible to quickly and efficiently discover the router interface and its relative location.

Method used

The Thompson sampling method based on sliding window is used to select the IPv6 prefix, combine the target mapping mechanism and PDCP progressive segmentation, dynamically adjust the effectiveness and hop range of the detection target, and identify the interface address through stateless online detection.

Benefits of technology

It significantly improves the efficiency and discovery rate of IPv6 router interface discovery, reduces unnecessary detection, achieves higher discovery rates and less data transmission, and avoids potential target loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120434166A_ABST
    Figure CN120434166A_ABST
Patent Text Reader

Abstract

The invention discloses a method for identifying an interface address of an IPv6 router, and belongs to the technical field of network measurement. The method comprises the following steps: acquiring an IPv6 prefix list, and initializing experience information; selecting a current target IPv6 prefix according to the IPv6 prefix list, randomly generating a specific detection target in the current target IPv6 prefix, evaluating the effectiveness of the specific detection target by using experience information, and retaining the effective specific detection target; repeating the operation until the number of specific detection targets reaches a set value; performing stateless online detection according to each specific detection target to obtain a detection result; and updating the experience information, iterating the detection operation until the total quantity of the sent data packets reaches the total detection budget, obtaining the reachable interface address and relative position of the local address based on the detection result in each round of iteration, and completing the interface address identification. According to the invention, the problem that the existing method cannot adaptively allocate detection resources and minimize unnecessary detection is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of network measurement, and in particular relates to a method for identifying an IPv6 router interface address. Background Art

[0002] The continued depletion of IPv4 address resources has accelerated the global deployment of IPv6. While IPv6 effectively expands available address resources, its vast address space (2^128 addresses) poses significant challenges to router interface discovery. The goal of IPv6 router interface discovery is to discover the IPv6 addresses of router interfaces within a network and their relative locations within the network topology. These interfaces and their spatial distribution reflect the fundamental characteristics of IPv6 networks. Fast and efficient discovery methods are crucial for network surveys, security vulnerability detection, and infrastructure assessments.

[0003] Traditional IPv6 detection algorithms typically generate predefined destination addresses as detection targets. These methods are strictly limited by the quantity and quality of seed addresses, making it difficult to achieve comprehensive coverage of IPv6 networks. Recent research has introduced adaptive mechanisms to dynamically adjust detection directions, but they still face significant challenges: First, the selection weights for different IPv6 prefixes in existing algorithms are determined based on cumulative statistics since the start of detection, implicitly assuming that the discovery rate of each prefix remains stable throughout the detection process. However, the discovery rate typically exhibits significant continuous variation throughout the detection process, with the discovery rate of most prefixes steadily increasing to a peak before gradually decreasing. This characteristic makes it difficult for existing methods to adapt to changes in the discovery rate, potentially leading to convergence to a local optimal solution. Second, existing methods focus solely on budget allocation among prefixes, ignoring other important issues in the detection process, such as probing prefixes that are not actually assigned and repeatedly probing backbone paths.

[0004] While redundancy avoidance in IPv4 router interface discovery has been extensively studied, effective methods for IPv6 networks have yet to be proposed. Classic methods, such as DoubleTree and its variants, exploit the tree-like structure of the network when viewed from a single perspective to avoid duplicate probing of backbone paths. However, ICMPv6 implements aggressive rate limiting, making DoubleTree-like algorithms difficult to apply to IPv6 networks. Furthermore, the IPv6 address space is extremely sparse, making it difficult to discover new interfaces by probing unassigned prefixes.

[0005] Therefore, there is a need for improved methods and systems for efficient IPv6 router interface discovery that can adaptively allocate probe resources and minimize unnecessary probes. Summary of the Invention

[0006] In view of the above-mentioned deficiencies in the prior art, the present invention provides a method for identifying an IPv6 router interface address, which solves the problem that the prior art method cannot adaptively allocate detection resources and minimize unnecessary detection.

[0007] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is: a method for identifying an IPv6 router interface address, comprising:

[0008] S1. Obtain the IPv6 prefix list, set the total number of packets to be sent, and initialize experience information; the experience information includes the PDCP value corresponding to each IPv6 prefix in the IPv6 prefix list, the sub-prefix granularity, the valid hop range of the sub-prefix, and the number of successful and failed detections in the detection result sliding window;

[0009] S2. Select the current target IPv6 prefix using the sliding window-based Thompson sampling method based on the IPv6 prefix list, randomly generate a specific detection target within the current target IPv6 prefix, and use empirical information to evaluate the effectiveness of the specific detection target. If it is effective, retain the specific detection target; otherwise, adjust the specific detection target to a reasonable range or discard the specific detection target through the target mapping mechanism; repeat step S2 until the number of specific detection targets reaches the set value;

[0010] S3. Perform stateless online detection according to each specific detection target, obtain detection results, and update the total number of sent data packets;

[0011] S4. Update the experience information according to the detection results, and return to step S2 to iterate the detection operation until the total number of data packets sent reaches the total detection budget. Then, the detection is stopped. Based on the detection results in each round of iteration, the interface address and relative position reachable by the local address are obtained to complete the interface address identification.

[0012] The beneficial effects of the present invention are as follows: the present invention significantly improves the efficiency of IPv6 router interface discovery, achieves a discovery rate that is more than twice that of existing technology methods, and does not cause obvious potential target loss.

[0013] Furthermore, the current target IPv6 prefix is selected using the Thompson sampling method based on a sliding window, specifically:

[0014] Maintain a fixed-size sliding window of detection results for each IPv6 prefix in the IPv6 prefix list;

[0015] The sampling value of each IPv6 prefix is calculated based on the Beta distribution of the number of successful detections and the number of failed detections in the sliding window of the detection results of each IPv6 prefix:

[0016] x i ←β(ΣS i+1,ΣF i +1)

[0017] Among them, x i is the sampling value of the i-th IPv6 prefix in the IPv6 prefix list; β() is the Beta distribution; S i is the number of successful detections in the sliding window of the detection result for the i-th IPv6 prefix; F i is the number of failed detections in the sliding window of detection results for the i-th IPv6 prefix;

[0018] The sampling values of each IPv6 prefix are used as the relative selection weight of each IPv6 prefix; and a weight sampler is used to select the current target IPv6 prefix according to the relative selection weight of each IPv6 prefix.

[0019] The beneficial effects of the above further solution are: improving the adaptability of the detection algorithm to the dynamic changes of the discovery ratio of each prefix, improving the discovery ratio and discovery rate, and accelerating the convergence of the algorithm.

[0020] Furthermore, the specific detection target includes a target address and a hop limit.

[0021] The beneficial effect of the above further solution is: clarifying the detection target of the current address and preparing for the detection.

[0022] Furthermore, the effectiveness of using empirical information to evaluate a specific detection target is specifically as follows:

[0023] If the subspace to which the specific detection target belongs contains an address that has triggered a router response in the previous detection operation iteration round, and the hop count of the specific detection target is limited to the valid hop count range of the subspace to which it belongs, it is judged to be valid; otherwise, it is judged to be invalid; the subspace to which it belongs refers to the address space corresponding to the sub-prefix of the specific detection target; the sub-prefix refers to the sub-area of the current target IPv6 prefix space; the sub-area is specifically the address block obtained by subdividing the current target IPv6 prefix space.

[0024] The beneficial effect of the above further solution is that the detection target validity check can effectively avoid the generation of invalid detection targets in various situations such as detecting sub-prefixes that are not actually assigned, repeatedly detecting trunk paths, and the number of detection target hops exceeding the actual network range.

[0025] Furthermore, the target mapping mechanism is used to adjust the specific detection target to a reasonable range or discard the specific detection target, specifically:

[0026] If the experience information contains a valid hop count range of the sub-prefix corresponding to the specific detection target, the hop count target of the specific detection target is mapped to the valid hop count range corresponding to the sub-prefix; otherwise, the generated detection target is directly discarded.

[0027] The beneficial effects of the above further solution are: mapping the generated fixed hop count range of the detection target to the valid hop count range obtained by random sampling experiments can effectively prevent various types of invalid detection (detecting sub-prefixes that are not actually assigned, repeatedly detecting the backbone path, and detecting target hop counts exceeding the actual network range). It can also effectively prevent the dynamic detection algorithm from tending to discover edge routes rather than backbone routes due to the influence of the amplified response probability of edge devices. The purpose of using target mapping rather than direct discarding is to ensure that all sub-prefixes have undergone sufficiently random and uniform sampling detection experiments (i.e., they have been fully explored) when determining the valid hop count range of the sub-prefix.

[0028] Furthermore, the detection result is a response data packet that triggers a response feedback from the router.

[0029] The beneficial effect of the above further solution is: determining whether to trigger a router response based on the acquisition of the response data packet, and determining the reachable address of the current address.

[0030] Furthermore, the updating of the experience information according to the detection results is specifically as follows:

[0031] For each IPv6 prefix in the IPv6 prefix list, determine whether the total number of specific detection targets generated in all iteration rounds reaches the PDCP value corresponding to the IPv6 prefix. If so, double the PDCP value corresponding to the IPv6 prefix and update the sub-prefix granularity, the valid hop range of the sub-prefix, and the number of successful and failed detections in the detection result sliding window. Otherwise, only update the number of successful and failed detections in the detection result sliding window.

[0032] The expression of the sub-prefix granularity h+s is:

[0033] s←log2(PDCP)-λ

[0034] Where h is the length of the IPv6 prefix corresponding to the sub-prefix; s is the extension granularity; λ is the number of samples; PDCP is the PDCP value of the IPv6 prefix corresponding to the sub-prefix, and the initial PDCP value is 2 λ ; 2 λ is the sampling coefficient.

[0035] The above-mentioned further solution has the beneficial effect that the PDCP progressive segmentation mechanism can effectively determine the granularity of sub-prefixes that have undergone sufficient random sampling and probing experiments. Once the sub-prefix granularity of a prefix is determined to be fully explored in the current situation, the valid hop count range corresponding to each sub-prefix can be estimated based on the existing probing results.

[0036] Furthermore, the updating of the valid hop count range of the sub-prefix is specifically as follows: classifying all current probe feedbacks according to the sub-prefix granularity corresponding to the current PDCP value, and preparing a bitmap for marking all hop count limit values generating router responses in the sub-prefix for each sub-prefix;

[0037] Update the valid hop count range of each sub-prefix based on the bitmap data;

[0038] The sub-prefixes that do not generate responses are pruned and excluded from the subsequent generation of specific probe targets.

[0039] The beneficial effect of the above further solution is that it can effectively avoid detecting sub-prefixes that are actually not allocated.

[0040] Furthermore, when the hop limit range of each sub-prefix is updated based on the bitmap data, the upper limit of the valid hop range of the sub-prefix is extended until the space size of the valid hop range of the sub-prefix is a power of 2.

[0041] The above-mentioned further solution has the following beneficial effects: expanding the hop count range obtained by random sampling effectively prevents the loss of the target range caused by random sampling and ensures the random uniformity of the sampling experiment. In addition, for prefixes with a wide hop count range, the algorithm exponentially expands the hop count range (if the hop count range is less than 2 to the power of g, it will be forced to expand to 2 to the power of g), thus avoiding potential loss of the target range. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 Flow chart of the method of the present invention.

[0043] Figure 2 It is a progressive segmentation process based on PDCP.

[0044] Figure 3 This is an example of a hop count range expansion method.

[0045] Figure 4 This is an example of a target mapping method. DETAILED DESCRIPTION

[0046] The specific embodiments of the present invention are described below to facilitate understanding of the present invention by those skilled in the art. However, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the appended claims, these changes are obvious, and all inventions and creations utilizing the concepts of the present invention are protected.

[0047] Example 1

[0048] like Figure 1As shown, in one embodiment of the present invention, a method for identifying an IPv6 router interface address includes:

[0049] S1. Obtain the IPv6 prefix list, set the total number of packets to be sent, and initialize experience information; the experience information includes the PDCP value corresponding to each IPv6 prefix in the IPv6 prefix list, the sub-prefix granularity, the valid hop range of the sub-prefix, and the number of successful and failed detections in the detection result sliding window;

[0050] S2. Select the current target IPv6 prefix using the sliding window-based Thompson sampling method based on the IPv6 prefix list, randomly generate a specific detection target within the current target IPv6 prefix, and use empirical information to evaluate the effectiveness of the specific detection target. If it is effective, retain the specific detection target; otherwise, adjust the specific detection target to a reasonable range or discard the specific detection target through the target mapping mechanism; repeat step S2 until the number of specific detection targets reaches the set value;

[0051] S3. Perform stateless online detection according to each specific detection target, obtain detection results, and update the total number of sent data packets;

[0052] S4. Update the experience information according to the detection results, and return to step S2 to iterate the detection operation until the total number of data packets sent reaches the total detection budget. Then, the detection is stopped. Based on the detection results in each round of iteration, the interface address and relative position reachable by the local address are obtained to complete the interface address identification.

[0053] In this embodiment, the method uses an IPv6 prefix list as input and then performs multiple rounds of detection. In each round of detection, the system repeatedly executes the target generation process to generate multiple detection targets. Each target generation process includes: selecting a prefix using the Thompson sampling method based on a sliding window, and randomly generating a specific detection target within the prefix (including the target address and hop limit). The validity of the target is then evaluated using empirical information. Valid targets are directly used for detection. Adjustable detection targets are adjusted to a reasonable range using a target mapping mechanism, while unadjustable targets are discarded. After generating a specified number of detection targets, online detection is performed. The system receives response packets and updates the empirical information based on the feedback results, which is used to guide subsequent target generation. The next round of detection is then performed, and detection is terminated until the total number of data packets sent reaches the total detection budget. The present invention can reduce data transmission by more than 90% in most prefix areas, achieve an 11.2% discovery rate, and discover 7,670 unique interface addresses per second at a detection rate limit of 100 kpps.

[0054] The current target IPv6 prefix is selected using the Thompson sampling method based on a sliding window, specifically:

[0055] Maintain a fixed-size sliding window of detection results for each IPv6 prefix in the IPv6 prefix list;

[0056] The sampling value of each IPv6 prefix is calculated based on the Beta distribution of the number of successful detections and the number of failed detections in the sliding window of the detection results of each IPv6 prefix:

[0057] x i ←β(∑S i +1,∑F i +1)

[0058] Among them, x i is the sampling value of the i-th IPv6 prefix in the IPv6 prefix list; β() is the Beta distribution; S i is the number of successful detections in the sliding window of the detection result for the i-th IPv6 prefix; F i is the number of failed detections in the sliding window of detection results for the i-th IPv6 prefix;

[0059] The sampling values of each IPv6 prefix are used as the relative selection weight of each IPv6 prefix; and a weight sampler is used to select the current target IPv6 prefix according to the relative selection weight of each IPv6 prefix.

[0060] The specific detection target includes a target address and a hop limit.

[0061] The effectiveness of using empirical information to evaluate a specific detection target is specifically as follows:

[0062] If the subspace to which the specific detection target belongs contains an address that has triggered a router response in the previous detection operation iteration round, and the hop count of the specific detection target is limited to the valid hop count range of the subspace to which it belongs, it is judged to be valid; otherwise, it is judged to be invalid; the subspace to which it belongs refers to the address space corresponding to the sub-prefix of the specific detection target; the sub-prefix refers to the sub-area of the current target IPv6 prefix space; the sub-area is specifically the address block obtained by subdividing the current target IPv6 prefix space.

[0063] like Figure 4 As shown, the target mapping mechanism is used to adjust the specific detection target to a reasonable range or discard the specific detection target, specifically:

[0064] If the experience information contains a valid hop count range of the sub-prefix corresponding to the specific detection target, the hop count target of the specific detection target is mapped to the valid hop count range corresponding to the sub-prefix; otherwise, the generated detection target is directly discarded.

[0065] The detection result is a response data packet that triggers a response feedback from the router.

[0066] The updating of the experience information according to the detection results is specifically as follows:

[0067] For each IPv6 prefix in the IPv6 prefix list, determine whether the total number of specific detection targets generated in all iteration rounds reaches the PDCP value corresponding to the IPv6 prefix. If so, double the PDCP value corresponding to the IPv6 prefix and update the sub-prefix granularity, the valid hop range of the sub-prefix, and the number of successful and failed detections in the detection result sliding window. Otherwise, only update the number of successful and failed detections in the detection result sliding window.

[0068] like Figure 2 As shown, the expression of the sub-prefix granularity h+s is:

[0069] s←log2(PDCP)-λ

[0070] Where h is the length of the IPv6 prefix corresponding to the sub-prefix; s is the extension granularity; λ is the number of samples; PDCP is the PDCP value of the IPv6 prefix corresponding to the sub-prefix, and the initial PDCP value is 2 λ ; 2 λ is the sampling coefficient.

[0071] The updating of the valid hop count range of the sub-prefix is specifically as follows: classifying all current detection feedbacks according to the sub-prefix granularity corresponding to the current PDCP value, and preparing a bitmap for marking all hop count limit values generating router responses in the sub-prefix for each sub-prefix;

[0072] Update the valid hop count range of each sub-prefix based on the bitmap data;

[0073] The sub-prefixes that do not generate responses are pruned and excluded from the subsequent generation of specific probe targets.

[0074] In this embodiment, when the total exploration count for a prefix reaches a specific PDCP threshold, all subprefixes of that prefix are considered fully explored at the granularity corresponding to that threshold. All probe feedback received for that prefix is then categorized at this granularity, and the hop limit range for each category is calculated to determine the effective hop limit range for all subprefixes at that granularity. For each subprefix, a bitmap is prepared to mark all hop limit values that generate a router response. If a probe packet triggers a router response and its destination address belongs to a subprefix, the hop limit for that subprefix is marked. Subprefixes that do not generate a response are pruned and excluded from subsequent target generation.

[0075] like Figure 3As shown, when the hop limit range of each sub-prefix is updated based on the bitmap data, the upper limit of the valid hop range of the sub-prefix is extended until the space size of the valid hop range of the sub-prefix is a power of 2.

[0076] Example 2

[0077] A system for performing the method of Example 1. The system performs multiple rounds of detection, generating and detecting a specified number of detection targets in each round. In each round, the system generates and detects targets based on empirical information, then adjusts the empirical information based on feedback before proceeding to the next round. The system completes the detection process after the total number of data packets sent reaches a preset total detection budget (e.g., sending 1 billion detection packets).

[0078] The core module of the system is the target generation module, which includes two key steps: prefix selection and target generation within the selected prefix. During the generation of each detection target, the system first uses a weighted sampler to select between different prefixes, and then randomly generates a specific detection target within the selected prefix. The detection target contains the target address and hop limit. Finally, the generated detection targets are judged using the invalid detection avoidance mechanism. If the detection target meets the requirements, it is directly used for detection. If the hop limit of the detection target is not within the valid hop range, but the target address of the detection target does exist in the valid hop range, target mapping is performed. In other cases, the detection target is directly discarded. The above process is performed enough times in a round of detection to generate a sufficient number of detection targets, which are then used for online detection.

[0079] Prefix selection using Thompson sampling based on a sliding window:

[0080] The distribution of IPv6 router interfaces varies significantly across different prefixes. To discover more interfaces within a limited budget, the system aims to generate more probe targets for prefixes with higher discovery rates. This requires a balance between exploration (trying different prefixes) and exploitation (selecting prefixes known to have higher discovery rates).

[0081] Unlike previous works (such as Treestrace and Sweeper) that determine prefix selection weights based on cumulative statistics since the start of the probe, the present invention adopts a Thompson sampling method based on a sliding window. This method only considers data from recent probe rounds and is more adaptable to dynamic changes in prefix discovery rates. In large-scale probe experiments, it was observed that the discovery rate of most prefixes follows a consistent pattern: it rises steadily to a peak and then gradually decreases. This is because probe packets sent early are more likely to trigger replies from routers near the backbone path, but the number of these routers is limited. After these routers are discovered, the responses generated by subsequent probes are increasingly limited to network branches, resulting in a decrease in discovery rate. Therefore, selection weights should be derived based on insights from recent probes. It is inappropriate to use cumulative statistics collected across the entire prefix probe history.

[0082] When the number of packets sent for a prefix does not exceed the window size, this sampling method is exactly the same as the classic Thompson sampling. However, when the number of probe packets targeting a prefix exceeds the window limit, the next weight update can only rely on the statistics collected within the window.

[0083] This strategy has the following implications:

[0084] The expectation of the sampled value is consistent with the expectation of the recent discovery rate (the discovery rate calculated from the sliding window). The recent discovery rate reflects the subsequent detection performance of a prefix better than the cumulative discovery rate.

[0085] The existence of the window limits the extent to which exploration decreases as the total number of attempts increases. For windows with thousands of attempts (the total number of successful and failed explorations is in the thousands), the exploration intensity has been sufficiently reduced that there is no need to worry about the risk of overexploration.

[0086] Generate targets within the selected prefix:

[0087] After determining the prefix of the probe target, the system considers how to select an appropriate probe target within the specific prefix to avoid invalid probes.

[0088] Invalid probes in IPv6 router interface discovery mainly come from three aspects:

[0089] Redundant probing of backbone network paths: From the perspective of any single node, the network topology exhibits a tree-like structure. Without prior knowledge, some probing algorithms generate probe targets by combining each target address with a fixed range of hop count limits, which inevitably leads to redundant probing of backbone network paths.

[0090] Generating probe targets with hop limits exceeding the required path length: Many edge devices can be reached with a hop limit much smaller than the configured maximum. Probes with hop limits exceeding the actual path length to the corresponding edge device are wasteful because they fail to reveal any new router interfaces.

[0091] Probing unassigned sub-prefixes: IPv6 networks use the longest prefix match for routing decisions. Therefore, probes sent to unassigned sub-prefixes are routed along a path similar to their parent prefix, leading to duplicate interface discovery and wasted probing resources.

[0092] To address these issues, the present invention introduces an adaptive mechanism to avoid invalid probes. The basic principle is that once a sufficient number of random target probes have been performed within a prefix, the system can estimate the actual hop count range of that prefix based on the probe responses. Comparative experiments have demonstrated that this mechanism can reduce data transmission by over 90% in most prefixes while maintaining the same number of interface discoveries, significantly improving probe efficiency.

[0093] Throughout the probing process, the system records each target address that elicits a response and its corresponding hop count range. This information is used to guide subsequent probing. However, setting a reasonable hop count range for an entire prefix based solely on overall prefix statistics is too broad to be effective. To address this issue, the system employs an algorithm that determines the granularity of a fully explored subspace within the overall prefix space based on the degree of exploration of the entire prefix. When a subspace is determined to be fully explored, the system can immediately implement a targeted probing strategy or exclude it from further probing.

[0094] PDCP-based progressive spatial partitioning:

[0095] refer to Figure 2 , describes the progressive space partitioning process based on PDCP (Progressive Partition Control Point). PDCP acts as an exponentially increasing threshold to determine the timing of prefix space partitioning and state transition. For each prefix, the PDCP initial value is set to 2 λ , whenever the total exploration count of a prefix (including the targets for which exploration and discarding have been performed) reaches the current PDCP value of the prefix, the PDCP value is doubled.

[0096] The use of PDCP for space partitioning is based on the following mathematical property: for an ideal hash function that generates an m-bit unsigned integer, covering all possible combinations of any consecutive w bits (w ≤ m) requires only 2w hash values. Certain specialized hash functions can approach this ideal performance quite well. In practice, using such a hash function to generate 2a (where a > 1) random targets within a given prefix can generally fully cover all (a-1)-bit subprefixes extending from that prefix. Note that hash functions are not the only implementation method; alternatives, such as predefined random sequences, can also be used.

[0097] When the total exploration count for a prefix reaches a specific PDCP threshold, the system considers all subprefixes of that prefix to have been fully explored at the granularity corresponding to that threshold. The system then categorizes all probe responses received for that prefix at that granularity and calculates the hop limit range for each category, thereby determining the effective hop limit range for all subprefixes at that granularity. For each subprefix, the system prepares a bitmap to mark all hop limit values that generated a router response. If a probe packet triggers a router response and its destination address belongs to a subprefix, the system marks the hop limit for that subprefix. Subprefixes that do not generate a response are pruned and excluded from subsequent target generation.

[0098] This process is performed after each round of exploration. Since only prefixes triggered by PDCP require data processing and no additional computation is required until the next PDCP threshold is reached, the impact on computational efficiency is minimal. Furthermore, when a prefix is fully explored or contains any information deemed no longer necessary, the system immediately deletes the corresponding data, minimizing memory usage.

[0099] It is worth noting that all prefixes have a common maximum sub-prefix partition length (determined by the sampling factor 2 λ When the sub-prefix length of a prefix exceeds the maximum sub-prefix length, the system cannot guarantee that all sub-prefixes of that prefix have been fully and uniformly explored when determining its hop count range. In this case, the system will continue to adjust the probe range based on probe feedback but will not increase the sub-prefix length. When this occurs, after the prefix's PDCP threshold is reached, the system will re-determine the hop count range for each sub-prefix based on the existing record, then delete the record for that prefix and restart recording information for that prefix.

[0100] The purpose of using the PDCP space partitioning mechanism is that, for any prefix at any exploration level, the mechanism can determine the granularity at which all subspaces have been fully explored and provide a hop count range for all sub-prefixes of that granularity.

[0101] Target Generation:

[0102] The system randomizes the Cartesian product space of the IP address and hop limit for each prefix for target generation. The system uses an increasing offset as input to a hash function and takes the last k (64-prefix length) + 5 binary bits of the output. The first k bits are used as a random sub-prefix after the prefix, and the last 5 bits are used as the hop limit index (corresponding to a range of 1-32 hops). The system generates a 64-bit target prefix and fills the last 64 bits of the target address with a random IID (Interface Identifier) according to general conventions. The hash function here can also be replaced by methods such as a predefined random sequence.

[0103] The key point of the present invention is that after generating random targets, the system adjusts or discards them based on experience. When the system obtains a randomly generated / 64 prefix and hop limit combination, it can immediately find the corresponding fully explored subspace and the hop range associated with that subspace. If the subspace containing the generated target has not triggered any response in previous probes, the target is directly discarded. For prefixes whose exploration count remains below the initial PDCP threshold, targets are generated across the entire hop limit range (typically 3 to 34 hops) and are used directly for probes without inspection.

[0104] For any given prefix, the hop count range obtained from a previous response cannot be directly applied to subsequent target generation. One reason is that possible packet loss and insufficiently random target sampling can result in missing ranges. Another reason is that the variation in hop count range size across sub-prefixes makes it difficult to maintain a uniform random distribution for target generation. Therefore, the system needs to expand the hop count range.

[0105] refer to Figure 3 The figure below illustrates the hop range expansion process. For each sub-prefix, the system marks the range between its minimum and maximum hop counts as the tag interval. The system then expands both forward (towards the larger hop count) and backward by a fixed number (usually one hop). Finally, the system expands forward until the range size reaches a power of two (not 1). This range expansion mechanism is performed only once, after PDCP is triggered and statistical analysis of the classification detection results is completed.

[0106] The system evaluates the generated targets against these expanded hop count ranges. If the target's hop count limit falls within the hop count range of the corresponding sub-prefix, it is used directly as a probe target. If the hop count limit exceeds the range, it is mapped to a reasonable range using the target mapping mechanism if adjustments are possible; otherwise, it is discarded.

[0107] refer to Figure 4, which illustrates the target mapping mechanism. The target mapping mechanism converts the last n bits of a randomly generated hop limit index into a valid hop limit index, where 2n is the size of the target range. The target mapping mechanism takes advantage of the fact that both the range size of the randomly generated index (32) and the hop limit range size (2n) are powers of 2 to ensure that the mapped hop limits maintain random uniformity. The system adjusts these hop limits rather than simply discarding targets that are out of range to ensure that each sub-prefix has been probed for a sufficient number of targets when determining the sub-prefix hop range. Another advantage of this mapping mechanism is that it can exponentially expand the hop range when the initial span is already large, thereby preventing target range loss.

[0108] This target mapping mechanism operates only during the progressive space partitioning phase. Once the sub-prefix length reaches its maximum allowed value, out-of-range targets are simply discarded instead of being adjusted, as further space partitioning becomes unnecessary.

[0109] Embed verification information in the probe packet and discard the response packet that fails the verification. This verification ensures that the response packet is a genuine reply to the probe and that critical information has not been modified in the two-way transmission between the local and responding routers.

Claims

1. A method for identifying an IPv6 router interface address, characterized in that: include: S1. Get the IPv6 prefix list, set the total number of packets to be sent, and initialize experience information. The experience information includes the PDCP value corresponding to each IPv6 prefix in the IPv6 prefix list, the sub-prefix granularity, the valid hop count range of the sub-prefix, and the number of successful and failed detections in the detection result sliding window; S2. Select the current target IPv6 prefix using the sliding window-based Thompson sampling method based on the IPv6 prefix list, randomly generate a specific detection target within the current target IPv6 prefix, and use empirical information to evaluate the effectiveness of the specific detection target. If it is effective, retain the specific detection target; otherwise, adjust the specific detection target to a reasonable range or discard the specific detection target through the target mapping mechanism; repeat step S2 until the number of specific detection targets reaches the set value; S3. Perform stateless online detection according to each specific detection target, obtain detection results, and update the total number of sent data packets; S4. Update the experience information according to the detection results, and return to step S2 to iterate the detection operation until the total number of data packets sent reaches the total detection budget. Then, the detection is stopped. Based on the detection results in each round of iteration, the interface address and relative position reachable by the local address are obtained to complete the interface address identification.

2. The method for identifying an IPv6 router interface address according to claim 1, wherein: The current target IPv6 prefix is selected using the Thompson sampling method based on a sliding window, specifically: Maintain a fixed-size sliding window of detection results for each IPv6 prefix in the IPv6 prefix list; The sampling value of each IPv6 prefix is calculated based on the Beta distribution of the number of successful detections and the number of failed detections in the sliding window of the detection results of each IPv6 prefix: x i ←β(∑S i +1,ΣF i +1) Among them, x i is the sampling value of the i-th IPv6 prefix in the IPv6 prefix list; β() is the Beta distribution; S i is the number of successful detections in the sliding window of the detection result for the i-th IPv6 prefix; F i is the number of failed detections in the sliding window of detection results for the i-th IPv6 prefix; The sampling values of each IPv6 prefix are used as the relative selection weight of each IPv6 prefix; and according to the relative selection weight of each IPv6 prefix, a weight sampler is used to select the current target IPv6 prefix.

3. The method for identifying an IPv6 router interface address according to claim 1, wherein: The specific detection target includes a target address and a hop limit.

4. The method for identifying an IPv6 router interface address according to claim 3, wherein: The effectiveness of using empirical information to evaluate a specific detection target is specifically as follows: If the subspace to which the specific detection target belongs contains an address that has triggered a router response in the previous detection operation iteration round, and the hop count of the specific detection target is within the valid hop count range of the subspace, then it is determined to be valid; otherwise, it is determined to be invalid; the subspace to which it belongs refers to the address space corresponding to the sub-prefix of the specific detection target; The sub-prefix refers to a sub-area of the current target IPv6 prefix space; the sub-area is specifically an address block obtained by subdividing the current target IPv6 prefix space.

5. The method for identifying an IPv6 router interface address according to claim 1, wherein: The target mapping mechanism is used to adjust the specific detection target to a reasonable range or discard the specific detection target, specifically: If the experience information contains a valid hop count range of the sub-prefix corresponding to the specific detection target, the hop count target of the specific detection target is mapped to the valid hop count range corresponding to the sub-prefix; otherwise, the generated detection target is directly discarded.

6. The method for identifying an IPv6 router interface address according to claim 1, wherein: The detection result is a response data packet that triggers a response feedback from the router.

7. The method for identifying an IPv6 router interface address according to claim 1, wherein: The updating of the experience information according to the detection results is specifically as follows: For each IPv6 prefix in the IPv6 prefix list, determine whether the total number of specific detection targets generated in all iteration rounds reaches the PDCP value corresponding to the IPv6 prefix. If so, double the PDCP value corresponding to the IPv6 prefix and update the sub-prefix granularity, the valid hop range of the sub-prefix, and the number of successful and failed detections in the detection result sliding window. Otherwise, only update the number of successful and failed detections in the detection result sliding window. The expression of the sub-prefix granularity h+s is: s←log2(PDCP)-λ Where h is the length of the IPv6 prefix corresponding to the sub-prefix; s is the extension granularity; λ is the number of samples; PDCP is the PDCP value of the IPv6 prefix corresponding to the sub-prefix, and the initial PDCP value is 2 λ ; 2 λ is the sampling coefficient.

8. The method for identifying an IPv6 router interface address according to claim 7, wherein: The updating of the valid hop count range of the sub-prefix is specifically as follows: classifying all current detection feedbacks according to the sub-prefix granularity corresponding to the current PDCP value, and preparing a bitmap for marking all hop count limit values generating router responses in the sub-prefix for each sub-prefix; Update the valid hop count range of each sub-prefix based on the bitmap data; The sub-prefixes that do not generate responses are pruned and excluded from the subsequent generation of specific probe targets.

9. The method for identifying an IPv6 router interface address according to claim 8, wherein: When updating the hop limit range of each sub-prefix based on the bitmap data, the upper limit of the valid hop range of the sub-prefix is extended until the space size of the valid hop range of the sub-prefix is a power of 2.

Citation Information

Cited By

  • Efficient and high-hit-rate IPv6 router interface discovery method

    CN121283925A

  • IPv6 interface level topology detection method based on Monte Carlo tree search

    CN121567586A