Method and apparatus for enumerating public resolver anycast nodes based on forwarding relationship inference
By using a forwarding relationship inference method, and leveraging the intrinsic forwarding relationship between the forwarder and the common resolver, iterative forwarding relationship measurement and indirect resolver aggregation are performed. This solves the problems of high cost and low recall in existing methods, and enables fast enumeration and efficient recall of anycast nodes of the common resolver.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2026-03-27
AI Technical Summary
Existing methods for enumerating anycast nodes are costly and have low recall rates, making it difficult to efficiently evaluate the resolution efficiency of the domain name system and optimize node deployment.
By using a forwarding relationship inference method, the inherent forwarding relationship between the forwarder and the common resolver is utilized to perform iterative forwarding relationship measurement and indirect resolver aggregation, and to enumerate the anycast nodes of the common resolver.
We have achieved fast enumeration of anycast nodes in a lightweight public parser, which reduces the measurement resource requirements and improves the recall rate, significantly outperforming existing methods.
Smart Images

Figure CN119484476B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of computer networks, and particularly relates to a public resolver anycast node enumeration method and device based on forwarding relationship inference. BACKGROUND
[0002] With the rapid development of the global Internet, in order to improve the attack resistance of the domain name system and the resolution efficiency of domain name resolution, anycast technology is widely used in the domain name system field. The domain name system operating agency provides a unified anycast IP address as a service address to users, and deploys actual domain name resolution servers in multiple scattered geographical locations as anycast nodes.
[0003] Anycast is a special network communication mode first proposed in RFC1546, which enables users to access any nearest one of a group of hosts or services identified by the same anycast IP address. The wide application of anycast technology has given birth to a new emerging role of the domain name system infrastructure, the public resolver. The market of the public resolver based on anycast technology has developed rapidly, and many well-known public resolvers have emerged.
[0004] Anycast node identification and enumeration have also become an important way to evaluate the domain name resolution efficiency of the anycast domain name system, optimize the deployment scheme of anycast nodes, and improve the resilience of the anycast domain name system. Existing anycast node enumeration methods mostly rely on large-scale measurement platforms. For example, before users use RIPE Atlas distributed probes to carry out large-scale measurements, they need to earn enough points by sponsoring or sharing their own nodes. SUMMARY
[0005] The application provides an anycast node enumeration method and device for a public resolver based on forwarding relationship inference, which is used to solve the technical problems of high enumeration cost and low recall rate of current anycast nodes.
[0006] In a first aspect, an anycast node enumeration method for a public resolver based on forwarding relationship inference is disclosed, and the method comprises the following steps:
[0007] Step S1: obtaining a public resolver service IP address to be inferred, sending multiple forwarding relationship query requests to the public resolver service IP address to be inferred, obtaining a plurality of indirect resolvers having a forwarding relationship with the public resolver to be inferred, and storing the indirect resolvers in an initial indirect resolver set;
[0008] Based on the pre-detected forwarding relationship measurement data of the entire IPv4 address space, the forwarding relationship between the forwarder and the indirect resolver is extracted, and the initial forwarding relationship set is composed of all the extracted forwarding relationships. The initial forwarding relationship in the initial forwarding relationship set is denoted as (IPF inIPI out ); wherein, IPF in is a set of forwarders, IPI out is a set of indirect resolvers corresponding to the set of forwarders;
[0009] determining an initial forwarder served by the public resolver to be inferred based on the forwarding relationship measurement data, wherein the initial forwarder refers to a forwarder in the forwarding relationship measurement data that has a forwarding relationship with each indirect resolver in the initial set of indirect resolvers;
[0010] obtaining autonomous domain organization information of each indirect resolver in the initial set of indirect resolvers in a probing manner to obtain a set of initial indirect resolver autonomous domain organization information;
[0011] letting a first set be equal to the initial set of indirect resolvers, a second set be equal to the initial set of forwarders, a third set be equal to the set of initial indirect resolver autonomous domain organization information, initializing a current iteration number k as 1, and initializing a result set R (k) of the kth iteration as an empty set, initializing the number of indirect resolvers sum (k) in R (k) as 0, initializing a result set R (k-1) of the (k-1)th iteration as the first set, initializing the number of indirect resolvers sum (k-1) in R (k-1) as the number of elements in the first set;
[0012] Step S2: if sum (k) is equal to sum (k-1) , then taking the first set as a set of anycast nodes of the public resolver to be inferred, and ending the method; otherwise, proceeding to step S3;
[0013] Step S3: sending a real-time forwarding relationship measurement packet to each initial forwarder in the second set; based on a forwarding relationship response packet obtained through probing, obtaining a forwarding relationship involved between a forwarder and an indirect resolver in a transmission process of the real-time forwarding relationship measurement packet and the forwarding relationship response packet, taking the forwarding relationship as a candidate forwarding relationship, and denoting the candidate forwarding relationship as (IPF c ,IPI c ); wherein, IPF c is a set of forwarders in the candidate forwarding relationship, and IPI c is a set of indirect resolvers corresponding to the set of forwarders;
[0014] Step S4: taking the indirect resolvers in the indirect resolver set as candidate indirect resolvers, and performing the following operations on each candidate indirect resolver:
[0015] based on the initial forwarding relationship set, the candidate indirect resolvers, the result set R of the k-1th round of iteration (k-1) performing indirect resolver aggregation;
[0016] The indirect resolver aggregation includes: if the autonomous domain organization information of the candidate indirect resolver belongs to the elements in the third set, merging the candidate indirect resolver into the first set, obtaining all forwarders in the initial forwarding relationship set having a forwarding relationship with the candidate indirect resolver, and merging the all forwarders having a forwarding relationship into the second set;
[0017] Step S5: taking the first set as a new indirect resolver node, and adding the new indirect resolver node to the result set R of the kth round of iteration (k) , and setting sum (k) as the number of indirect resolvers in the updated R (k) , and setting k as k+1 to enter step S2.
[0018] Preferably, the public resolver is a recursive resolver system deployed using anycast technology, including a unified resolver service IP address, a plurality of hidden resolvers, and indirect resolvers.
[0019] Preferably, the indirect resolver is a public resolver that directly interacts with an authoritative domain name server, actually performs a domain name recursive resolution process, and is transparent to users.
[0020] Preferably, the forwarding relationship measurement packet and the forwarding relationship response packet are both TXT type DNS packets, the forwarding relationship measurement packet includes a destination address, and the forwarding relationship response packet includes an indirect resolver IP address.
[0021] Preferably, in the indirect resolver aggregation, if the autonomous domain organization information of the candidate indirect resolver does not belong to the third set, the candidate indirect resolver is discarded.
[0022] In a second aspect, a public resolver anycast node enumeration device based on forwarding relationship inference is disclosed, and the device includes:
[0023] An initialization module configured to obtain a public resolver service IP address to be inferred, send multiple forwarding relationship query requests to the public resolver service IP address to be inferred, obtain a plurality of indirect resolvers having a forwarding relationship with the public resolver to be inferred, and store the indirect resolvers in an initial indirect resolver set;
[0024] Based on the forwarding relationship measurement data of the pre-probeed full IPv4 address space, the forwarding relationships between the forwarder and the indirect resolver are extracted. The extracted forwarding relationships form an initial forwarding relationship set, denoted as (IPF). in IPI out ); among which, IPF in For a set of repeaters, IPI out This is the set of indirect resolvers corresponding to the set of repeaters;
[0025] Based on the forwarding relationship measurement data, the initial forwarder served by the public resolver to be inferred is determined, and the initial forwarder set is composed of all the initial forwarders. The initial forwarder refers to the forwarder that has a forwarding relationship with each indirect resolver in the initial indirect resolver set in the forwarding relationship measurement data.
[0026] The autonomous system organization information of each indirect resolver in the initial indirect resolver set is obtained by probing, thus obtaining the initial indirect resolver autonomous system organization information set;
[0027] Let the first set be equal to the initial indirect resolver set, the second set be equal to the initial repeater set, and the third set be equal to the initial indirect resolver autonomous system organization information set. Initialize the current iteration number k to 1, and initialize the result set R of the k-th iteration. (k) initialize R as an empty set. (k) The number of indirect parsers in sum (k) Set the result set R of the (k-1)th iteration to 0. (k-1) For the first set, initialize the result set R of the (k-1)th iteration. (k-1) The corresponding number of indirect parsers, sum (k-1) The number of elements in the first set;
[0028] First judgment module: configured as sum (k) equals sum (k-1) If the first set is selected, it will be used as the set of anycast nodes for the public parser to be inferred; otherwise, the detection module will be triggered.
[0029] The detection module is configured to send a real-time forwarding relationship measurement message to each initial repeater in the second set; based on the forwarding relationship response message obtained from the detection, it acquires the repeaters and indirect resolvers involved in the transmission of the real-time forwarding relationship measurement message and the forwarding relationship response message, and uses the forwarding relationship between the repeaters and indirect resolvers involved as a candidate forwarding relationship, denoted as (IPF). c IPI c); wherein, IPF c is a set of forwarders in the candidate forwarding relationship, IPI c is a set of indirect resolvers corresponding to the set of forwarders;
[0030] an aggregation module configured to take the indirect resolvers in the set of indirect resolvers as candidate indirect resolvers, and for each candidate indirect resolver, perform the following operations:
[0031] based on the set of initial forwarding relationships, the candidate indirect resolver, and the result set R (k-1) perform indirect resolver aggregation;
[0032] the indirect resolver aggregation includes: if the autonomous domain organization information of the candidate indirect resolver belongs to the elements in the third set, merging the candidate indirect resolver into the first set, obtaining all the forwarders in the set of initial forwarding relationships having a forwarding relationship with the candidate indirect resolver, and merging all the forwarders having the forwarding relationship into the second set;
[0033] an update module configured to take the first set as a new indirect resolver node, and add the new indirect resolver node to the result set R (k) of the kth round of iteration, assign sum (k) to the number of indirect resolvers in the updated R (k) , and assign k to k+1, triggering the first judging module.
[0034] In a third aspect, an electronic device is disclosed, and the electronic device includes:
[0035] at least one processor; and
[0036] a memory communicatively connected with the at least one processor; wherein
[0037] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method as described above.
[0038] In a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is disclosed, and the computer instructions are used to enable the computer to perform the method as described above.
[0039] The present application has the following technical effects:
[0040] The application is a lightweight public resolver anycast node fast enumeration method, which uses the existing endogenous forwarding relationship between the publicly accessible forwarder and the public resolver to convert a large number of open forwarders into large-scale distributed measurement nodes, and can deploy, trigger, complete the measurement and enumeration of the public resolver anycast node on a single host, greatly reducing the measurement resources required for the enumeration research and analysis of the public resolver anycast node. BRIEF DESCRIPTION OF DRAWINGS
[0041] Figure 1 A flowchart of the public resolver anycast node enumeration method based on forwarding relationship inference;
[0042] Figure 2 A client domain name system infrastructure diagram;
[0043] Figure 3 A structure diagram of the public resolver anycast node enumeration device based on forwarding relationship inference. DETAILED DESCRIPTION
[0044] The embodiments of the application are described in detail below with reference to the accompanying drawings.
[0045] As shown in Figure 1 , the application provides a public resolver anycast node enumeration method based on forwarding relationship inference, which comprises the following steps:
[0046] Step S1: obtaining a public resolver service IP address to be inferred, sending multiple forwarding relationship query requests to the public resolver service IP address to be inferred, obtaining a plurality of indirect resolvers having a forwarding relationship with the public resolver to be inferred, and storing the indirect resolvers in an initial indirect resolver set;
[0047] Based on the pre-detected forwarding relationship measurement data of the whole IPv4 address space, the forwarding relationship between the forwarder and the indirect resolver is extracted, and the initial forwarding relationship set is composed of all the extracted forwarding relationships. The initial forwarding relationship in the initial forwarding relationship set is denoted as (IPF in ,IPI out ); wherein IPF in is a forwarder set, and IPI out is an indirect resolver set corresponding to the forwarder set;
[0048] Based on the forwarding relationship measurement data, the initial forwarder served by the public resolver to be inferred is determined, and the initial forwarder set is composed of all the initial forwarders. The initial forwarder refers to the forwarder having a forwarding relationship with each indirect resolver in the initial indirect resolver set in the forwarding relationship measurement data;
[0049] The autonomous system organization information of each indirect resolver in the initial indirect resolver set is obtained by probing, thus obtaining the initial indirect resolver autonomous system organization information set;
[0050] Let the first set be equal to the initial indirect resolver set, the second set be equal to the initial repeater set, and the third set be equal to the initial indirect resolver autonomous system organization information set. Initialize the current iteration number k to 1, and initialize the result set R of the k-th iteration. (k) initialize R as an empty set. (k) The number of indirect parsers in sum (k) Set the result set R of the (k-1)th iteration to 0. (k-1) For the first set, initialize the result set R of the (k-1)th iteration. (k-1) The corresponding number of indirect parsers, sum (k-1) The number of elements in the first set;
[0051] Step S2: If sum (k) equals sum (k-1) If the first set is selected as the set of anycast nodes for the public parser to be inferred, the method ends; otherwise, proceed to step S3.
[0052] Step S3: Send a real-time forwarding relationship measurement message to each initial repeater in the second set; based on the detected forwarding relationship response message, obtain the repeaters and indirect resolvers involved in the transmission of the real-time forwarding relationship measurement message and the forwarding relationship response message, and use the forwarding relationship between the repeaters and indirect resolvers involved as candidate forwarding relationships, denoted as (IPF). c IPI c ); among which, IPF c For the set of forwarders in the candidate forwarding relationship, IPI c This is the set of indirect resolvers corresponding to the set of repeaters;
[0053] Step S4: Select the indirect parsers in the indirect parser set as candidate indirect parsers, and perform the following operations for each candidate indirect parser:
[0054] Based on the initial forwarding relationship set, candidate indirect resolvers, and the result set R of the (k-1)th iteration... (k-1) Perform indirect parser aggregation;
[0055] The indirect resolver aggregation comprises: if the autonomous domain organization information of the candidate indirect resolver belongs to the elements in the third set, merging the candidate indirect resolver into a first set, obtaining all forwarders having a forwarding relationship with the candidate indirect resolver in the initial forwarding relationship set, and merging the all forwarders having the forwarding relationship into a second set;
[0056] Step S5: taking the first set as a new indirect resolver node, and adding the new indirect resolver node into a result set R of the kth round iteration (k) , and sum (k) is updated as R (k) , and the number of indirect resolvers in R target is updated as the number of indirect resolvers in R target ; k is updated as k+1, and the step S2 is entered.
[0057] The common resolver is a recursive resolver system deployed by using anycast technology, comprising a unified resolver service IP address, a plurality of hidden resolvers and indirect resolvers.
[0058] In the embodiment, the common resolver anycast node enumeration is to give the common resolver service IP address RDNSS target deployed based on anycast, and to enumerate the anycast instances and IP addresses behind the resolver service IP address.
[0059] Further, the indirect resolver is a resolver in the common resolver directly interacting with an authoritative domain name server, actually performing a domain name recursive resolution process, and transparent to a user.
[0060] The forwarding relationship measurement packet and the forwarding relationship response packet are both TXT type DNS packets, the forwarding relationship measurement packet comprises a destination address, and the forwarding relationship response packet comprises an indirect resolver IP address.
[0061] In the indirect resolver aggregation, if the autonomous domain organization information of the candidate indirect resolver does not belong to the third set, the candidate indirect resolver is discarded.
[0062] As shown in FIG. 1, according to service objects, the Internet domain name system infrastructure can be divided into a server-side domain name system infrastructure and a client-side domain name system infrastructure. The server-side domain name system infrastructure mainly refers to an authoritative domain name server (ADNS), and the client-side domain name system infrastructure mainly refers to a resolver. With the rapid development of Internet service scale and terminal user scale, the domain name system resolver architecture gradually evolves from the initial distributed single-server design to a more complex multi-layer forwarding, multi-level caching and multi-point backup complex architecture, and the resolver is differentiated into multiple different roles. Therefore, the domain name system client-side infrastructure presents a more complex structure.
[0063] Figure 2 In the middle, the arrow indicates the direction of sending the domain name resolution request. The resolver directly interacting with the client mainly includes the open resolver (OpenDNS, ODNS) and the recursive resolver system. The recursive resolver system (RDNSS, Recursive DNS System) refers to a complex resolver system operated by a resolver service provider or ISP. It is generally composed of a resolver service IP address, a hidden resolver (HDNS, Hidden Recursive DNS) and an indirect resolver (IRDNS, Indirect Recursive DNS). The resolver service IP address is an anycast IP address, which is used to provide domain name resolution services to end users. The hidden resolver is mainly used for internal caching and domain name resolution request distribution scheduling of the recursive resolver system. The indirect resolver mainly interacts with the authoritative domain name server and performs the actual domain name resolution process. The open resolver refers to a resolver that provides open recursive domain name resolution services to end users. It mainly includes forwarders (FDNS, Forwarder DNS), direct resolvers (Direct Recursive DNS, DRDNS) and other types. From the perspective of end users, the resolver service IP address also exhibits the same open recursive service behavior characteristics as the open resolver. In summary, the forwarder, direct resolver and resolver service IP, etc. Open resolvers accept domain name resolution requests from end users, indirect resolvers directly interact with authoritative domain name systems, and recursive resolver systems achieve high-speed distribution of domain name resolution requests and efficient caching of resolution records through one or more layers of hidden resolvers.
[0064] From Figure 2 the domain name resolution request processing flow, it can be seen that only the direct recursive resolver and the indirect recursive resolver directly interact with the authoritative domain name server. The forwarder only forwards the domain name resolution request to another forwarder or recursive resolver system.
[0065] The public resolver anycast node enumeration problem can be described as: given the public resolver service IP address RDNSS target based on anycast deployment, enumerate the anycast instances behind the resolver service IP address and their IP addresses. Corresponding to Figure 2 , it is to find the set of indirect resolvers deployed in the recursive resolver system given the service IP of the recursive resolver system. Therefore, the public resolver anycast node enumeration of the present application has the same semantics as the resolver pool discovery of a specific recursive resolver system.
[0066] The basic idea of the present application is to use the endogenous forwarding relationship between the forwarder and the public resolver to transform the massive forwarders into the observation nodes of the anycast node enumeration of the public resolver, repeatedly perform the steps of forwarding relationship measurement, indirect resolver aggregation and forwarder sampling, and iteratively enumerate the anycast nodes of the public resolver.
[0067] First, based on a small amount of existing network-wide forwarding relationship measurement data (such as: one round), the real-time detection method is used to first send multiple query requests to the resolver system RDNSS target to obtain the initial indirect resolver set IPI0={ipi1, ipi i ,…, ipi n}. Then, according to IPI0, the existing forwarding relationship measurement data (IPF in , IPI out ) is screened out to obtain the initial forwarder set IPF0={ipf1, ipf target ,…, ipf m} served by the resolver system RDNSS i . Let Next, the real-time detection method is used to iteratively update and Specifically, the forwarding relationship query request is sent to the forwarder set . Since the forwarding relationship set by the forwarder has endogeneity and certainty, it will not change frequently in a short time. Therefore, it can be speculated that these query requests will reach the resolver system RDNSS target after one or more forwarding, and then be distributed to an indirect resolver to complete the final domain name resolution process. Considering that the forwarder may set multiple upstream resolver systems, the indirect resolver expansion strategy is introduced, that is, through the autonomous system organization (ASO, Autonomous System Organization) information to filter the indirect resolvers of non-same resolver system RDNSS target to enter the indirect resolver set If the ASO information of the candidate indirect resolver ipi c in the subsequent search is consistent with the ASO information in the current , the candidate indirect resolver ipi c is added to . Then, the forwarding relationship data detected in real time and the existing forwarding relationship data are used to update The above process is iteratively performed until reaches a stable state, in which the number of nodes no longer increases. The pseudo code description of the algorithm is shown in Algorithm 1.
[0068] Algorithm 1: Anycast node enumeration algorithm based on forwarding relationship inference
[0069] Given a public resolver RDNSS to be tested in the form of resolver service IP address target , and basic forwarding relationship measurement data (IPF in , IPI out ).
[0070] 1) Generate an initial set: IPI0={ipi1,…ipi i ,…,ipi n}, IPF0={ipf1,ipfi,…,ipf m}, ASO IPI ←get_aso(IPI0).
[0071] 2) Loop
[0072] 3) Send a forwarding relationship measurement packet to , collect forwarding relationship measurement data, and generate candidate forwarding relationship (IPF c , IPI c ) ;
[0073]
[0074] In the present application, forwarding refers to the phenomenon that a user domain name resolution request flows through multiple resolvers before reaching an authoritative server. When a domain name resolution request flows from one resolver to another, it is said that there is a forwarding relationship between the two. A forwarder may forward a resolution request to another forwarder, and a recursive resolver system may also forward a resolution request to another recursive resolver system. More generally, when there is a forwarding relationship between resolvers, it is formally described as R1→R2, at which time R2 is referred to as the upstream resolver of R1. The resolvers here may be forwarders or recursive resolver systems, such as public resolvers.
[0075] Forwarding relationship is a basic relationship that exists universally in the client domain name system infrastructure, and the client domain name infrastructure relies on the forwarding relationship between resolvers to achieve the distribution, forwarding and convergence of global Internet user domain name resolution traffic. In the process of resolver forwarding relationship measurement, resolver components are often identified, and the goal is to identify various types of resolvers in the client domain name system infrastructure and distinguish their roles in the domain name resolution process.
[0076] The application realizes a TXT record-based measurement method, and the core idea is as follows: (1) TXT type query request is used to replace A type query request in the measurement message. The TXT record is a variable length string, can support embedding customized response information in the reply message, and thus can be used to evade and identify the behavior of record tampering by the resolver; (2) the authoritative DNS server is customized and modified, so that the server automatically returns customized dynamic response information when receiving a specific query.
[0077] The TXT record-based forwarding relationship measurement method is as follows: the measurement node first sends a forwarding relationship measurement message Q1 to an IP address (such as IP1) in the IPv4 address space to be measured, and queries the TXT record of IP1.mydomain.com. If IP1 is a resolver, the measurement message query request is accepted, the domain name resolution process is triggered, and the same query request Q2 as the measurement message is sent to a preset authoritative DNS server through IP2. The authoritative DNS server automatically encapsulates dynamic information such as the indirect resolver IP address, query port and timestamp in the TXT record in the reply message, constructs a TXT reply record in the form of timestamp#IP2#src port#, and returns to the measurement node along the measurement message resolution path. In this way, the forwarding relationship data can be obtained by collecting R2 at the measurement node.
[0078] The TXT record-based forwarding relationship measurement method is as follows: the measurement node first sends a forwarding relationship measurement message Q1 to an IP address (such as IP1) in the IPv4 address space to be measured, and queries the TXT record of IP1.mydomain.com. If IP1 is a resolver, the measurement message query request is accepted, the domain name resolution process is triggered, and the same query request Q2 as the measurement message is sent to a preset authoritative DNS server through IP2. The authoritative DNS server automatically encapsulates dynamic information such as the indirect resolver IP address, query port and timestamp in the TXT record in the reply message, constructs a TXT reply record in the form of timestamp#IP2#src port#, and returns to the measurement node along the measurement message resolution path. In this way, the forwarding relationship data can be obtained by collecting R2 at the measurement node.
[0079] The TXT record-based forwarding relationship measurement method is as follows: the measurement node first sends a forwarding relationship measurement message Q1 to an IP address (such as IP1) in the IPv4 address space to be measured, and queries the TXT record of IP1.mydomain.com. If IP1 is a resolver, the measurement message query request is accepted, the domain name resolution process is triggered, and the same query request Q2 as the measurement message is sent to a preset authoritative DNS server through IP2. The authoritative DNS server automatically encapsulates dynamic information such as the indirect resolver IP address, query port and timestamp in the TXT record in the reply message, constructs a TXT reply record in the form of timestamp#IP2#src port#, and returns to the measurement node along the measurement message resolution path. In this way, the forwarding relationship data can be obtained by collecting R2 at the measurement node.
[0080] In the application, the basic idea of the public resolver anycast node enumeration based on the forwarding relationship inference is to use IPF RDNSStarget As a distributed measurement node, IPFRDNSStarget RDNSS target forwarding relationship between IP addresses of the service IP address, a large number of IPF RDNSStarget sending a forwarding relationship measurement message and receiving a response message, extracting and constructing a candidate indirect resolver set IPI c . By comparing the IP address ASO information of the indirect resolver, it is judged whether to update the indirect resolver pool set IPI target RDNSS RDNSStarget The ASO information is selected as the aggregation condition of the indirect resolver because the public resolver service providers such as Google, Cloudflare, OpenDNS and the like tend to use the global cloud infrastructure built by them to deploy the anycast nodes of the public resolver operated by them.
[0081] While updating the indirect resolver pool set IPI RDNSStarget , the forwarding set IPF RDNSStarget is updated as an observation node for the next round of forwarding relationship measurement using the forwarding relationship data of the whole network. The specific method is that all the forwarders that have a forwarding relationship with the updated indirect resolver pool IPI RDNSStarget are filtered out in the forwarding relationship data of the whole network. In the iteration process of algorithm 1, more forwarders will be associated in the forwarding relationship data of the whole network due to the addition of new indirect resolver nodes. At the same time, according to the anycast protocol semantics, multiple accesses to the same node may access different anycast nodes, so the present application adopts the strategy that all the associated full-quantity forwarders participate in the next round of forwarding relationship measurement, so as to accelerate the convergence of the algorithm.
[0082] The public resolver anycast node enumeration based on the forwarding relationship inference realizes the spiral enumeration of the public resolver anycast node by iteratively performing the steps of forwarding relationship measurement, indirect resolver aggregation and forwarder sampling. Obviously, the iterative algorithm of the present application is convergent, and the limit case is to enumerate all the anycast nodes. When the above iteration process cannot find new indirect resolvers, it can be considered that the algorithm should be stopped. Therefore, the iteration stopping condition of algorithm 1 is that the number of indirect resolvers obtained in the adjacent two rounds does not change, that is
[0083] In order to prove the effectiveness of the present application, the cost and performance of four kinds of methods based on distributed measurement platform, CNAME chain, NS chain and forwarding relationship are measured and compared. The data disclosed by Google is selected as the benchmark data.
[0084] The anycast node enumeration method based on the forwarding relationship of the present application has a recall irdnsrecall irdnsrange and recall irdnsgeocode The method significantly outperforms existing methods in all three recall metrics. The NS chain-based method achieves a significantly higher recall rate for anycast nodes. irdns It is 1.6 times faster than the CNAME chain-based method; however, its capabilities are limited by the size and distribution of the feature parser (RD=1). In comparison, the forwarding relationship-based method transforms a massive number of forwarders into measurement nodes. Its anycast node recall capability is 7.4 times that of the CNAME chain-based method and 4.6 times that of the NS chain-based method. The recall rate of adjacent airport codes for anycast nodes reaches 62.5%, which is 22.92 percentage points higher than the recall rate of the iGreedy algorithm and 1.58 times that of the iGreedy algorithm.
[0085] As can be seen, this invention utilizes a forwarder that has a forwarding relationship with the public resolver to transform it into an observation node for anycast node enumeration. This invention significantly outperforms existing methods in terms of reliance on probe resources, the scale of the actual number of available observation nodes, and multiple recall metrics. Compared to existing methods, this invention has the advantages of low implementation cost and high anycast node recall.
[0086] like Figure 3 As shown, the present invention provides a public resolver anycast node enumeration device based on forwarding relationship inference, the device comprising:
[0087] Initialization module: Configured to obtain the public resolver service IP address to be inferred, send multiple forwarding relationship query requests to the public resolver service IP address to be inferred, obtain several indirect resolvers that have forwarding relationships with the public resolver to be inferred, and store the indirect resolvers in the initial indirect resolver set;
[0088] Based on the forwarding relationship measurement data of the pre-probeed full IPv4 address space, the forwarding relationships between the forwarder and the indirect resolver are extracted. The extracted forwarding relationships form an initial forwarding relationship set, denoted as (IPF). in IPI out ); among which, IPF in For a set of repeaters, IPI out This is the set of indirect resolvers corresponding to the set of repeaters;
[0089] Based on the forwarding relationship measurement data, the initial forwarder served by the public resolver to be inferred is determined, and the initial forwarder set is composed of all the initial forwarders. The initial forwarder refers to the forwarder that has a forwarding relationship with each indirect resolver in the initial indirect resolver set in the forwarding relationship measurement data.
[0090] acquiring, in a detection manner, autonomous domain organization information of each indirect resolver in the initial indirect resolver set, to obtain an initial indirect resolver autonomous domain organization information set;
[0091] setting the first set equal to the initial indirect resolver set, the second set equal to the initial forwarder set, and the third set equal to the initial indirect resolver autonomous domain organization information set, initializing a current iteration number k as 1, and initializing a result set R of the kth iteration (k) as an empty set, and initializing R (k) as the number of indirect resolvers in the first set sum (k) as 0, and initializing a result set R of the k-1th iteration (k-1) as the first set, and initializing a result set R of the k-1th iteration (k-1) as the number of indirect resolvers sum (k-1) as the number of elements in the first set;
[0092] a first judging module configured to, if sum (k) is equal to sum (k-1) , take the first set as the anycast node set of the public resolver to be inferred; otherwise, trigger the detection module;
[0093] a detection module configured to send a real-time forwarding relationship measurement packet to each initial forwarder in the second set, and based on a forwarding relationship response packet obtained through detection, acquire a forwarding relationship between the involved forwarders and indirect resolvers in a transmission process of the real-time forwarding relationship measurement packet and the forwarding relationship response packet, and take the forwarding relationship as a candidate forwarding relationship, denoted as (IPF c ,IPI c ); wherein IPF c is a forwarder set in the candidate forwarding relationship, and IPI c is an indirect resolver set corresponding to the forwarder set;
[0094] an aggregation module configured to take an indirect resolver in the indirect resolver set as a candidate indirect resolver, and for each candidate indirect resolver, perform the following operations:
[0095] performing indirect resolver aggregation based on the initial forwarding relationship set, the candidate indirect resolver, and the result set R of the k-1th iteration (k-1) ;
[0096] The indirect resolver aggregation comprises: if the autonomous domain organization information of the candidate indirect resolver belongs to the element in the third set, merging the candidate indirect resolver into a first set, obtaining all the forwarding devices having a forwarding relationship with the candidate indirect resolver in the initial forwarding relationship set, and merging all the forwarding devices having the forwarding relationship into the second set;
[0097] The updating module is configured to take the first set as a new indirect resolver node, and add the new indirect resolver node into a result set R of the kth round of iteration (k) , and set sum (k) as the updated R (k) , set k as k+1, and trigger the first judging module.
[0098] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit the present application. Although the present application is described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions recorded in the above embodiments can be modified, or some or all of the technical features can be replaced by equivalents, and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for public resolver anycast node enumeration based on forwarding relationship inference, characterized in that, The method comprises the following steps: Step S1: obtaining a public resolver service IP address to be inferred, sending multiple forwarding relationship query requests to the public resolver service IP address to be inferred, obtaining a plurality of indirect resolvers having a forwarding relationship with the public resolver to be inferred, and storing the indirect resolvers in an initial indirect resolver set; The forwarding relationship between the extractor and the indirect resolver is extracted based on the pre-probed forwarding relationship measurement data of the whole IPv4 address space, an initial forwarding relationship set is composed of all the extracted forwarding relationships, and the initial forwarding relationship in the initial forwarding relationship set is denoted as (IPF in ,IPI out ); wherein, IPF in is a set of extractors, and IPI out is a set of indirect resolvers corresponding to the set of extractors. determining initial forwarders served by the public resolver to be inferred based on the forwarding relationship measurement data, and forming an initial forwarder set from all the initial forwarders, wherein the initial forwarder refers to a forwarder having a forwarding relationship with each indirect resolver in the initial indirect resolver set in the forwarding relationship measurement data; obtaining autonomous domain organization information of each indirect resolver in the initial indirect resolver set in a detection manner to obtain an initial indirect resolver autonomous domain organization information set; Let the first set equal the initial set of indirect resolvers, the second set equal the initial set of forwarders, the third set equal the initial set of indirect resolver authority organization information, initialize the current iteration number k to 1, initialize the result set R of the kth iteration to the empty set (k) , initialize the number of indirect resolvers in R (k) to 0, initialize the result set R of the k-1th iteration to the first set, initialize the number of indirect resolvers in R (k) to the number of elements in the first set, initialize the result set R of the k-1th iteration to the first set, initialize the number of indirect resolvers in R (k-1) to the number of elements in the first set, initialize the result set R of the k-1th iteration to the first set, initialize the number of indirect resolvers in R (k-1) to the number of elements in the first set, initialize the result set R of the k-1th iteration to the first set, initialize the number of indirect resolvers in R (k-1) to the number of elements in the first set. Step S2: if sum (k) is equal to sum (k-1) , then the first set is taken as the Anycast node set of the common resolver to be inferred, and the method ends; otherwise, step S3 is entered. Step S3: sending a real-time forwarding relationship measurement packet to each initial forwarder in the second set; based on the detected forwarding relationship response packet, obtaining the forwarding relationship between the involved forwarders and indirect resolvers in the transmission process of the real-time forwarding relationship measurement packet and the forwarding relationship response packet, taking the forwarding relationship between the involved forwarders and indirect resolvers as a candidate forwarding relationship, denoted as (IPF c ,IPI c ); wherein IPF c is a forwarder set in the candidate forwarding relationship, and IPI c is an indirect resolver set corresponding to the forwarder set; Step S4: taking indirect resolvers in the indirect resolver set as candidate indirect resolvers, and performing the following operations on each candidate indirect resolver: based on the initial set of forwarding relationships, candidate indirect resolvers, the result set R of the k-1th iteration (k-1) performing indirect resolver aggregation; The indirect resolver aggregation comprises: if the autonomous domain organization information of the candidate indirect resolver belongs to the elements in the third set, merging the candidate indirect resolver into the first set, obtaining all forwarders having a forwarding relationship with the candidate indirect resolver in the initial forwarding relationship set, and merging the all forwarders having the forwarding relationship into the second set; Step S5: add the new indirect resolver node to the result set R of the kth iteration (k) , and set sum (k) to the number of indirect resolvers in R (k) , and k to k+1, and go to step S2.
2. The method of claim 1, wherein, The public resolver is a recursive resolver system deployed by using anycast technology, comprising a unified resolver service IP address, a plurality of hidden resolvers and indirect resolvers.
3. The method of claim 1, wherein, The indirect resolver is a resolver in the public resolver directly interacting with an authoritative domain name server, actually performing a domain name recursive resolution process, and transparent to users.
4. The method of claim 1, wherein, The forwarding relationship measurement packet and the forwarding relationship response packet are both TXT type DNS packets, the forwarding relationship measurement packet comprises a destination address, and the forwarding relationship response packet comprises an indirect resolver IP address.
5. The method of claim 1, wherein, In the indirect resolver aggregation, if the autonomous domain organization information of the candidate indirect resolver does not belong to the third set, the candidate indirect resolver is discarded.
6. A public resolver anycast node enumeration apparatus based on forwarding relationship inference, comprising: The device comprises: an initialization module configured to obtain a public resolver service IP address to be inferred, send multiple forwarding relationship query requests to the public resolver service IP address to be inferred, obtain a plurality of indirect resolvers having a forwarding relationship with the public resolver to be inferred, and store the indirect resolvers in an initial indirect resolver set; The forwarding relationship between the extractor and the indirect resolver is extracted based on the pre-probed forwarding relationship measurement data of the whole IPv4 address space, an initial forwarding relationship set is composed of all the extracted forwarding relationships, and the initial forwarding relationship in the initial forwarding relationship set is denoted as (IPF in ,IPI out ); wherein, IPF in is an extractor set, and IPI out is an indirect resolver set corresponding to the extractor set. determining initial forwarders served by the public resolver to be inferred based on the forwarding relationship measurement data, and forming an initial forwarder set from all the initial forwarders, wherein the initial forwarder refers to a forwarder having a forwarding relationship with each indirect resolver in the initial indirect resolver set in the forwarding relationship measurement data; obtaining autonomous domain organization information of each indirect resolver in the initial indirect resolver set in a detection manner to obtain an initial indirect resolver autonomous domain organization information set; Let the first set be equal to the initial set of indirect resolvers, the second set be equal to the initial set of forwarders, the third set be equal to the initial set of indirect resolver authority organization information, initialize the current iteration number k to 1, initialize the result set R of the kth iteration to the empty set (k) Initialize the result set R of the kth iteration to the empty set (k) Initialize the number of indirect resolvers in R (k) to 0, initialize the result set R of the k-1th iteration to the first set (k-1) Initialize the result set R of the k-1th iteration to the first set (k-1) Initialize the number of indirect resolvers in R (k-1) to the number of elements in the first set; The first judging module is configured to: if sum (k) is equal to sum (k-1) , then taking the first set as the anycast node set of the public resolver to be inferred; otherwise, triggering the detecting module. The detection module is configured to send a real-time forwarding relationship measurement packet to each initial forwarder in the second set; based on a forwarding relationship response packet obtained through detection, obtain the real-time forwarding relationship measurement packet and a forwarder and an indirect resolver involved in a transmission process of the forwarding relationship response packet, take a forwarding relationship between the involved forwarder and the indirect resolver as a candidate forwarding relationship, and mark the candidate forwarding relationship as (IPF c ,IPI c ); wherein IPF c is a forwarder set in the candidate forwarding relationship, and IPI c is an indirect resolver set corresponding to the forwarder set. The aggregation module is configured to aggregate the indirect resolvers in the indirect resolver set as candidate indirect resolvers, and for each candidate indirect resolver, the following operations are performed: based on the initial set of forwarding relationships, candidate indirect resolvers, the result set R of the k-1th iteration (k-1) performing indirect resolver aggregation; The indirect resolver aggregation includes: if the autonomous domain organization information of the candidate indirect resolver belongs to the element in the third set, merging the candidate indirect resolver into the first set, obtaining all the forwarding devices having a forwarding relationship with the candidate indirect resolver in the initial forwarding relationship set, and merging all the forwarding devices having the forwarding relationship into the second set; an updating module configured to add the first set as a new indirect resolver node and add the new indirect resolver node into the result set R of the kth round iteration (k) , and set sum (k) as the updated R (k) , and set k as k+1, and trigger the first judging module. 7.A computer readable storage medium, the storage medium storing a plurality of instructions; the plurality of instructions are used for loading and executing the method of any one of claims 1-5 by a processor.
8. An electronic device, comprising: The electronic device comprises: a processor configured to execute a plurality of instructions; a memory configured to store the plurality of instructions; wherein the plurality of instructions are stored in the memory and executed by the processor to perform the method of any one of claims 1-5.
Citation Information
Patent Citations
Anycast recursive domain name system anycast node IP address enumeration method and system
CN111447304A
MAPPING INTERNET ROUTING WITH ANYCAST AND UTILIZING SUCH MAPS FOR DEPLOYING AND OPERATING ANYCAST POINTS OF PRESENCE (PoPs)
US20200412686A1