Domain name resolver identification method, apparatus and electronic device
By sending multiple domain name query requests to the domain name resolver and analyzing the results, the functional type of the resolver can be identified, thus solving the problem of performance and security assessment of open domain name resolvers on the Internet and improving access security.
Patent Information
- Application Number
- CN202310761161.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-26
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2043-06-26
AI Technical Summary
In existing technologies, open domain name resolvers on the Internet have performance and security issues, making it difficult to effectively identify and assess their types, resulting in insufficient security for user access.
By sending multiple domain name query requests to the target domain name resolver and analyzing whether the query results contain authorization records, it can be determined whether the domain name resolver has both forwarding query and recursive query functions, thereby identifying its type.
It enables rapid identification of domain name resolvers that combine forwarding and recursive query functions, facilitating subsequent performance and security evaluation and improving the security of internet access.
Smart Images

Figure CN116708361B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and particularly relates to a domain name resolver identification method and device and electronic equipment. BACKGROUND
[0002] Domain name resolvers play a key role in the Internet infrastructure and can convert domain names into corresponding Internet Protocol (IP) addresses. When a user accesses a website through a client, the domain name resolver is needed to convert the domain name into an IP address so as to find the correct server.
[0003] There are a large number of open domain name resolvers on the Internet, and these domain name resolvers may have security risks. In order to ensure normal use of users, the performance and security of these domain name resolvers need to be evaluated. SUMMARY
[0004] The present application provides a domain name resolver identification method, device and electronic equipment, which can determine the domain name query function of a domain name resolver, thereby identifying a domain name resolver that has both a forwarding query function and a recursive query function, and further providing convenience for evaluating the performance and security of the domain name resolver.
[0005] According to a first aspect of the present application, a domain name resolver identification method is provided. The method comprises sending a query request for a plurality of domain names to a target domain name resolver within a predefined time after querying a first domain name from the target domain name resolver, wherein the plurality of domain names comprises the first domain name and a second domain name, and the query request is used to request the target domain name resolver to query the plurality of domain names by querying a local cache. The method further comprises obtaining a query result corresponding to the query request from the target domain name resolver, wherein the query result comprises a first result corresponding to the first domain name and a second result corresponding to the second domain name; wherein the first result does not include an authorization record of the first domain name, and the second result includes an authorization record of the second domain name, and the authorization record is a resource record indicating an authoritative domain name server corresponding to the domain name. The method further comprises determining that the target domain name resolver is a domain name resolver that has both a forwarding query function and a recursive query function according to the first result and the second result.
[0006] According to a second aspect of the present application, a domain name resolver identification apparatus is provided. The apparatus comprises a sending module configured to send a query request for a plurality of domain names to a target domain name resolver within a predefined time after the target domain name resolver queries a first domain name, the plurality of domain names comprising the first domain name and a second domain name, the query request being used to request the target domain name resolver to query the plurality of domain names by querying a local cache. The apparatus further comprises a receiving module configured to obtain a query result corresponding to the query request from the target domain name resolver, the query result comprising a first result corresponding to the first domain name and a second result corresponding to the second domain name, wherein the first result does not comprise an authority record of the first domain name, and the second result comprises an authority record of the second domain name, the authority record being a resource record indicating an authoritative domain name server corresponding to the domain name. The apparatus further comprises a determining module configured to determine, according to the first result and the second result, that the target domain name resolver is a domain name resolver having both a forwarding query function and a recursive query function.
[0007] According to a third aspect of the present application, an electronic device is provided. The electronic device comprises at least one processor; and a memory coupled to the at least one processor and having stored thereon instructions that, when executed by the at least one processor, cause the device to perform actions comprising: sending a query request for a plurality of domain names to a target domain name resolver within a predefined time after the target domain name resolver queries a first domain name, wherein the plurality of domain names comprises the first domain name and a second domain name, and the query request is used to request the target domain name resolver to query the plurality of domain names by querying a local cache; obtaining a query result corresponding to the query request from the target domain name resolver, the query result comprising a first result corresponding to the first domain name and a second result corresponding to the second domain name, wherein the first result does not comprise an authority record of the first domain name, and the second result comprises an authority record of the second domain name, the authority record being a resource record indicating an authoritative domain name server corresponding to the domain name; and determining, according to the first result and the second result, that the target domain name resolver is a domain name resolver having both a forwarding query function and a recursive query function.
[0008] According to a fourth aspect of the present application, a computer readable storage medium is provided, the computer readable storage medium having stored thereon a computer program product comprising machine executable instructions that, when executed by a machine, cause the machine to perform the steps of the method of the first aspect of the present application.
[0009] According to a fifth aspect of the present application, a computer program product is provided, the computer program product being tangibly stored on a non-transitory computer readable medium and comprising machine executable instructions that, when executed by a machine, cause the machine to perform the steps of the method of the first aspect of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0010] The above and other objects, features and advantages of the present application will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings in which like reference characters refer to like parts throughout the figures, and wherein:
[0011] FIG. 1A A schematic diagram illustrating one example scenario in which apparatuses and / or methods according to embodiments of the present application can be implemented;
[0012] FIG. 1B A schematic diagram illustrating another example scenario in which apparatuses and / or methods according to embodiments of the present application can be implemented;
[0013] FIG. 2 A schematic flow chart illustrating a method for identifying a domain name resolver according to an embodiment of the present application;
[0014] FIG. 3 A schematic flow chart illustrating a method for determining a domain name query function possessed by a domain name resolver according to an embodiment of the present application;
[0015] FIG. 4 A schematic flow chart illustrating a method for identifying a domain name resolver according to an embodiment of the present application;
[0016] FIG. 5 A schematic flow chart illustrating a recursive query process according to an embodiment of the present application;
[0017] FIG. 6 A schematic flow chart illustrating a forwarding query process according to an embodiment of the present application;
[0018] FIG. 7 A schematic block diagram illustrating a device for identifying a domain name resolver according to an embodiment of the present application; and
[0019] FIG. 8 A schematic block diagram illustrating an example apparatus suitable for use in implementing embodiments of the present application.
[0020] In the drawings, like or corresponding elements are denoted by like reference numerals. DETAILED DESCRIPTION
[0021] Embodiments of the present application will be described in more detail with reference to the drawings. Although certain embodiments of the present application will be shown in the drawings, it should be understood that the present application can be embodied in various forms and should not be construed as being limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present application will be thorough and complete, and fully convey the scope of the present application to those skilled in the art.
[0022] In the description of embodiments of the present application, the term "includes" and its derivatives, such as "including", should be understood in an open-ended way, that is, "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", and the like can refer to different or the same objects. Other explicit and implicit definitions can also be included below.
[0023] On the Internet, each host usually has a unique IP address, based on which the host on the Internet can achieve access to the target host. IP address is a digital identifier, which is inconvenient to remember and write when used, therefore, IP address is symbolized as domain name for the convenience of user use. When a user accesses the Internet through a client, the user can access a specific host on the Internet by inputting a specific domain name. However, the access between hosts is carried out through IP addresses, therefore, in order to achieve access to a specific host through a domain name, the domain name needs to be resolved into the corresponding IP address by means of a domain name resolver.
[0024] The current domain name resolver can be divided into a forwarding domain name resolver and a recursive domain name resolver. The forwarding domain name resolver can query the domain name by forwarding the query. When receiving a request of a client querying the domain name, the forwarding domain name resolver can forward the query request to other pre-configured domain name servers or domain name resolvers (usually authoritative domain name servers or other recursive domain name resolvers), so as to complete the domain name resolution through other domain name resolvers or domain name servers. The recursive domain name resolver can query the domain name by recursive query. When receiving a request of a client querying the domain name, the recursive domain name resolver can start from the root server and query level by level downward until the IP address corresponding to the requested domain name is found.
[0025] As described above, domain name resolvers exist widely on the Internet, but the open domain name resolvers on the network may have performance and security problems, therefore, in order to ensure the normal use of users, the domain name resolvers need to be evaluated before use. The evaluation methods corresponding to different types of domain name resolvers are different, for example, for the forwarding domain name resolver, no authorization record is used in evaluation, and for the recursive domain name resolver, authorization record can be used in evaluation. Therefore, in order to evaluate the performance and security of the domain name resolver, the type of the domain name resolver needs to be identified first.
[0026] At least to solve the above and other potential problems, embodiments of the present application provide a method for identifying a domain name resolver. In the method, after querying a target domain name resolver for a domain name, a non-recursive query is further performed to the target domain name resolver for the same domain name, and the type of the target domain name resolver is determined based on the query result of the non-recursive query. Through the method, the identification of the domain name resolver can be quickly implemented, and by querying multiple domain names, a conditional domain name resolver having both the functions of forwarding query and recursive query can also be identified. In this way, the performance and security of the domain name resolver can be subsequently evaluated based on the type of the domain name resolver, and the security of accessing the Internet is improved.
[0027] Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0028] First, the domain name resolution scenario provided by embodiments of the present application will be described in combination with FIG. 1A and FIG. 1B The scenario shown in FIG. 1A is taken as an example for description. In the scenario, a client 101 sends a domain name query request to a domain name resolver 102, and the domain name resolver 102 queries the domain name by performing a recursive query. FIG. 1A and FIG. 1B The scenario shown in FIG. 1A is taken as an example for description. In the scenario, a client 101 sends a domain name query request to a domain name resolver 102, and the domain name resolver 102 queries the domain name by performing a recursive query.
[0029] FIG. 1A The domain name resolution scenario 100A shown in FIG. 1A includes a client 101, a conditional domain name resolver 102, a root domain name server 103, a top-level domain name server 104, and a second-level domain name server 105, wherein the conditional domain name resolver 102 queries a domain name by performing a recursive query.
[0030] In the scenario shown in FIG. 1B, the client 101 sends a domain name query request to the conditional domain name resolver 102, and the conditional domain name resolver 102 receives the query request and then queries the domain name by performing a non-recursive query. FIG. 1A In the scenario shown in FIG. 1B, the client 101 sends a domain name query request to the conditional domain name resolver 102, and the conditional domain name resolver 102 receives the query request and then queries the domain name by performing a non-recursive query.
[0031] During the process of recursive query, the domain name resolver can obtain the authoritative record of the domain name and store it in the local cache. In the embodiments of the present application, the authoritative record is a resource record indicating the authoritative domain name server for resolving a specific domain name, including NS record and GLUE record, wherein the GLUE record is the A record of the domain name server indicated by the NS record. As an example, an authoritative record of the domain name example.com can be:
[0032] example.com.NS ns1.nameserver.com
[0033] ns1.nameserver.com.A 192.0.2.1
[0034] wherein “example.com.NS ns1.nameserver.com” is the NS record, indicating that the domain name server of the domain name “example.com” is “ns1.nameserver.com”; “ns1.nameserver.com.A 192.0.2.1” is the GLUE record, indicating that the IP address corresponding to the domain name server “ns1.nameserver.com” is “192.0.2.1”. The authoritative record contains the domain name server information related to the domain name, which is used to indicate which domain name server is responsible for managing the resolution of the domain name. When the domain name query is performed, the client can send a query request to the specific domain name server according to the above information, so as to obtain the IP address or other type of record corresponding to the domain name to be queried.
[0035] For example, when the client 101 queries the conditional domain name resolver 102 for the domain name "example.com", the conditional domain name resolver 102 first queries the root domain name server 103 for the domain name "example.com". The root domain name server 103 is the highest level domain name server, which governs the top-level domain (e.g. ".com", ".net", etc.). Upon receiving the query request from the conditional domain name resolver 102, the root domain name server 103 sends a response to the conditional domain name resolver 102, which includes an authoritative record pointing to the top-level domain name server 104, indicating the address of the ".com" top-level domain name server 104. The conditional domain name resolver 102 can store the authoritative record in a local cache. Based on the response, the conditional domain name resolver 102 continues to query the ".com" top-level domain name server 104 for the domain name "example.com". The ".com" top-level domain name server 104 can manage sub-domains of the ".com" domain, such as the second-level domain "example.com", "XXXX.com", etc. The ".com" top-level domain name server 104 replies to the conditional domain name resolver 102 with an authoritative record of the second-level domain name server 105, indicating the address of the second-level domain name server 105 corresponding to "example.com" (the authoritative domain name server of "example.com"). The conditional domain name resolver 102 can also store the authoritative record in a local cache. In this way, the conditional domain name resolver 102 will query the IP address of "example.com" from the second-level domain name server corresponding to "example.com", and obtain the IP address corresponding to "example.com", completing the recursive query for the domain name "example.com". Thereafter, the conditional domain name resolver 102 replies the IP address to the user device 110. FIG. 1B The illustrated domain name resolution scenario 100B can include a client 101 and a conditional domain name resolver 102, and a domain name resolver 106 or a domain name server 107, wherein the conditional domain name resolver 102 queries the domain name by forwarding the query.
[0036] In FIG. 1B In the illustrated scenario, the client 101 sends a domain name query request to the conditional domain name resolver 102, and the conditional domain name resolver 102 receives the query request and forwards the domain name query request to the domain name resolver 106 or the domain name server 107. The domain name resolver 106 or the domain name server 107 will further query the domain name and return the query result, i.e. a record indicating the IP address corresponding to the domain name, to the conditional domain name resolver 102. In the process of forwarding the query, the domain name resolver will not obtain the authoritative record.
[0037] It should be understood that FIG. 1A and FIG. 1BThe scenarios illustrated are merely examples of this application and should not be construed as limiting the scope of this application. This application does not limit the number and type of domain name resolvers and domain name servers involved in the domain name resolution process; the domain name resolution scenario may also include more or fewer domain name servers and domain name resolvers. It is also understood that the specific domain names, IP addresses, and resource records mentioned in the embodiments of this application are exemplary and should not be used to limit the scope of protection of this application.
[0038] In the embodiments of this application, the conditional domain name resolver can have both forwarding query function and recursive query function. For example, the above scenario 1A and scenario 1B can be combined. That is, for the conditional domain name resolver 102, according to the query conditions and configuration, it can perform forwarding query on a portion of the domain names, and it can also perform recursive query on a portion of the domain names.
[0039] The above combination FIG. 1A , FIG. 1B The following describes example scenarios in which the devices and / or methods of embodiments of this application can be implemented. (The following is in conjunction with...) FIG. 2 to FIG. 6 This describes the methods provided by embodiments of this application.
[0040] FIG. 2 This is a schematic flowchart of a domain name resolver identification method provided in an embodiment of this application. FIG. 2 The method shown can be executed by a client or any suitable device, and can be implemented in software and / or hardware. For example, it can be implemented by... FIG. 1A or FIG. 1B The client 101 shown is executed. The following execution focuses on the client used to identify the domain name resolver type. FIG. 2 The method 200 shown is illustrated schematically. FIG. 2 In this method, 200 may include steps 201 to 203.
[0041] In step 201, the client sends a query request for multiple domain names to the target domain name resolver. These multiple domain names include a first domain name and a second domain name. The query request is issued within a predefined time period after the client's last query for the first domain name; that is, within the predefined time period before the client sends the query request for multiple domain names to the target domain name resolver, the client has already queried the first domain name. Specifically, the query request instructs the target domain name resolver to query the aforementioned multiple domain names by checking its local cache.
[0042] Since information related to domain name, such as IP address, authoritative domain name server address, etc., can be adjusted by human beings, changed, and thus the cache content of the domain name resolver does not match the actual information, in order to avoid the domain name resolution error caused thereby, when the time length for which the resource record exists in the local cache of the domain name resolver exceeds a certain time length, the resource record is removed from the local cache of the domain name resolver, and this time length is referred to as the time to live. The client queries the domain name within a predefined time after the last query of the domain name, and the predefined time can be the time to live of the cache content of the target domain name resolver, or other value not greater than the time to live. In this way, the situation that the resource record of the domain name cached by the target domain name resolver is removed after the last query of the first domain name can be avoided, and thus the identification of the domain name resolver can be ensured to be successfully performed.
[0043] In some embodiments, the client can determine the time to live of the cache content of the target domain name resolver through the time to live field in the data packet from the target domain name resolver.
[0044] In the embodiments of the present application, the query request of the client to the target domain name resolver for multiple domain names can be carried in one message or sent through multiple messages respectively. As an example, the client can send a domain name query request message to the target domain name resolver, and the message includes a table indicating multiple domain names, and the table can indicate the first domain name and the second domain name. As another example, the client can send multiple domain name query request messages to the target domain name resolver, and each domain name query request message can be used to query one or more domain names, and these domain name query request messages can be sent simultaneously or sequentially, and the present application does not limit this.
[0045] In some embodiments, the query request of the client to the target domain name resolver for multiple domain names can further include indication information indicating that the authorization record of the domain name needs to be obtained, for example, the NS record of the domain name can be required. Thus, the target domain name resolver can send the NS record of the domain name to the client based on the request.
[0046] In step 202, the client obtains the query result corresponding to the query request from the target domain name resolver, and the query result includes the first result corresponding to the first domain name and the second result corresponding to the second domain name. The first result does not include the authorization record of the first domain name, and the second result includes the authorization record of the second domain name, and the authorization record is the resource record indicating the authoritative domain name server corresponding to the domain name.
[0047] After the target domain name resolver receives the query request for multiple domain names from the client, the target domain name resolver completes the query for the domain names by querying the local cache, and returns the query results to the client. The target domain name resolver can send the query results of the multiple domain names to the client through one message, or send the query results to the client through multiple messages. As an example, after the target domain name resolver completes the query for the multiple domain names, the target domain name resolver can send one domain name query response message to the client, and the message indicates the query results (such as A record of the domain name and / or authorization record of the domain name) corresponding to the multiple domain names. As another example, the target domain name resolver sends one domain name query response message to the client after completing the query for one domain name, and the message indicates the query results corresponding to the one domain name.
[0048] In step 203, the client determines, according to the first result and the second result, that the target domain name resolver is a domain name resolver that has both the forwarding query function and the recursive query function. For the target domain name resolver, if the target domain name resolver queries the domain name by the forwarding query, the target domain name resolver saves the resource record (such as A record and / or AAAA record) indicating the IP address corresponding to the domain name in the local cache, but the target domain name resolver does not obtain the authorization record of the domain name. If the target domain name resolver queries the domain name by the recursive query, the target domain name resolver saves both the resource record indicating the IP address corresponding to the domain name and the authorization record (such as NS record and GLUE record) of the domain name. Therefore, in the case that the first result does not include the authorization record and the second result includes the authorization record, it can be determined that the target domain name resolver has both the forwarding query function and the recursive query function.
[0049] In some embodiments, the client can determine, based on the first result, that the last query for the first domain name by the target domain name resolver is the forwarding query. The first result corresponds to the first domain name, and the first result does not include the authorization record of the first domain name, which represents that the target domain name resolver does not store the authorization record of the first domain name in the local cache in the last query for the first domain name, that is, the last query for the first domain name is the forwarding query. Optionally, the client can also determine, based on the first result, that the target domain name resolver belongs to the forwarding domain name resolver.
[0050] In some embodiments, the client can determine, based on the second result, that the last query for the second domain name by the target domain name resolver is the recursive query. The second result corresponds to the second domain name, and the second result includes the authorization record of the second domain name, which represents that the target domain name resolver has the authorization record of the second domain name in the local cache, that is, the target domain name resolver has queried the second domain name by the recursive query. Optionally, the client can also determine, based on the second result, that the target domain name resolver belongs to the recursive domain name resolver.
[0051] Based on the above technical content, the client can accurately determine that the target domain name resolver has both the forwarding query function and the recursive query function through the query of the plurality of domain names, thereby facilitating the subsequent evaluation of the security and performance of the target domain name resolver.
[0052] In the embodiments of the present application, the query request for the domain name sent by the client to the target domain name resolver can include indication information to indicate the query mode of the target domain name resolver for the domain name. For example, the query request can include a recursive flag bit, if the value of the recursive flag bit is 1, it means that the target domain name resolver is required to query the domain name by querying other domain name servers or domain name resolvers (including recursive query and forwarding query); if the value of the recursive flag bit is 0, it means that the domain name resolver is required to query the domain name by querying the local cache, and this domain name query mode is also called non-recursive query.
[0053] In some embodiments, in the foregoing step 201, the client can include a recursive flag bit with a value of 0 in the query request for the plurality of domain names sent to the target domain name resolver, so as to request the target domain name resolver to resolve these domain names by querying the local cache.
[0054] In this way, it can be avoided that after receiving the query request of the client, the domain name resolver continues to perform forwarding query or recursive query, so as to determine whether the last query obtains the authorization record of the domain name.
[0055] In some embodiments, in the foregoing step 202, the query result for the plurality of domain names obtained by the client from the target domain name resolver includes a field for indicating the authorization record of the domain name, if the field is empty, it means that the authorization record of the domain name is not obtained. The first result does not include the authorization record of the first domain name, which can be that the field indicating the authorization record in the first result is empty. The second result includes the authorization record of the second domain name, which can be that the field indicating the authorization record in the second result is not empty, indicating the authorization record of the second domain name. It should be understood that for the query of the plurality of domain names, each domain name can correspond to an authorization record field.
[0056] In some embodiments, in step 202 described above, the authorization record of the domain name sent by the target domain name resolver to the client can be an NS record of the domain name, or it can include both an NS record and a CLUE record. Correspondingly, the authorization record obtained by the client can be an NS record, or it can include both an NS record and a CLUE record. For example, for the domain name "example.com", the authorization record obtained by the client can be "example.com.NS 192.0.2.1" or "example.com.NS ns1.nameserver.com ns1.nameserver.com.A192.0.2.1".
[0057] In some embodiments, in step 203 described above, the client may determine that the target domain name resolver is a conditional domain name resolver, which is a domain name resolver that has both forwarding query function and recursive query function.
[0058] The above content is passed through FIG. 2 This application describes a method for identifying domain name resolvers based on queries of multiple domain names, as described in its embodiments. The following section combines... FIG. 3 The present application provides a method for determining the domain name query function of a domain name resolver by querying a domain name, as provided in the embodiments of this application.
[0059] FIG. 3 The method shown can be executed by a client or any suitable device, and can be implemented in software and / or hardware. For example, it can be implemented by... FIG. 1A or FIG. 1B The client 101 shown is executed. The following execution focuses on the client used to identify the domain name resolver type. FIG. 3 The method 300 shown is illustrated schematically. FIG. 3 In this method, 300 may include steps 301 to 307.
[0060] In step 301, the client sends a domain name query request to the target domain name resolver to query the target domain name. The domain name query request sent by the client to the target domain name resolver can instruct the target domain name resolver to query the target domain name by querying other domain name servers or domain name resolvers.
[0061] In step 302, the client obtains the query result corresponding to the domain name query request from the target domain name resolver. The query result can be carried in the domain name query response message. Upon receiving the query result, the client can determine that the target domain name resolver has performed a query on the target domain name. The client can also determine the lifetime of the cached content of the target domain name resolver based on the lifetime field in the query result.
[0062] In step 303, the client sends a domain name query request to the target domain name resolver again within a predetermined time, requesting the target domain name resolver to perform a non-recursive query on the target domain name. The client sends the query request to the target domain name resolver again within the predetermined time, i.e., the time interval between the two query requests sent by the client to the target domain name resolver does not exceed the above-mentioned survival time. The client requests the target domain name resolver to perform a non-recursive query on the target domain name, i.e., requests the target domain name resolver to query the domain name by querying the local cache.
[0063] In step 304, the client obtains a query result from the target domain name resolver, which corresponds to the query request for the target domain name sent by the client. The query result includes the resource record related to the target domain name in the local cache of the target domain name resolver.
[0064] In step 305, the client determines whether the query result includes the authorization record of the target domain name. If yes, step 306 is performed; if no, step 307 is performed.
[0065] In step 306, the client determines that the target domain name resolver has a recursive query function. Optionally, the client can determine that the target domain name resolver belongs to a recursive domain name resolver.
[0066] In step 307, the client determines that the target domain name resolver has a forwarding query function. Optionally, the client can determine that the target domain name resolver belongs to a forwarding domain name resolver.
[0067] Based on the above technical solution, the client can determine the domain name query function of the target domain name resolver, such as the forwarding query function or the recursive query function, by querying the target domain name twice, so as to quickly identify whether the target domain name resolver belongs to a forwarding domain name resolver or a recursive domain name resolver, so as to evaluate the performance and security of the domain name resolver based on the type of the domain name resolver. When more than two domain names are queried by the method 300, it is also possible to identify a conditional domain name resolver, for example, when the query result of one of the domain names indicates that the target domain name resolver has a forwarding query function, and the query result of another domain name indicates that the target domain name resolver has a recursive query function, it can be determined that the target domain name resolver is a conditional domain name resolver.
[0068] It should be understood that, FIG. 3 The method 300 shown can be combined with the method 200 shown FIG. 2 The method 200 shown can be combined with the method 300 shown FIG. 2 In the method shown, the client can determine the domain name query function of the target domain name resolver by querying the target domain name twice, and then determine whether the target domain name resolver belongs to a forwarding domain name resolver or a recursive domain name resolver based on the domain name query function of the target domain name resolver. FIG. 3The method 300 shown queries each domain name among multiple domain names to the target domain name resolver, thereby determining the domain name query function of the target domain name resolver, and then identifying the conditional domain name resolver based on this.
[0069] In embodiments of this application, the domain name resolver's local cache may contain domain name zones to determine how a domain name needs to be queried. Domain name zones can exist as a list of domain names stored in the domain name resolver's local cache. A domain name zone may include one or more domain names, or it may be empty, i.e., it may not include any domain names. A domain name zone is a collection of domain names; for example, domain name zones can be divided into forwarding zones and recursive zones. A forwarding zone is a collection of domain names that need to be queried via forwarding, and a recursive zone is a collection of domain names that need to be queried via recursive querying. The domain name zones of the domain name resolver can be pre-configured or user-defined.
[0070] Upon receiving a domain name query request from a client, the DNS resolver can first determine the domain name zone to which the domain belongs, and then perform a query based on that determination. For example, a conditional DNS resolver can be configured with both a forwarding zone and a recursive zone. If the domain name in the client's query request belongs to the conditional DNS resolver's forwarding zone, the resolver can query the domain using a forwarding query; if the domain name in the client's query request belongs to the conditional DNS resolver's recursive zone, the resolver can query the domain using a recursive query.
[0071] Embodiments of this application also provide a method for identifying the domain name resolver type based on the domain name zone to which the domain name belongs. The following will combine... FIG. 4 This describes the domain name resolver identification method 400 provided in the embodiments of this application. FIG. 4 The method 400 shown can be executed by a client or any suitable device, and can be implemented in software and / or hardware. For example, it can be performed by... FIG. 1A or FIG. 1B The client 101 shown is executed. The following execution focuses on the client used to identify the domain name resolver type. FIG. 4 The method 400 shown is illustrated schematically. FIG. 4 In the domain name resolver identification method 400, steps 401 to 410 may be included.
[0072] In step 401, the client sends a domain name query request to the target domain name resolver to query multiple domain names in a domain name set. The domain name set can be pre-configured or input by a user, and the domain name set includes multiple different domain names. The client can send one domain name query request to the target domain name resolver to query multiple domain names, or can send multiple domain name query requests respectively, which is not limited in the present application.
[0073] Optionally, the domain name query request sent by the client to the target domain name resolver can instruct the target domain name resolver to query the domain names by querying other domain name servers or domain name resolvers.
[0074] In step 402, the client obtains query results corresponding to the multiple domain names from the target domain name resolver. The query results corresponding to the multiple domain names can be carried in one domain name query response message, or can be carried in multiple domain name query response messages respectively, which is not limited in the present application.
[0075] Optionally, in steps 401 and 402, for each individual domain name in the domain name set, the client can independently send a domain name query request to the target domain name resolver and obtain a query result. The domain name query requests corresponding to each domain name in the domain name set can be sent simultaneously or sequentially. Correspondingly, the client can obtain the query results corresponding to each domain name simultaneously or sequentially. This is not limited in the present application.
[0076] In step 403, the client sends a domain name query request to the target domain name resolver again within a predetermined time to request the target domain name resolver to perform non-recursive query on the multiple domain names in the domain name set. For example, the client can carry a recursion flag bit with a value of 0 in the domain name query request sent to the target domain name resolver again to request the target domain name resolver to query the domain names by querying a local cache. It should be understood that, as in the foregoing step 401, in step 403, the client can send one domain name query request to the target domain name resolver to query multiple domain names, or can send multiple domain name query requests respectively.
[0077] In step 404, the client obtains the query results from the target domain name resolver. As in the foregoing step 402, the query results corresponding to the multiple domain names can be carried in one domain name query response message, or can be carried in multiple domain name query response messages respectively.
[0078] In step 405, the client determines the domain name region to which each domain name in the domain name set belongs. The client can determine the domain name region to which a domain name belongs according to whether the query result obtained in step 404 includes an authorization record of the domain name. In one example, if the query result corresponding to a domain name includes an authorization record of the domain name, it can be determined that the domain name belongs to the recursive region of the target domain name resolver. In addition, the client can also determine that the target domain name resolver is configured with a recursive region. In another example, if the query result corresponding to a domain name does not include an authorization record of the domain name, it can be determined that the domain name belongs to the forwarding region of the target domain name resolver. In addition, the client can also determine that the target domain name resolver is configured with a forwarding region.
[0079] In step 406, the client determines whether there are domain names belonging to the forwarding region and domain names belonging to the recursive region in the domain name set. If yes, step 407 is performed; if no, step 408 is performed.
[0080] In step 407, the client determines that the target domain name resolver is a conditional domain name resolver. If there are domain names belonging to the forwarding region and domain names belonging to the recursive region in the domain name set, it means that the target domain name resolver performs forwarding query on a part of domain names and performs recursive query on a part of domain names. The target domain name resolver has both forwarding query function and recursive query function, and therefore, it can be determined that the target domain name resolver is a conditional domain name resolver.
[0081] In step 408, the client determines whether all domain names in the domain name set belong to the forwarding region. If yes, step 409 is performed; if no, step 410 is performed. If the domain name set does not satisfy the condition that there are domain names belonging to the forwarding region and domain names belonging to the recursive region, it means that all domain names in the domain name set belong to the forwarding region or belong to the recursive region. The client can determine the type of the domain name resolver based on the domain name region to which the domain names in the domain name set specifically belong.
[0082] In step 409, the client determines that the target domain name resolver belongs to the forwarding domain name resolver. If all domain names in the domain name set belong to the forwarding region, the client can determine that the target domain name resolver is configured with a forwarding region and has a forwarding query function through the query on the domain names in the domain name set, and on this basis, it can be determined that the target domain name resolver belongs to the forwarding domain name resolver, but it does not exclude the possibility that the target domain name resolver is a conditional domain name resolver.
[0083] In step 410, the client determines that the target domain name resolver belongs to a recursive domain name resolver. If all the domain names in the domain name set belong to a recursive domain, the client can determine that the target domain name resolver is configured with a recursive domain and has a recursive query function, and on this basis, only determine that the target domain name resolver belongs to a recursive domain name resolver, but also does not exclude the possibility that the target domain name resolver is a conditional domain name resolver.
[0084] The steps 406 to 410 described above are only illustrative and cannot limit the present application. In some embodiments, step 408 can be performed simultaneously with step 406. For example, in some embodiments, after performing step 405, the client can determine the type of the target domain name resolver based on the domain name regions to which all the domain names in the domain name set belong. If all the domain names belong to a forwarding region, it can be determined that the target domain name resolver belongs to a forwarding domain name resolver. If all the domain names belong to a recursive region, it can be determined that the target domain name resolver belongs to a recursive domain name resolver. If some domain names belong to a forwarding region and some domain names belong to a recursive region, it can be determined that the target domain name resolver is a conditional domain name resolver.
[0085] Based on the technical solutions described above, the client can identify the type of the domain name resolver and accurately identify the conditional domain name resolver.
[0086] The above content is combined with the following description FIG. 2 to FIG. 4 to illustrate the domain name resolver identification method provided by the embodiments of the present application. Next, the domain name query process involved in the domain name resolver identification method provided by the embodiments of the present application is further illustrated from the perspective of device interaction, taking the conditional domain name resolver as an example. FIG. 5 and FIG. 6 to illustrate the domain name resolver identification method provided by the embodiments of the present application. Next, the domain name query process involved in the domain name resolver identification method provided by the embodiments of the present application is further illustrated from the perspective of device interaction, taking the conditional domain name resolver as an example.
[0087] FIG. 5 is a schematic flowchart of the recursive query process 500, in which FIG. 5 the recursive query process 500 can be performed by the client 5001, the conditional domain name resolver 5002, the root domain name server 5003, the top-level domain name server 5004, and the second-level domain name server 5005. It should be understood that FIG. 5 the execution subjects involved in the recursive query process 500 shown in the figure are only examples of the present application and cannot limit the present application. In some embodiments, more or fewer domain name servers can be included. Referring to FIG. 5 , the recursive query process 500 can include steps 501 to 515.
[0088] In step 501, the client 5001 sends a domain name query request to the conditional domain name resolver 5002, the domain name query request being used to request the conditional domain name resolver 5002 to query a domain name, the domain name query request including information indicating the domain name.
[0089] In step 502, the conditional domain name resolver 5002 determines that the domain name belongs to the recursive region. Illustratively, the conditional domain name resolver 5002 can match the domain name indicated in the domain name query request with the domain names in the forwarding region and the domain names in the recursive region in the local cache, thereby identifying that the domain name belongs to the recursive region. The conditional domain name resolver 5002 will perform a recursive query for the domain name.
[0090] In step 503, the conditional domain name resolver 5002 sends a domain name query request to the root domain name server 5003.
[0091] In step 504, in response to the domain name query request sent by the conditional domain name resolver 5002, the root domain name server 5003 sends an authorization record of the top-level domain name server 5004 corresponding to the queried domain name to the conditional domain name resolver 5002, the authorization record indicating the IP address of the top-level domain name server 5004.
[0092] In step 505, the conditional domain name resolver 5002 stores the authorization record of the top-level domain name server 5004 in the local cache.
[0093] In step 506, the conditional domain name resolver 5002 sends a domain name query request to the top-level domain name server 5004 based on the IP address of the top-level domain name server 5004 indicated in the authorization record.
[0094] The present application does not limit the execution order of step 505 and step 506, for example, step 505 and step 506 can be executed simultaneously, or sequentially.
[0095] In step 507, in response to the domain name query request sent by the conditional domain name resolver 5002, the top-level domain name server 5004 sends an authorization record of the second-level domain name server 5005 corresponding to the queried domain name to the conditional domain name resolver 5002, the authorization record indicating the IP address of the second-level domain name server 5005.
[0096] In step 508, the conditional domain name resolver 5002 stores the authorization record of the second-level domain name server 5005 in the local cache.
[0097] In step 509, the conditional domain name resolver 5002 sends a domain name query request to the second-level domain name server 5005 based on the IP address of the second-level domain name server 5005 indicated in the authorization record.
[0098] The present application does not limit the execution order of step 508 and step 509, for example, step 508 and step 509 can be executed simultaneously, or sequentially.
[0099] In step 510, in response to the domain name query request sent by the conditional domain name resolver 5002, the domain name server 5005 sends the IP address of the queried domain name to the conditional domain name resolver 5002, which can be an IP version 4 (IPv4) address sent in the form of an A record, or an IP version 6 (IPv6) address sent in the form of an AAAA record.
[0100] In step 511, the conditional domain name resolver 5002 caches the IP address of the queried domain name in the local cache. For example, the conditional domain name resolver 5002 can cache the A record of the domain name and / or the AAAA record of the domain name.
[0101] In step 512, the conditional domain name resolver 5002 sends a domain name query response to the client 5001, which corresponds to the domain name query request sent by the client 5001 to the conditional domain name resolver 5002 in the aforementioned step 501. The domain name query response includes information indicating the IP address corresponding to the domain name, such as the A record and / or the AAAA record of the domain name.
[0102] The present application does not limit the execution order of steps 511 and 512. For example, steps 511 and 512 can be executed simultaneously or sequentially.
[0103] In step 513, the client 5001 sends a domain name query request for the same domain name to the conditional domain name resolver 5002 again, which is used to request the conditional domain name resolver 5002 to query the domain name by querying the local cache.
[0104] In step 514, in response to the domain name query request from the client 5001, the conditional domain name resolver 5002 queries the local cache and obtains the resource records of the queried domain name, such as the A record and the authorization record, from the local cache. These resource records are obtained by the conditional domain name resolver 5002 through the aforementioned steps 501 to 511.
[0105] In step 515, the conditional domain name resolver 5002 sends a domain name query response to the client 5001, which corresponds to the domain name query request sent by the client 5001 to the conditional domain name resolver 5002 in the aforementioned step 512. The response includes the authorization record of the domain name.
[0106] Based on FIG. 5The process shown, the conditional domain name resolver 5002 can obtain the authorization record of the domain name, and send the authorization record of the domain name to the client 5001, so that the client 5001 can determine that the domain name resolver has the recursive query function without knowing the type of the domain name resolver. The above content is combined with FIG. 5 The recursive query process 500 is introduced, and then the forwarding query process 600 is introduced. FIG. 6 The forwarding query process 600 is introduced.
[0107] FIG. 6 The forwarding query process 600 is a schematic flowchart, and in FIG. 6 The forwarding query process 600 can be executed by the client 6001, the conditional domain name resolver 6002 and the domain name resolver 6003.
[0108] It should be understood that FIG. 6 The execution subjects involved in the forwarding query process 600 shown are only examples of the present application and cannot be a limitation on the present application. In some embodiments, the domain name resolver 6003 can be a recursive domain name resolver, and in some embodiments, the domain name resolver 6003 can be replaced by an authoritative domain name server. Referring to FIG. 6 The forwarding query process 600 can include steps 601 to 610.
[0109] In step 601, the client 6001 sends a domain name query request to the conditional domain name resolver 6002, the domain name query request being used to request the conditional domain name resolver 6002 to query the domain name, and the domain name query request including information indicating the domain name.
[0110] In step 602, the conditional domain name resolver 6002 determines that the domain name belongs to the forwarding area. The conditional domain name resolver 6002 will perform a forwarding query on the domain name.
[0111] In step 603, the conditional domain name resolver 6002 forwards the domain name query request from the client 601 to the domain name resolver 6003.
[0112] In step 604, the domain name resolver 6003 queries the domain name based on the domain name query request forwarded by the conditional domain name resolver 6002, and obtains the IP address of the domain name. Exemplarily, the domain name resolver 6003 can be a recursive domain name resolver, and can perform a recursive query on the domain name.
[0113] In step 605, the domain name resolver 6003 sends the IP address of the domain name to the conditional domain name resolver 6002.
[0114] In step 606, the conditional domain name resolver 6002 stores the IP address of the domain name in the local cache.
[0115] In step 607, the conditional domain name resolver 6002 sends a domain name query response to the client 6001. This response corresponds to the domain name query request sent by the client 6001 to the conditional domain name resolver 6002 in step 601. The response includes information indicating the IP address of the domain name.
[0116] This application does not restrict the execution order of steps 606 and 607. For example, steps 606 and 607 can be executed simultaneously or sequentially.
[0117] In step 608, client 6001 sends a domain name query request for the same domain name to conditional domain name resolver 6002 again. This domain name query request is used to request conditional domain name resolver 6002 to query the domain name by querying the local cache.
[0118] In step 609, in response to the domain name query request from client 6001, conditional domain name resolver 6002 queries its local cache to obtain the resource record of the queried domain name. This resource record was obtained by conditional domain name resolver 6002 through the aforementioned steps 601 to 606. In steps 601 to 606, conditional domain name resolver 6002 did not obtain the domain name's authorization record; therefore, conditional domain name resolver 6002 cannot obtain the domain name's authorization record from its local cache.
[0119] In step 610, the conditional domain name resolver 6002 sends a domain name query response to the client 6001. This response corresponds to the domain name query request sent by the client 6001 to the conditional domain name resolver 6002 in step 608 above. This response does not include the domain name authorization record.
[0120] based on FIG. 6 As shown in the process, the conditional DNS resolver 6002 fails to obtain the domain's authorization record through forwarding queries, and therefore does not include the domain's authorization record in the domain query response sent to the client 6001. In this way, the client 6001 can determine that the DNS resolver has forwarding query functionality without knowing the type of DNS resolver.
[0121] FIG. 6 Client 6001 in the middle can be the same as the aforementioned FIG. 5 Client 5001 in the context refers to the same client. FIG. 6 The conditional domain name resolver 6002 in the above can also be used in conjunction with the aforementioned FIG. 5 The conditional DNS resolver 5002 in the code is the same conditional DNS resolver. Based on the domain name zone to which the client queries the conditional DNS resolver, the conditional DNS resolver will perform the corresponding query method to achieve [the desired result]. FIG. 5 process 500 or FIG. 6The process 600.
[0122] Based on the above technical solution, the client can quickly determine the domain name query function of the domain name resolver by querying the same domain name twice to the domain name resolver, and can also identify the conditional domain name resolver with the forwarding query function and the recursive query function when querying multiple different domain names. In this way, the client can identify the domain name resolver, so as to facilitate the subsequent evaluation of the performance and security of the domain name resolver.
[0123] The above describes the method provided by the embodiments of the present application. Next, the device provided by the embodiments of the present application is described in combination with FIG. 7 and FIG. 8 .
[0124] FIG. 7 FIG. 7 is a schematic block diagram of a domain name resolver identification device 700 provided by the embodiments of the present application. As shown in FIG. 7, the domain name resolver identification device 700 can include a sending module 710, a receiving module 720, and a determining module 730. FIG. 7
[0125] The sending module 710 is configured to send a query request for multiple domain names to the target domain name resolver within a predefined time after the target domain name resolver queries a first domain name, the multiple domain names including the first domain name and a second domain name, and the query request being used to request the target domain name resolver to query the multiple domain names by querying a local cache.
[0126] The receiving module 720 is configured to obtain a query result corresponding to the query request from the target domain name resolver, the query result including a first result corresponding to the first domain name and a second result corresponding to the second domain name, the first result not including an authority record of the first domain name, and the second result including an authority record of the second domain name, the authority record being a resource record indicating an authoritative domain name server corresponding to the domain name.
[0127] The determining module 730 is configured to determine, according to the first result and the second result, that the target domain name resolver is a domain name resolver with both the forwarding query function and the recursive query function.
[0128] In some embodiments, the query request sent by the sending module 710 is used to request the target domain name resolver to resolve the multiple domain names by querying the local cache.
[0129] In some embodiments, the determining module 730 further includes a second determining module configured to determine that a previous query of the target domain name resolver for the second domain name is a recursive query, wherein the recursive query includes a query of the target domain name resolver to a domain name server level by level.
[0130] Optionally, the determining module 730 further includes a third determining module, configured to determine that the second domain name belongs to a recursive region of the target domain name resolver, where the recursive region is a set of domain names that need to be queried by the target domain name resolver through a recursive query.
[0131] Optionally, the determining module 730 further includes a fourth determining module, configured to determine that the target domain name resolver belongs to a recursive domain name resolver, where the resource record obtained by the recursive domain name resolver from the domain name server in the last recursive query on the second domain name includes an authorized record of the second domain name.
[0132] In some embodiments, the determining module 730 further includes a fifth determining module, configured to determine that the last query on the first domain name by the target domain name resolver is a forwarding query.
[0133] Optionally, the determining module 730 further includes a sixth determining module, configured to determine that the first domain name belongs to a forwarding region of the target domain name resolver, where the forwarding region is a set of domain names that need to be queried by the target domain name resolver through a forwarding query.
[0134] Optionally, the determining module 730 further includes a seventh determining module, configured to determine that the target domain name resolver belongs to a forwarding domain name resolver, where the resource record obtained by the forwarding domain name resolver from the domain name server in the last forwarding query on the target domain name does not include an authorized record of the first domain name.
[0135] In some embodiments, the determining module 730 is specifically configured to determine that the target domain name resolver is a conditional domain name resolver, where the conditional domain name resolver has both a forwarding query function and a recursive query function.
[0136] In some embodiments, the foregoing authorized record includes an NS record.
[0137] In some embodiments, the sending module 710 further includes a second sending module, configured to send, to the target domain name resolver, a second query request on the plurality of domain names before the sending module 710 sends, to the target domain name resolver, the query request on the plurality of domain names, where the second query request is used to request the target domain name resolver to query the plurality of domain names from the domain name server.
[0138] It should be understood that the division of modules in the embodiments of the present application is only schematic, and in some embodiments, the apparatus 700 can further include more or fewer modules, which can be combined into larger modules or separately configured, and each module can be implemented by hardware and / or software.
[0139] FIG. 8 A schematic block diagram of an example device 800 that can be used to implement embodiments of the present application is shown. The client in the embodiments of the present application (including the apparatus 700) can be implemented by the device 800.FIG. 1A and FIG. 1B the client 101 in FIG. 5 the client 5001 in FIG. 6 the client 6001, etc.) can be implemented using the device 800. As shown in FIG. 8 the device 800 includes a central processing unit (CPU) 801, which can perform various suitable actions and processes in accordance with computer program instructions stored in a read-only memory (ROM) 802 or computer program instructions loaded from the storage unit 808 into a random access memory (RAM) 803. Various programs and data required by the device 800 for operation are also stored in the RAM 803. The CPU 801, ROM 802, and RAM 803 are connected to each other by a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0140] Various components in the device 800 are connected to the I / O interface 805, including an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a magnetic disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0141] The various processes and processes described above, such as the methods 200, 300, and 400, and the processes 500 and 600, can be performed by the processing unit 801. For example, in some embodiments, the methods 200, 300, and 400, and the processes 500 and 600 can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the CPU 801, one or more actions in the methods 200, 300, and 400, and the processes 500 and 600 described above can be performed.
[0142] The present application can be a method, apparatus, system and / or computer program product. The computer program product can include a computer readable storage medium (or media) having computer readable program instructions thereon for performing various aspects of the present application.
[0143] Computer readable storage media can be tangible storage media which can retain and store instructions for use by an instruction execution device. Computer readable storage media can be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer readable storage media include the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.
[0144] Computer readable program instructions described herein can be downloaded to respective computing / processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and / or a wireless network. The network can comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing / processing device.
[0145] Computer readable program instructions for carrying out operations of the present application can be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate array (FPGA), or programmable logic array (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present application.
[0146] Various aspects of the present application can be described in the general context of methods and apparatuses (systems) and computer program products, respectively. It is to be appreciated that the various aspects of the present application can be implemented as one or more computer programs, each of which runs in a computing system via one or more computer program instructions. The computer program instructions can be written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate array (FPGA), or programmable logic array (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present application.
[0147] These computer readable program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer readable program instructions can also be stored in a computer readable storage medium that can include non- transitory computer-readable storage media, that can direct a computer, a programmable data processing apparatus, and / or other devices to function in a particular manner, such that the computer readable storage medium having instructions for causing an apparatus to implement various aspects of the present application as specified in flowchart and / or block diagram block or blocks can be used to produce a manufacture including instructions for implementing aspects of the application.
[0148] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0149] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0150] Embodiments of the present application have been described above, and the description is intended to be illustrative, and not restrictive, of the disclosed embodiments. Many modifications and variations of the disclosed embodiments are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims and their equivalents, the disclosed embodiments can be practiced otherwise than as specifically described. The description herein is intended for purposes of illustration only and is not intended as an extensive list of exemplary combinations or sub-combinations to be incorporated with or in place of other embodiments.
Claims
1. A method for identifying a domain name resolver, characterized in that, The method comprises: sending a query request for a plurality of domain names to a target domain name resolver within a predefined time after querying the target domain name resolver for a first domain name, the plurality of domain names comprising the first domain name and a second domain name, the query request being used to request the target domain name resolver to query the plurality of domain names by querying a local cache; obtaining a query result corresponding to the query request from the target domain name resolver, the query result comprising a first result corresponding to the first domain name and a second result corresponding to the second domain name, the first result not comprising an authorization record of the first domain name, and the second result comprising an authorization record of the second domain name, the authorization record being a resource record indicating an authoritative domain name server corresponding to a domain name; determining, according to the first result and the second result, that the target domain name resolver is a domain name resolver simultaneously having a forwarding query function and a recursive query function.
2. The method of claim 1, wherein, The method further comprises: determining that a last query for the second domain name by the target domain name resolver is a recursive query, the recursive query comprising a query by the target domain name resolver to a domain name server in stages.
3. The method of claim 2, wherein, The method further comprises: determining that the second domain name belongs to a recursive area of the target domain name resolver, the recursive area being a set of domain names that need to be queried by the target domain name resolver in a recursive query manner.
4. The method of claim 2, wherein, The method further comprises: determining that the target domain name resolver belongs to a recursive domain name resolver, the resource record obtained by the recursive domain name resolver from a domain name server when last querying the second domain name recursively comprising an authorization record of the second domain name.
5. The method of claim 1, wherein, The method further comprises: determining that a last query for the first domain name by the target domain name resolver is a forwarding query.
6. The method of claim 5, wherein, The method further comprises: determining that the first domain name belongs to a forwarding area of the target domain name resolver, the forwarding area being a set of domain names that need to be queried by the target domain name resolver in a forwarding query manner.
7. The method of claim 5, wherein, The method further comprises: determining that the target domain name resolver belongs to a forwarding domain name resolver, the resource record obtained by the forwarding domain name resolver from a domain name server when last querying the target domain name in a forwarding query not comprising an authorization record of the first domain name.
8. The method of claim 1, wherein, The determination that the target domain name resolver is a domain name resolver simultaneously having a forwarding query function and a recursive query function comprises: determining that the target domain name resolver is a conditional domain name resolver, the conditional domain name resolver simultaneously having a forwarding query function and a recursive query function.
9. The method according to any one of claims 1 to 8, characterized in that, The authorization record comprises a name server (NS) record.
10. The method of claim 1, wherein, The method further comprises, before the sending of the query request for the plurality of domain names to the target domain name resolver: sending a second query request for the plurality of domain names to the target domain name resolver, the second query request being used to request the target domain name resolver to query the plurality of domain names to a domain name server.
11. A domain name resolver identification apparatus, characterized by comprising: The method comprises: The sending module is configured to send a query request for a plurality of domain names to the target domain name resolver within a predefined time after the target domain name resolver queries a first domain name, the plurality of domain names including the first domain name and a second domain name, the query request being used to request the target domain name resolver to query the plurality of domain names by querying a local cache; The receiving module is configured to obtain a query result corresponding to the query request from the target domain name resolver, the query result including a first result corresponding to the first domain name and a second result corresponding to the second domain name; the first result does not include an authorization record of the first domain name, and the second result includes an authorization record of the second domain name, the authorization record being a resource record indicating an authoritative domain name server corresponding to a domain name; The determining module is configured to determine, according to the first result and the second result, that the target domain name resolver is a domain name resolver simultaneously having a forwarding query function and a recursive query function.
12. An electronic device, comprising: comprise: at least one processor; and a memory coupled to the at least one processor and having stored thereon instructions that, when executed by the at least one processor, cause the device to perform the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, The computer readable storage medium has stored thereon a computer program product, the computer program product comprising machine executable instructions that, when executed, cause the method according to any one of claims 1 to 10 to be implemented.
14. A computer program product tangibly stored on a non-transitory computer readable medium and comprising machine executable instructions that, when executed, cause the method according to any one of claims 1 to 10 to be implemented.
Citation Information
Patent Citations
Method for detecting forwarding configuration of recursive domain name server
CN107645573A
APN-based DNS query resolution in wireless data networks
US20150188877A1