Public parser anycast node enumeration method and device based on forwarding relation inference
Through the method of forwarding relationship inference, the public parser any-cast nodes are gradually enumerated, which solves the problems of high cost and low recall in the existing technology of any-cast node enumeration, and achieves a fast and economical any-cast node enumeration effect. .
Patent Information
- Application Number
- CN202411514702.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-29
AI Technical Summary
The current problem of high cost of enumeration of anycast nodes and low recall.
Using a forwarding relationship inference method, by obtaining the public parser service IP address to be inferred, sending multiple forwarding relationship query requests to it, obtaining indirect parser collections, and iteratively aggregating based on the forwarding relationship measurement data, gradually enumerating any Play node.
The rapid enumeration of the public parser anycast node is realized, which reduces the measurement resource requirements, improves the recall rate, and significantly reduces the enumeration cost.
Smart Images

Figure CN119484476A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer network technology, and in particular, relates to a method and device for enumerating anycast nodes of a public resolver based on forwarding relationship inference. Background Art
[0002] With the rapid development of the global Internet, in order to improve the anti-attack capability of the domain name system and the resolution efficiency of domain name resolution, anycast technology has been widely used in the domain name system field. The domain name system operator provides users with a unified anycast IP address as a service address, and deploys the actual domain name resolution servers in multiple dispersed geographical locations as anycast nodes.
[0003] Anycast is a special network communication method first proposed by RFC1546, which allows users to access any of the nearest hosts or services identified by the same anycast IP address. The widespread application of anycast technology has spawned the public resolver, an emerging role in the domain name system infrastructure. The public resolver market based on anycast technology has flourished, and many well-known public resolvers have emerged.
[0004] Anycast node identification and enumeration have also become an important way to evaluate the efficiency of domain name resolution in the Anycast DNS, optimize the Anycast node deployment plan, and improve the resilience of the Anycast DNS. Most of the existing Anycast node enumeration methods rely on large-scale measurement platforms. For example, before using the RIPE Atlas distributed probe to conduct large-scale measurements, users need to earn enough points by sponsoring or sharing their own nodes. Summary of the invention
[0005] The present invention provides a method and device for enumerating anycast nodes of a public resolver based on forwarding relationship inference, which are used to solve the technical problems of high cost and low recall rate of current anycast node enumeration.
[0006] In a first aspect, a method for enumerating anycast nodes of a public resolver based on forwarding relationship inference is disclosed, the method comprising 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 number of indirect resolvers that have a forwarding relationship with the public resolver to be inferred, and storing the indirect resolvers into an initial indirect resolver set;
[0008] Based on the forwarding relationship measurement data of the entire IPv4 address space detected in advance, 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 recorded as (IPF in,IPI out );Among them, IPF in is the forwarder set, IPI out is the set of indirect resolvers corresponding to the set of forwarders;
[0009] Determine the initial forwarder served by the public resolver to be inferred based on the forwarding relationship measurement data, and form an initial forwarder set by all the initial forwarders, wherein the initial forwarder refers to a forwarder that has a forwarding relationship with each indirect resolver in the initial indirect resolver set in the forwarding relationship measurement data;
[0010] Acquire the autonomous domain organization information of each indirect resolver in the initial indirect resolver set in a detection manner to obtain the initial indirect resolver autonomous domain organization information set;
[0011] Let the first set be equal to the initial indirect resolver set, the second set be equal to the initial forwarder set, the third set be equal to the initial indirect resolver autonomous domain organization information set, initialize the current iteration number k to 1, and initialize the result set R of the kth iteration (k) Initialize R to an empty set (k) The number of indirect resolvers in sum (k) is 0, initializing the result set R of the k-1th iteration (k-1) Initialize the result set R of the k-1th iteration as the first set (k-1) The corresponding number of indirect resolvers sum (k-1) is the number of elements in the first set;
[0012] Step S2: If sum (k) Equal to sum (k-1) , then the first set is used as the anycast node set of the public resolver to be inferred, and the method ends; otherwise, proceeding to step S3;
[0013] Step S3: Send a real-time forwarding relationship measurement message to each initial forwarder in the second set; based on the forwarding relationship response message obtained by detection, obtain the forwarders and indirect resolvers involved in the transmission process of the real-time forwarding relationship measurement message and the forwarding relationship response message, and use the forwarding relationship between the forwarders and indirect resolvers involved as a candidate forwarding relationship, and the candidate forwarding relationship is recorded as (IPF c ,IPI c );Among them, IPF c is the set of forwarders in the candidate forwarding relationship, IPI c is the 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 resolver, and the result set R of the k-1th round of iteration (k-1) Perform indirect resolver aggregation;
[0016] The indirect resolver aggregation includes: if the autonomous domain organization information of the candidate indirect resolver is an element in the third set, merging the candidate indirect resolver into the first set, acquiring all forwarders having a forwarding relationship with the candidate indirect resolver in the initial forwarding relationship set, and merging all forwarders having a forwarding relationship with the candidate indirect resolver into the second set;
[0017] Step S5: Use the first set as a new indirect resolver node, and add the new indirect resolver node to the result set R of the kth iteration. (k) , sum (k) Assign the updated R (k) The number of indirect parsers in; assign k to k+1 and go to step S2.
[0018] Preferably, the public resolver is a recursive resolver system deployed using anycast technology, including a unified resolver service IP address, several hidden resolvers and indirect resolvers.
[0019] Preferably, the indirect resolver is a resolver in the public resolver that directly interacts with the authoritative domain name server, actually executes the domain name recursive resolution process, and is transparent to the user.
[0020] Preferably, the forwarding relationship measurement message and the forwarding relationship response message are both TXT type DNS messages, the forwarding relationship measurement message includes a destination address, and the forwarding relationship response message 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, the device comprising:
[0023] 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 number of indirect resolvers that have a forwarding relationship with the public resolver to be inferred, and store the indirect resolvers into an initial indirect resolver set;
[0024] Based on the forwarding relationship measurement data of the entire IPv4 address space detected in advance, 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 recorded as (IPF in ,IPI out );Among them, IPF in is the forwarder set, IPI out is the set of indirect resolvers corresponding to the set of forwarders;
[0025] Determine the initial forwarder served by the public resolver to be inferred based on the forwarding relationship measurement data, and form an initial forwarder set by all the initial forwarders, wherein the initial forwarder refers to a forwarder that has a forwarding relationship with each indirect resolver in the initial indirect resolver set in the forwarding relationship measurement data;
[0026] Acquire the autonomous domain organization information of each indirect resolver in the initial indirect resolver set in a detection manner to obtain the initial indirect resolver autonomous domain organization information set;
[0027] Let the first set be equal to the initial indirect resolver set, the second set be equal to the initial forwarder set, the third set be equal to the initial indirect resolver autonomous domain organization information set, initialize the current iteration number k to 1, and initialize the result set R of the kth iteration (k) Initialize R to an empty set (k) The number of indirect resolvers in sum (k) is 0, initializing the result set R of the k-1th iteration (k-1) Initialize the result set R of the k-1th iteration as the first set (k-1) The corresponding number of indirect resolvers sum (k-1) is the number of elements in the first set;
[0028] The first judgment module: if the sum is configured (k) Equal to sum (k-1) , then the first set is used as the anycast node set of the public resolver to be inferred; otherwise, the detection module is triggered;
[0029] The detection module is configured to send a real-time forwarding relationship measurement message to each initial forwarder in the second set; based on the forwarding relationship response message obtained by the detection, the forwarder and the indirect resolver involved in the transmission process of the real-time forwarding relationship measurement message and the forwarding relationship response message are obtained, and the forwarding relationship between the forwarder and the indirect resolver involved is used as a candidate forwarding relationship, and the candidate forwarding relationship is recorded as (IPF c ,IPI c);Among them, IPF c is the set of forwarders in the candidate forwarding relationship, IPI c is the set of indirect resolvers corresponding to the set of forwarders;
[0030] Aggregation module: configured to use the indirect resolvers in the indirect resolver set as candidate indirect resolvers, and for each candidate indirect resolver, perform the following operations:
[0031] Based on the initial forwarding relationship set, the candidate indirect resolver, and the result set R of the k-1th round of iteration (k-1) Perform indirect resolver aggregation;
[0032] The indirect resolver aggregation includes: if the autonomous domain organization information of the candidate indirect resolver is an element in the third set, merging the candidate indirect resolver into the first set, acquiring all forwarders having a forwarding relationship with the candidate indirect resolver in the initial forwarding relationship set, and merging all forwarders having a forwarding relationship with the candidate indirect resolver into the second set;
[0033] Update module: configured to use the first set as a new indirect resolver node and add the new indirect resolver node to the result set R of the kth iteration (k) , sum (k) Assign the updated R (k) The number of indirect parsers in; assign k to k+1, triggering the first judgment module.
[0034] In a third aspect, an electronic device is disclosed, the electronic device comprising:
[0035] at least one processor; and
[0036] a memory communicatively connected to the at least one processor; wherein,
[0037] The memory stores instructions that can be executed 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 described above.
[0038] In a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is disclosed, wherein the computer instructions are used to cause the computer to execute the method as described above.
[0039] The present invention has the following technical effects:
[0040] The present invention is a lightweight public resolver anycast node fast enumeration method, which utilizes the inherent forwarding relationship between publicly accessible forwarders and public resolvers to transform massive open forwarders into large-scale distributed measurement nodes. The method can be deployed and triggered on a single host to complete the measurement and enumeration of public resolver anycast nodes, greatly reducing the measurement resources required for the public resolver anycast node enumeration research and analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A flowchart of a method for enumerating anycast nodes of a public resolver based on forwarding relationship inference;
[0042] Figure 2 This is a schematic diagram of the client's domain name system infrastructure;
[0043] Figure 3 The present invention is a structural diagram of a public resolver anycast node enumeration device based on forwarding relationship inference. DETAILED DESCRIPTION
[0044] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0045] like Figure 1 As shown, the present invention provides a method for enumerating anycast nodes of a public resolver based on forwarding relationship inference, and the method 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 number of indirect resolvers that have a forwarding relationship with the public resolver to be inferred, and storing the indirect resolvers into an initial indirect resolver set;
[0047] Based on the forwarding relationship measurement data of the entire IPv4 address space detected in advance, 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 recorded as (IPF in ,IPI out );Among them, IPF in is the forwarder set, IPI out is the set of indirect resolvers corresponding to the set of forwarders;
[0048] Determine the initial forwarder served by the public resolver to be inferred based on the forwarding relationship measurement data, and form an initial forwarder set by all the initial forwarders, wherein the initial forwarder refers to a forwarder that has a forwarding relationship with each indirect resolver in the initial indirect resolver set in the forwarding relationship measurement data;
[0049] Acquire the autonomous domain organization information of each indirect resolver in the initial indirect resolver set in a detection manner to obtain the initial indirect resolver autonomous domain organization information set;
[0050] Let the first set be equal to the initial indirect resolver set, the second set be equal to the initial forwarder set, the third set be equal to the initial indirect resolver autonomous domain organization information set, initialize the current iteration number k to 1, and initialize the result set R of the kth iteration (k) Initialize R to an empty set (k) The number of indirect resolvers in sum (k) is 0, initializing the result set R of the k-1th iteration (k-1) Initialize the result set R of the k-1th iteration as the first set (k-1) The corresponding number of indirect resolvers sum (k-1) is the number of elements in the first set;
[0051] Step S2: If sum (k) Equal to sum (k-1) , then the first set is used as the anycast node set of the public resolver to be inferred, and the method ends; otherwise, proceeding to step S3;
[0052] Step S3: Send a real-time forwarding relationship measurement message to each initial forwarder in the second set; based on the forwarding relationship response message obtained by detection, obtain the forwarders and indirect resolvers involved in the transmission process of the real-time forwarding relationship measurement message and the forwarding relationship response message, and use the forwarding relationship between the forwarders and indirect resolvers involved as a candidate forwarding relationship, and the candidate forwarding relationship is recorded as (IPF c ,IPI c );Among them, IPF c is the set of forwarders in the candidate forwarding relationship, IPI c is the set of indirect resolvers corresponding to the set of forwarders;
[0053] 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:
[0054] Based on the initial forwarding relationship set, the candidate indirect resolver, and the result set R of the k-1th round of iteration (k-1) Perform indirect resolver aggregation;
[0055] The indirect resolver aggregation includes: if the autonomous domain organization information of the candidate indirect resolver is an element in the third set, merging the candidate indirect resolver into the first set, acquiring all forwarders having a forwarding relationship with the candidate indirect resolver in the initial forwarding relationship set, and merging all forwarders having a forwarding relationship with the candidate indirect resolver into the second set;
[0056] Step S5: Use the first set as a new indirect resolver node, and add the new indirect resolver node to the result set R of the kth iteration. (k) , sum (k) Assign the updated R (k) The number of indirect parsers in; assign k to k+1 and go to step S2.
[0057] The public resolver is a recursive resolver system deployed using anycast technology, including a unified resolver service IP address, several hidden resolvers and indirect resolvers.
[0058] In this embodiment, the public resolver anycast node enumeration is to give the public resolver service IP address RDNSS based on anycast deployment. target , enumerates the anycast instances and their IP addresses behind the resolver service IP address.
[0059] Furthermore, the indirect resolver is a resolver in the public resolver that directly interacts with the authoritative domain name server, actually executes the domain name recursive resolution process, and is transparent to the user.
[0060] The forwarding relationship measurement message and the forwarding relationship response message are both TXT type DNS messages, the forwarding relationship measurement message includes a destination address, and the forwarding relationship response message includes 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] like Figure 2 As shown in Figure 1, according to the service object, the Internet domain name system infrastructure can be divided into server-side domain name system infrastructure and client-side domain name system infrastructure. The server-side domain name system infrastructure mainly refers to the authoritative domain name server (ADNS), and the client-side domain name system infrastructure mainly refers to the resolver. With the rapid development of the scale of Internet services and the scale of end users, the architecture of the domain name system resolver has gradually evolved from the initial distributed single-server design to a more complex architecture with multi-layer forwarding, multi-level caching, and multi-point backup, and the resolver has differentiated into many different roles. Therefore, the client-side infrastructure of the domain name system presents a more complex structure.
[0063] Figure 2 In the figure, the arrow indicates the direction of sending the domain name resolution request. The resolvers that interact directly with the client mainly include open resolvers (OpenDNS, ODNS) and recursive resolver systems. Recursive resolver systems (RDNSS, Recursive DNSSystem) refer to complex resolver systems deployed and operated by resolver service providers or ISPs. They are generally composed of resolver service IP addresses, hidden resolvers (HDNS, Hidden Recursive DNS) and indirect resolvers (IRDNS, Indirect Recursive DNS). The resolver service IP address is an anycast IP address used to provide domain name resolution services to end users. The hidden resolver is mainly used for internal caching of the recursive resolver system and the distribution and scheduling of domain name resolution requests. The main function of the indirect resolver is to interact with the authoritative domain name server and execute the actual domain name resolution process. Open resolvers refer to resolvers that open recursive domain name resolution services to end users, mainly including forwarders (FDNS, Forwarder DNS), direct resolvers (DRDNS) and other types. From the perspective of end users, the resolver service IP address also reflects the same behavioral characteristics of open recursive services as open resolvers. To summarize, open resolvers such as forwarders, direct resolvers, and resolver service IPs accept domain name resolution requests from end users, indirect resolvers interact directly with the authoritative domain name system, and the recursive resolver system achieves 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 From the flow of domain name resolution request processing, we can see that only direct recursive resolvers and indirect recursive resolvers interact directly with the authoritative domain name server. The forwarder simply 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 follows: Given a public resolver service IP address RDNSS based on anycast deployment target , enumerates the anycast instances and their IP addresses behind the resolver service IP address. Corresponds to Figure 2 In, it is the service IP of a known recursive resolver system, and the set of indirect resolvers deployed in the resolver system is solved. Therefore, the public resolver anycast node enumeration of the present invention has the same semantics as the resolver pool discovery of a specific recursive resolver system.
[0066] The basic idea of the present invention is to utilize the inherent forwarding relationship between forwarders and public resolvers, transform massive forwarders into observation nodes for enumerating anycast nodes of public resolvers, repeatedly perform steps such as forwarding relationship measurement, indirect resolver aggregation and forwarder sampling, and iteratively enumerate anycast nodes of public resolvers.
[0067] First, based on a small amount of existing network-wide forwarding relationship measurement data (e.g., one round), a real-time detection method is used to first send the measured resolver system RDNSS target Send multiple query requests to obtain the initial indirect resolver set IPI 0 ={ipi 1 ,ipi i ,…,ipi n Then, according to IPI 0 In the existing forwarding relationship measurement data (IPF in ,IPI out ) Filter out the resolver system RDNSS to be tested target Initial forwarder set IPF served 0 ={ipf 1 ,ipf i ,…,ipf m}.make Next, we iteratively update and Specifically, the forwarder group Send forwarding relationship query requests. Since the forwarding relationship set by the forwarder is endogenous and deterministic, it will not change frequently in a short period of time. Therefore, it can be inferred that these query requests will reach the resolver system RDNSS under test after one or more forwardings. target , and then distributed to an indirect resolver to complete the final domain name resolution process. Considering that the forwarder may have multiple upstream resolver systems, an indirect resolver extension strategy is introduced, that is, the Autonomous System Organization (ASO) information is used to filter the RDNSS of the different resolver systems to be tested. target The indirect resolver enters the indirect resolver collection If the candidate indirect resolver ipi in the subsequent search c ASO information and current If the ASO information in is consistent, the candidate indirect resolver ipi c Add to Then, based on the real-time detected forwarding relationship data and the existing forwarding relationship data, update The above process is performed iteratively until A stable state is reached, 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 the 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 the initial set: IPI 0 ={ipi 1 ,…ipi i ,…,ipi n}, IPF 0 ={ipf 1 ,ipfi,…,ipf m}, ASO IPI ←get_aso(IPI 0 ).
[0071] 2) Loop
[0072] 3) To Send forwarding relationship measurement messages, collect forwarding relationship measurement data, and generate candidate forwarding relationships (IPF c ,IPI c );
[0073]
[0074] In the present invention, forwarding refers to the phenomenon that a user domain name resolution request flows through multiple resolvers before reaching the 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 R 1 →R 2 , at this time, it is called R 2 For R 1 The upstream resolver of the . This resolver may be a forwarder or a recursive resolver system such as the public resolver.
[0075] Forwarding relationships are the basic relationships that exist universally in the client-side domain name system infrastructure. The client-side domain name infrastructure relies on the forwarding relationships between resolvers to achieve the distribution, forwarding, and aggregation of domain name resolution traffic for global Internet users. The process of measuring resolver forwarding relationships is often accompanied by the identification of resolver components. Its goal is to identify the various types of resolvers in the client-side domain name system infrastructure and distinguish the roles they play in the domain name resolution process.
[0076] The present invention designs and implements a measurement method based on TXT records, the core idea of which is: (1) using TXT type query requests instead of A type query requests in the measurement message. TXT records are variable length strings that can support embedding customized response information in the reply message, and thus can be used to circumvent and identify the behavior of the resolver tampering with the record; (2) customizing and modifying the authoritative DNS server so that it automatically returns customized dynamic response information when receiving a specific query.
[0077] The forwarding relationship measurement method based on TXT records is as follows: the measurement node first sends a forwarding relationship measurement message Q1 to the IP address to be measured in the IPv4 address space (such as IP1) to query the TXT record of IP1.mydomain.com. If IP1 is a resolver, it accepts the query request of the measurement message, triggers the domain name resolution process, and sends the same query request Q2 as the measurement message to the 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 response message, constructs a TXT response record in the form of timestamp#IP2#src port#, and returns it to the measurement node along the measurement message resolution path. In this way, the forwarding relationship data can be obtained by only collecting R2 on the measurement node.
[0078] (1) Customize the authoritative DNS server so that it automatically returns customized dynamic response information when receiving a specific query.
[0079] The forwarding relationship measurement method based on TXT records is as follows: the measurement node first sends a forwarding relationship measurement message Q1 to the IP address to be measured in the IPv4 address space (such as IP1) to query the TXT record of IP1.mydomain.com. If IP1 is a resolver, it accepts the query request of the measurement message, triggers the domain name resolution process, and sends the same query request Q2 as the measurement message to the 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 response message, constructs a TXT response record in the form of timestamp#IP2#src port#, and returns it to the measurement node along the measurement message resolution path. In this way, the forwarding relationship data can be obtained by only collecting R2 on the measurement node.
[0080] In the present invention, the basic idea of public resolver anycast node enumeration based on forwarding relationship inference is to convert IP RDNSStarget As a distributed measurement node, using IPF RDNSStarget With the public resolver RDNSS under test target The forwarding relationship between service IP addresses can be used to forward data to a large number of IP addresses on a single measurement initiation node. RDNSStarget Send forwarding relationship measurement messages and receive response messages, extract and build candidate indirect resolver set IPI c By comparing the IP address ASO information of the indirect resolver, determine whether to update the public resolver RDNSS to be tested target Indirect resolver pool collection IPI RDNSStarget The ASO information is selected as the indirect resolver aggregation condition because public resolver service providers such as Google, Cloudflare, and OpenDNS tend to use the global cloud infrastructure they have built to deploy anycast nodes of the public resolvers they operate.
[0081] Update indirect resolver pool collection IPI RDNSStarget At the same time, the forwarding relationship data of the entire network is used to update the forwarder set IPF RDNSStarget , as an observation node for the next round of forwarding relationship measurement. The specific approach is: in the forwarding relationship data of the entire network, all the IPIs related to the updated indirect resolver pool RDNSStarget The forwarders with forwarding relationships are screened out. During the iteration of Algorithm 1, due to the addition of new indirect resolver nodes, more forwarders will be associated in the forwarding relationship data of the entire network. At the same time, according to the semantics of the anycast protocol, multiple visits to the same node may access different anycast nodes. Therefore, the present invention adopts a strategy of involving all the associated forwarders in the next round of forwarding relationship measurement to accelerate the convergence of the algorithm.
[0082] The public resolver anycast node enumeration based on forwarding relationship inference implements the spiral enumeration of public resolver anycast nodes by iteratively executing the steps of forwarding relationship measurement, indirect resolver aggregation and forwarder sampling. Obviously, the iterative algorithm of the present invention is convergent, and the limit case is that all anycast nodes are enumerated. When the above iterative process cannot find a new indirect resolver, it can be considered that the algorithm should stop. Therefore, the iterative stopping condition of Algorithm 1 is that the number of indirect resolvers obtained in two adjacent rounds has not changed, that is,
[0083] In order to prove the effectiveness of the present invention, the present invention measures and compares the cost and performance of four methods based on distributed measurement platform, CNAME chain, NS chain and forwarding relationship. The data disclosed by Google is selected as the benchmark data.
[0084] The present invention is based on the forwarding relationship of anycast node enumeration method in recall irdns 、recall irdnsrange and recall irdnsgeocode The three recall rate metrics are significantly higher than those of the existing methods. irdns It is 1.6 times that of the method based on CNAME chain, but its capacity is limited by the scale and distribution of feature resolvers (RD=1). In comparison, the method based on forwarding relationship converts massive forwarders into measurement nodes, and its anycast node recall capacity is 7.4 times that of the method based on CNAME chain and 4.6 times that of the method based on NS chain. The recall rate of adjacent airport codes of anycast nodes reaches 62.5%, which is 22.92 percentage points higher than the recall rate of iGreedy algorithm and 1.58 times that of iGreedy algorithm.
[0085] It can be seen that the present invention uses the forwarder that has a forwarding relationship with the public resolver to transform it into an observation node for anycast node enumeration. The present invention is significantly superior to the existing methods in terms of reliance on detection resources, the actual number of available observation nodes obtained, and multiple recall rate indicators. Compared with the existing methods, the present invention has the advantages of low implementation cost and high recall rate of anycast nodes.
[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 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 number of indirect resolvers that have a forwarding relationship with the public resolver to be inferred, and store the indirect resolvers into an initial indirect resolver set;
[0088] Based on the forwarding relationship measurement data of the entire IPv4 address space detected in advance, 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 recorded as (IPF in ,IPI out );Among them, IPF in is the forwarder set, IPI out is the set of indirect resolvers corresponding to the set of forwarders;
[0089] Determine the initial forwarder served by the public resolver to be inferred based on the forwarding relationship measurement data, and form an initial forwarder set by all the initial forwarders, wherein the initial forwarder refers to a forwarder that has a forwarding relationship with each indirect resolver in the initial indirect resolver set in the forwarding relationship measurement data;
[0090] Acquire the autonomous domain organization information of each indirect resolver in the initial indirect resolver set in a detection manner to obtain the initial indirect resolver autonomous domain organization information set;
[0091] Let the first set be equal to the initial indirect resolver set, the second set be equal to the initial forwarder set, the third set be equal to the initial indirect resolver autonomous domain organization information set, initialize the current iteration number k to 1, and initialize the result set R of the kth iteration (k) Initialize R to an empty set (k) The number of indirect resolvers in sum (k) is 0, initializing the result set R of the k-1th iteration (k-1) Initialize the result set R of the k-1th iteration as the first set (k-1) The corresponding number of indirect resolvers sum (k-1) is the number of elements in the first set;
[0092] The first judgment module: if the sum is configured (k) Equal to sum (k-1) , then the first set is used as the anycast node set of the public resolver to be inferred; otherwise, the detection module is triggered;
[0093] The detection module is configured to send a real-time forwarding relationship measurement message to each initial forwarder in the second set; based on the forwarding relationship response message obtained by the detection, the forwarder and the indirect resolver involved in the transmission process of the real-time forwarding relationship measurement message and the forwarding relationship response message are obtained, and the forwarding relationship between the forwarder and the indirect resolver involved is used as a candidate forwarding relationship, and the candidate forwarding relationship is recorded as (IPF c ,IPI c );Among them, IPF c is the set of forwarders in the candidate forwarding relationship, IPI c is the set of indirect resolvers corresponding to the set of forwarders;
[0094] Aggregation module: configured to use the indirect resolvers in the indirect resolver set as candidate indirect resolvers, and for each candidate indirect resolver, perform the following operations:
[0095] Based on the initial forwarding relationship set, the candidate indirect resolver, and the result set R of the k-1th round of iteration (k-1) Perform indirect resolver aggregation;
[0096] The indirect resolver aggregation includes: if the autonomous domain organization information of the candidate indirect resolver is an element in the third set, merging the candidate indirect resolver into the first set, acquiring all forwarders having a forwarding relationship with the candidate indirect resolver in the initial forwarding relationship set, and merging all forwarders having a forwarding relationship with the candidate indirect resolver into the second set;
[0097] Update module: configured to use the first set as a new indirect resolver node and add the new indirect resolver node to the result set R of the kth iteration (k) , sum (k) Assign the updated R (k) The number of indirect parsers in; assign k to k+1, triggering the first judgment module.
[0098] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the above embodiments, it should be understood by those skilled in the art that the technical solutions described in the above embodiments can still be modified, or some or all of the technical features therein 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 invention.
Claims
1. A method for enumerating anycast nodes of a public resolver 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 number of indirect resolvers that have a forwarding relationship with the public resolver to be inferred, and storing the indirect resolvers into an initial indirect resolver set; Based on the forwarding relationship measurement data of the entire IPv4 address space detected in advance, 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 recorded as (IPF in ,IPI out );Among them, IPF in is the forwarder set, IPI out is the set of indirect resolvers corresponding to the set of forwarders; Determine the initial forwarder served by the public resolver to be inferred based on the forwarding relationship measurement data, and form an initial forwarder set by all the initial forwarders, wherein the initial forwarder refers to a forwarder that has a forwarding relationship with each indirect resolver in the initial indirect resolver set in the forwarding relationship measurement data; Acquire the autonomous domain organization information of each indirect resolver in the initial indirect resolver set in a detection manner to obtain the initial indirect resolver autonomous domain organization information set; Let the first set be equal to the initial indirect resolver set, the second set be equal to the initial forwarder set, the third set be equal to the initial indirect resolver autonomous domain organization information set, initialize the current iteration number k to 1, and initialize the result set R of the kth iteration (k) Initialize R to an empty set (k) The number of indirect resolvers in sum (k) is 0, initializing the result set R of the k-1th iteration (k-1) Initialize the result set R of the k-1th iteration as the first set (k-1) The corresponding number of indirect resolvers sum (k-1) is the number of elements in the first set; Step S2: If sum (k) Equal to sum (k-1) , then the first set is used as the anycast node set of the public resolver to be inferred, and the method ends; otherwise, proceeding to step S3; Step S3: Send a real-time forwarding relationship measurement message to each initial forwarder in the second set; based on the forwarding relationship response message obtained by detection, obtain the forwarders and indirect resolvers involved in the transmission process of the real-time forwarding relationship measurement message and the forwarding relationship response message, and use the forwarding relationship between the forwarders and indirect resolvers involved as a candidate forwarding relationship, and the candidate forwarding relationship is recorded as (IPF c ,IPI c );Among them, IPF c is the set of forwarders in the candidate forwarding relationship, IPI c is the set of indirect resolvers corresponding to the set of forwarders; 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: Based on the initial forwarding relationship set, the candidate indirect resolver, and the result set R of the k-1th round of iteration (k-1) Perform indirect resolver aggregation; The indirect resolver aggregation includes: if the autonomous domain organization information of the candidate indirect resolver is an element in the third set, merging the candidate indirect resolver into the first set, acquiring all forwarders having a forwarding relationship with the candidate indirect resolver in the initial forwarding relationship set, and merging all forwarders having a forwarding relationship with the candidate indirect resolver into the second set; Step S5: Use the first set as a new indirect resolver node, and add the new indirect resolver node to the result set R of the kth iteration. (k) , sum (k) Assign the updated R (k) The number of indirect parsers in; assign k to k+1 and go to step S2.
2. The method according to claim 1, characterized in that The public resolver is a recursive resolver system deployed using anycast technology, including a unified resolver service IP address, several hidden resolvers and indirect resolvers.
3. The method according to claim 1, characterized in that The indirect resolver is a resolver in the public resolver that directly interacts with the authoritative domain name server, actually executes the domain name recursive resolution process, and is transparent to the user.
4. The method according to claim 1, characterized in that The forwarding relationship measurement message and the forwarding relationship response message are both TXT type DNS messages, the forwarding relationship measurement message includes a destination address, and the forwarding relationship response message includes an indirect resolver IP address.
5. The method according to claim 1, characterized in that 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 device based on forwarding relationship inference, characterized in that: The device comprises: 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 number of indirect resolvers that have a forwarding relationship with the public resolver to be inferred, and store the indirect resolvers into an initial indirect resolver set; Based on the forwarding relationship measurement data of the entire IPv4 address space detected in advance, 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 recorded as (IPF in ,IPI out );Among them, IPF in is the forwarder set, IPI out is the set of indirect resolvers corresponding to the set of forwarders; Determine the initial forwarder served by the public resolver to be inferred based on the forwarding relationship measurement data, and form an initial forwarder set by all the initial forwarders, wherein the initial forwarder refers to a forwarder that has a forwarding relationship with each indirect resolver in the initial indirect resolver set in the forwarding relationship measurement data; Acquire the autonomous domain organization information of each indirect resolver in the initial indirect resolver set in a detection manner to obtain the initial indirect resolver autonomous domain organization information set; Let the first set be equal to the initial indirect resolver set, the second set be equal to the initial forwarder set, the third set be equal to the initial indirect resolver autonomous domain organization information set, initialize the current iteration number k to 1, and initialize the result set R of the kth iteration (k) Initialize R to an empty set (k) The number of indirect resolvers in sum (k) is 0, initializing the result set R of the k-1th iteration (k-1) Initialize the result set R of the k-1th iteration as the first set (k-1) The corresponding number of indirect resolvers sum (k-1) is the number of elements in the first set; The first judgment module: if the sum is configured (k) Equal to sum (k-1) , then the first set is used as the anycast node set of the public resolver to be inferred; otherwise, the detection module is triggered; The detection module is configured to send a real-time forwarding relationship measurement message to each initial forwarder in the second set; based on the forwarding relationship response message obtained by the detection, the forwarder and the indirect resolver involved in the transmission process of the real-time forwarding relationship measurement message and the forwarding relationship response message are obtained, and the forwarding relationship between the forwarder and the indirect resolver involved is used as a candidate forwarding relationship, and the candidate forwarding relationship is recorded as (IPF c ,IPI c );Among them, IPF c is the set of forwarders in the candidate forwarding relationship, IPI c is the set of indirect resolvers corresponding to the set of forwarders; Aggregation module: configured to use the indirect resolvers in the indirect resolver set as candidate indirect resolvers, and for each candidate indirect resolver, perform the following operations: Based on the initial forwarding relationship set, the candidate indirect resolver, and the result set R of the k-1th round of iteration (k-1) Perform indirect resolver aggregation; The indirect resolver aggregation includes: if the autonomous domain organization information of the candidate indirect resolver is an element in the third set, merging the candidate indirect resolver into the first set, acquiring all forwarders having a forwarding relationship with the candidate indirect resolver in the initial forwarding relationship set, and merging all forwarders having a forwarding relationship with the candidate indirect resolver into the second set; Update module: configured to use the first set as a new indirect resolver node and add the new indirect resolver node to the result set R of the kth iteration (k) , sum (k) Assign the updated R (k) The number of indirect parsers in; assign k to k+1, triggering the first judgment module.
7. A computer-readable storage medium, wherein a plurality of instructions are stored in the storage medium; the plurality of instructions are used for a processor to load and execute the method as claimed in any one of claims 1 to 5.
8. An electronic device, characterized in that: The electronic device comprises: A processor, which is used to execute multiple instructions; A memory for storing a plurality of instructions; The plurality of instructions are used to be stored in the memory and loaded and executed by the processor according to any one of claims 1 to 5.
Citation Information
Patent Citations
Traffic delivery using anycast and end user-based mapping in an overlay network
CN107431727A
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