Public DNS query response method based on dial testing system and server
By using the dial-test system in the public DNS service to filter monitoring nodes of the same region and the same network for DNS query, the DNS resolution delay problem caused by the user and the public DNS service node are not in the same region and the same network, and efficient DNS query and high-quality user experience are achieved.
Patent Information
- Application Number
- CN202411684887.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-02-25
AI Technical Summary
In public DNS services, since the user and the public DNS service node are not in the same region and the same network, intelligent DNS cannot return the optimal resolution results, resulting in high latency and poor experience for users to access Internet services.
The public DNS query response method based on the dial-test system is adopted to determine whether the authoritative DNS supports the EDNS-Client-Subnet (ECS) function. If supported, the client IP address will be carried to conduct authoritative query; if not, the dial-test system will be used to filter out monitoring nodes of the same region and the same network for DNS query.
Without changing the existing public DNS deployment architecture, the optimal DNS resolution results can be returned, improving user access experience and improving DNS query efficiency.
Smart Images

Figure CN119520475A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security technology, and in particular to a public DNS query response method and server. Background Art
[0002] In a complex Internet environment, network delays between different operators in different regions are very large. In order to provide customers with a better access experience, Internet service providers usually deploy service nodes in operators around the world to solve this problem. In order to dispatch user traffic to the service node of the same operator in the same region as the user, smart DNS is needed.
[0003] Smart DNS, also known as GeoDNS, is a technology that provides personalized responses based on the user's geographic location. It allows the DNS server to return different responses based on the request source IP address, thereby achieving traffic scheduling and optimizing user experience. The user's client obtains the IP address corresponding to the domain name through the local DNS provided by the ISP, so the request source IP used by smart DNS to determine is the IP address of the local DNS. Since the local DNS and the user are in the same network, it will not affect the accuracy of scheduling.
[0004] With the rapid development of the Internet, local DNS provided by ISPs is more vulnerable to security risks such as attacks and hijacking, making more people choose public DNS instead of local DNS. In order to ensure high availability and fast response of services worldwide, public DNS will deploy multiple DNS service nodes in a cluster around the world and use Anycast and BGP technologies to optimize network access. Usually, users are provided with one or more Anycast IPs as service addresses.
[0005] When users use public DNS services, since they are not necessarily in the same region or network as the users, smart DNS will not be able to return the best results for users, resulting in high latency and poor experience for users to access Internet services. For this reason, Google DNS proposed RFC7871 to solve this problem through EDNS-Client-Subnet. Since RFC7871 was proposed relatively late, many smart DNS still do not support it, which still causes users to be unable to obtain correct results when accessing some services. Summary of the invention
[0006] The present application provides a public DNS query response method and server based on a dial-up system, which can return the best resolution result without changing the existing deployment architecture of the public DNS, when the user and the public DNS service node used are in different networks, and when the smart DNS does not support EDNS-Client-Subnet, thereby effectively ensuring the user experience.
[0007] In a first aspect, a public DNS query response method based on a dial-up system is applied to a public DNS server, the method comprising:
[0008] Receive the target domain name DNS query request sent by the client;
[0009] Perform recursive query to obtain the authoritative server address of the target domain name to be queried;
[0010] Determine whether the authoritative server supports the ECS function;
[0011] If supported, the client's IP address is carried out for authoritative query, and the DNS resolution result matching the client's IP address is obtained. Then, the subsequent processing flow is performed and the DNS query result is finally returned to the client.
[0012] If it is not supported, the dial-up system is used to perform a DNS query, the DNS query result returned by the dial-up system is obtained, and finally the query result is returned to the client.
[0013] Preferably, after receiving the target domain name DNS query request sent by the client, it is first determined whether the target domain name to be queried exists in the DNS server cache; if so, the cache result is directly returned; if the target domain name to be queried does not exist in the DNS server cache, the recursive query is performed again.
[0014] Furthermore, the use of the dialing system to perform a DNS query and obtain the DNS query result returned by the dialing system specifically includes: first, converting the DNS query request into a format that meets the API requirements of the dialing system, and then screening out monitoring nodes in the same region and the same network from the connected dialing system based on the IP address of the client, and having them perform a DNS query; then, converting the DNS query result returned by the dialing system into a standard DNS response packet, performing subsequent processing steps, and finally returning the query result to the client.
[0015] In a second aspect, a public DNS server includes:
[0016] The DNS module is responsible for responding to the target domain name DNS query request sent by the client, performing recursive query, obtaining the authoritative server address of the target domain name to be queried, and finally returning the DNS query result to the client; in the process, the ECS identification module is called, and logical judgment is set, and the dialing module is called as appropriate; wherein, if the authoritative server supports the ECS function, the authoritative query is carried out with the IP address of the client, and the DNS resolution result matching the IP address of the client is obtained, and then the subsequent processing flow is performed, and the DNS query result is finally returned to the client; if it is not supported, the dialing system is used to perform DNS query, obtain the DNS query result returned by the dialing system, and finally return the query result to the client;
[0017] The ECS identification module is responsible for determining whether the authoritative server supports the ECS function;
[0018] The dialing test module is responsible for connecting to different dialing test systems, and classifying and dividing the monitoring nodes of the dialing test system according to the region and operator in the way of intelligent DNS, and performing DNS query by matching the corresponding monitoring node according to the IP address of the client; when the authoritative server does not support the ECS function, the dialing test module is used to screen out the monitoring nodes in the same region and the same network from the connected dialing test system according to the IP address of the client, and perform DNS query on them, and then convert the DNS query result returned by the dialing test system into a standard DNS response packet and hand it over to the DNS module for subsequent processing.
[0019] Preferably, after receiving the target domain name DNS query request sent by the client, the DNS module first determines whether the target domain name to be queried exists in the DNS server cache; if so, the cache result is directly returned; if the target domain name to be queried does not exist in the DNS server cache, the recursive query is performed again.
[0020] In a third aspect, a computer device comprises a memory, a processor and a computer program stored in the memory, wherein the device is characterized in that the processor executes the computer program to implement the steps of the above method.
[0021] In a fourth aspect, a computer program product includes a computer program / instruction, which is special in that the computer program / instruction implements the steps of the above method when executed by a processor.
[0022] Compared with the prior art, this application has at least the following beneficial effects:
[0023] This application determines whether the authoritative DNS of the queried domain name supports ECS, so there is no need to forward all requests to the dial-up test system; and by querying the IP address of the client, when ECS is not supported, the dial-up test module quickly matches the monitoring node in the same region and network (screens out the monitoring nodes in the same region and network from the docked dial-up test system, and only uses them to perform DNS queries), avoiding queries of unnecessary monitoring nodes, thereby improving DNS query efficiency. When users access services that support intelligent DNS scheduling through public DNS in different regions and networks, they can still obtain services from the best service nodes; public DNS can still provide users with accurate DNS query results without changing the existing deployment architecture, adding deployment nodes, and the target authoritative DNS does not support ECS. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A flowchart of a public DNS query response method based on a dial-test system provided in one embodiment of the present application;
[0025] Figure 2 A block diagram of the module architecture of a public DNS server provided for one embodiment of the present application. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0027] For the convenience of subsequent description, some terms used are defined below:
[0028] ECS: The abbreviation of EDNS-Client-Subnet, which refers to the function described in RFC7871. It allows recursive services to carry the client's network address for DNS queries, and smart DNS matches the results based on the carried client address.
[0029] ECS identification module: responsible for determining whether the authoritative DNS queried supports the ECS function.
[0030] Dial-up test system: A system platform that monitors and evaluates network performance, service availability, and user experience by simulating real user behavior through monitoring nodes distributed in different regions and different operators. Different dial-up test systems have different numbers of monitoring nodes, supported protocols, access APIs, and returned results.
[0031] Dial test module: responsible for connecting different dial test systems, and classifying the monitoring nodes of the dial test system according to the intelligent DNS method based on the region, operator and other information. Then, different dial test nodes are matched according to the client IP address requested by the DNS, which improves accuracy and avoids unnecessary queries.
[0032] The present application discloses a public DNS query response method based on a dial-up system, which is applied to a public DNS server. The following logic is mainly added to the existing DNS query logic: determining whether the authoritative DNS of the queried domain name supports ECS, and using the dial-up system only when ECS is not supported, and starting the dial-up module to filter out monitoring nodes in the same region and network as the client to execute the query.
[0033] The public DNS query response method mainly includes the following steps:
[0034] The client sends a DNS query request to the public DNS server;
[0035] The public DNS server performs a recursive query to obtain the authoritative server address of the target domain name to be queried;
[0036] The public DNS server determines whether the authoritative server supports the ECS function;
[0037] If supported, the client's IP address is carried out for authoritative query, and the DNS resolution result matching the client's IP address is obtained. Then, the subsequent processing flow is performed and the DNS query result is finally returned to the client.
[0038] If it is not supported, the dial-up system is used to perform a DNS query, the DNS query result returned by the dial-up system is obtained, and finally the query result is returned to the client.
[0039] like Figure 1 As shown, in one embodiment, the specific implementation logic of a public DNS query response method based on a dial-test system is as follows:
[0040] 1. The client sends a DNS query request for the domain name "www.zdns.cn" to the public DNS server.
[0041] 2. The DNS server receives the client's request and determines whether the queried domain name "www.zdns.cn" exists in the DNS server cache; if it does, it directly returns the cache result;
[0042] 3. If the cache is not hit, a normal recursive query is first performed to obtain the authoritative service address of the domain name "www.zdns.cn". Then the ECS identification module determines whether the authoritative server of the domain name "www.zdns.cn" supports ECS.
[0043] 4. If the authoritative server of the domain name "www.zdns.cn" supports ECS, it carries out an authoritative query with the client's network address, obtains an accurate result that matches it, and then continues to execute the subsequent processing flow of the DNS module (including adding the DNS query result to the cache, etc.).
[0044] 5. If the authoritative server of the domain name "www.zdns.cn" does not support ECS, the DNS query request is forwarded to the dial test module for processing.
[0045] 6. After receiving the DNS query request, the dial test module first converts the DNS request into a format that meets the API requirements of the dial test system; then, based on the IP address of the client, it selects the monitoring nodes in the same region and network from the connected dial test system, and uses them to perform DNS queries; finally, the DNS query result returned by the dial test system is converted into a standard DNS response packet and handed over to the DNS module for subsequent processing (including adding the DNS query result to the cache, etc.).
[0046] The above embodiments do not need to forward all requests to the dial-up test system by judging whether the authoritative DNS of the queried domain name supports ECS; by querying the IP address of the client, when ECS is not supported, the dial-up test module can quickly match the monitoring node in the same region and the same network, avoiding the query of unnecessary monitoring nodes, thereby improving the efficiency of DNS query. When users access services that support intelligent DNS scheduling through public DNS in different regions and networks, they can still obtain services from the best service nodes; public DNS can still provide users with accurate DNS query results without changing the existing deployment architecture, adding deployment nodes, and the target authoritative DNS does not support ECS.
[0047] In one embodiment, Figure 2 As shown, a module architecture of a public DNS server is also provided, including:
[0048] The DNS module is responsible for responding to the target domain name DNS query request sent by the client, performing recursive query, obtaining the authoritative server address of the target domain name to be queried, and finally returning the DNS query result to the client; in the process, the ECS identification module is called, and logical judgment is set, and the dial test module is called as appropriate; among them, if the authoritative server supports the ECS function, it carries the client's IP address to perform an authoritative query, obtains the DNS resolution result that matches the client's IP address, and then performs subsequent processing, and finally returns the DNS query result to the client; if it does not support it, the dial test system is used to perform a DNS query, obtains the DNS query result returned by the dial test system, and finally returns the query result to the client;
[0049] The ECS identification module is responsible for determining whether the authoritative server supports the ECS function;
[0050] The dial test module is responsible for connecting to different dial test systems, and classifying and dividing the monitoring nodes of the dial test system according to the region and operator in the way of intelligent DNS, and performing DNS queries by matching the corresponding monitoring nodes according to the client's IP address; when the authoritative server does not support the ECS function, the dial test module is used to filter out the monitoring nodes in the same region and the same network from the connected dial test system according to the client's IP address, and perform DNS queries on them, and then convert the DNS query results returned by the dial test system into standard DNS response packets and hand them over to the DNS module for subsequent processing.
[0051] Among them, after receiving the target domain name DNS query request sent by the client, the above-mentioned DNS module can also first determine whether the target domain name to be queried exists in the DNS server cache; if so, directly return the cache result; if the target domain name to be queried does not exist in the DNS server cache, then perform a recursive query.
[0052] In one embodiment, a computer device is also provided, including a memory, a processor, and a computer program stored in the memory, and the processor executes the computer program to implement the steps of the method of the above embodiment.
[0053] In one embodiment, a computer program product is also provided, including a computer program / instruction, which implements the steps of the above-mentioned embodiment method when executed by a processor.
[0054] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. A public DNS query response method based on a dial-up system, applied to a public DNS server, characterized in that: The method includes: Receive the target domain name DNS query request sent by the client; Perform recursive query to obtain the authoritative server address of the target domain name to be queried; Determine whether the authoritative server supports the ECS function; If supported, the client's IP address is carried out for authoritative query, and the DNS resolution result matching the client's IP address is obtained. Then, the subsequent processing flow is performed and the DNS query result is finally returned to the client. If it is not supported, the dial-up system is used to perform a DNS query, the DNS query result returned by the dial-up system is obtained, and finally the query result is returned to the client.
2. The public DNS query response method based on the dial-up system according to claim 1 is characterized in that: After receiving the target domain name DNS query request from the client, first determine whether the target domain name to be queried exists in the DNS server cache; if it exists, directly return the cache result; If the target domain name to be queried does not exist in the DNS server cache, the recursive query is performed again.
3. The public DNS query response method based on the dial-up system according to claim 1 is characterized in that: The method of using the dialing system to perform a DNS query and obtain a DNS query result returned by the dialing system specifically includes: first, converting the DNS query request into a format that meets the API requirements of the dialing system, and then screening out monitoring nodes in the same region and the same network from the connected dialing system according to the IP address of the client, and having them perform a DNS query; then, converting the DNS query result returned by the dialing system into a standard DNS response packet, performing subsequent processing, and finally returning the query result to the client.
4. A public DNS server, characterized in that: include: The DNS module is responsible for responding to the target domain name DNS query request sent by the client, performing recursive query, obtaining the authoritative server address of the target domain name to be queried, and finally returning the DNS query result to the client; in the process, the ECS identification module is called, and logical judgment is set, and the dialing module is called as appropriate; wherein, if the authoritative server supports the ECS function, the authoritative query is carried out with the IP address of the client, and the DNS resolution result matching the IP address of the client is obtained, and then the subsequent processing flow is performed, and the DNS query result is finally returned to the client; if it is not supported, the dialing system is used to perform DNS query, obtain the DNS query result returned by the dialing system, and finally return the query result to the client; The ECS identification module is responsible for determining whether the authoritative server supports the ECS function; The dialing test module is responsible for connecting to different dialing test systems, and classifying and dividing the monitoring nodes of the dialing test system according to the region and operator in the way of intelligent DNS, and performing DNS query by matching the corresponding monitoring node according to the IP address of the client; when the authoritative server does not support the ECS function, the dialing test module is used to screen out the monitoring nodes in the same region and the same network from the connected dialing test system according to the IP address of the client, and perform DNS query on them, and then convert the DNS query result returned by the dialing test system into a standard DNS response packet and hand it over to the DNS module for subsequent processing.
5. The public DNS server according to claim 4, characterized in that: After receiving the target domain name DNS query request sent by the client, the DNS module first determines whether the target domain name to be queried exists in the DNS server cache; if so, directly returns the cache result; If the target domain name to be queried does not exist in the DNS server cache, the recursive query is performed again.
6. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method of claim 1.
7. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to claim 1 are implemented.
Citation Information
Cited By
Dial testing method and device and electronic equipment
CN121217611A