WO2022151643A1 - 一种域名解析方法及系统 - Google Patents

一种域名解析方法及系统 Download PDF

Info

Publication number
WO2022151643A1
WO2022151643A1 PCT/CN2021/098481 CN2021098481W WO2022151643A1 WO 2022151643 A1 WO2022151643 A1 WO 2022151643A1 CN 2021098481 W CN2021098481 W CN 2021098481W WO 2022151643 A1 WO2022151643 A1 WO 2022151643A1
Authority
WO
WIPO (PCT)
Prior art keywords
dns server
detection
address
target
local dns
Prior art date
Application number
PCT/CN2021/098481
Other languages
English (en)
French (fr)
Inventor
周文杰
Original Assignee
网宿科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 网宿科技股份有限公司 filed Critical 网宿科技股份有限公司
Priority to EP21887866.8A priority Critical patent/EP4072046A4/en
Priority to US17/743,441 priority patent/US11770320B2/en
Publication of WO2022151643A1 publication Critical patent/WO2022151643A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • H04L43/106Active monitoring, e.g. heartbeat, ping or trace-route using time related information in packets, e.g. by adding timestamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/12Network monitoring probes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • H04L43/0864Round trip delays

Definitions

  • the present application relates to the field of Internet technologies, and in particular, to a method and system for domain name resolution.
  • a domain name resolution system may typically include root servers, top-level domain name servers, and authoritative Domain Name System (DNS) servers.
  • DNS Domain Name System
  • a client when a client initiates a domain name resolution request, it can first try to obtain the resolution result locally. If the resolution result is not obtained from the local browser cache, the operating system cache, and the local host file, a domain name resolution request can be initiated to the local DNS server.
  • the domain name resolution request can be processed by the root server and the top-level domain name server successively, and the top-level domain name server can feed back the name server (Name Server, NS) record of the authoritative DNS server to the local domain name system (Domain Name System, DNS) server.
  • the local DNS server can obtain the resolution result of the domain name from the authoritative DNS server, and provide the resolution result to the client, and the client can initiate access to the domain name according to the resolution result.
  • the NS records of the authoritative DNS server can be managed in different regions according to different regions and different operators, so that the local DNS server can communicate with the optimal authoritative DNS server. communication.
  • the area division of the NS record is usually performed manually, but the manual division method relies too much on human experience, which often leads to the inaccuracy of the area division, which in turn leads to the inefficiency of domain name resolution.
  • the purpose of this application is to provide a method and system for domain name resolution, which can improve the accuracy of NS record area division, thereby improving the efficiency of domain name resolution.
  • An embodiment of the present application provides a method for domain name resolution, which is applied to a scheduling cluster.
  • the method includes: after receiving a query request from a local DNS server, the query request includes the egress IP address of the local DNS server, so as to pass the detection machine Detect the exit IP address of the local DNS server; send the server setting information fed back by the analysis system according to the detection result to the local DNS server, and the server setting information includes the authoritative DNS server set for the local DNS server Wherein, if the authoritative DNS server in the described server setting information is inconsistent with the authoritative DNS server currently adopted by the local DNS server, the local DNS server replaces the authoritative DNS server that is currently adopted with the authoritative DNS server in the server setting information authoritative DNS server.
  • the embodiment of the present application also provides a domain name resolution system, which is deployed in a scheduling cluster, and the system includes a scheduling system, a detection system, and an analysis system, wherein: the scheduling system is used to receive query requests sent by each local DNS server , and record the exit IP addresses of each of the local DNS servers to generate a list of IP addresses to be detected, and report the list of IP addresses to the detection system; the detection system is used to record the list of IP addresses Distributed to each detection machine, so as to detect each IP address in the IP address list through each of the detection machines; the analysis system is used to receive the detection results fed back by each of the detection machines, and is used for each of the local The DNS servers respectively set authoritative DNS servers, so as to process the domain name resolution request sent by the local DNS server through the set authoritative DNS servers.
  • the scheduling system when the scheduling system receives the query request sent by each local DNS server, it can record the exit IP addresses of these local DNS servers, and pass the recorded exit IP addresses. to generate a list of IP addresses to be detected.
  • This list of IP addresses may be distributed by the detection system to various detection machines, which may be distributed in different geographic locations. Each detection machine can detect the IP addresses in the IP address list, so as to obtain detection results for different IP addresses. These detection results can characterize the communication quality between the detection machine and the local DNS server. By analyzing the detection results, the analysis system can determine the detection machine with the best communication quality with the local DNS server.
  • the analysis system can set the corresponding authority for the local DNS server.
  • DNS server The authoritative DNS server set according to the detection result can ensure better communication quality with the local DNS server.
  • the local DNS server is detected by the detection machines distributed in various geographical locations, and the NS record of the local DNS server is divided into areas according to the detection results, which can improve the accuracy of the area division of the NS record, thereby improving the efficiency of domain name resolution. .
  • Fig. 1 is the domain name resolution system framework in the related art
  • Fig. 2 is the system architecture of domain name resolution in the embodiment of the present application.
  • FIG. 3 is a schematic diagram of a method for domain name resolution in an embodiment of the present application.
  • the present application provides a domain name resolution method, which can be applied to the system shown in FIG. 2 .
  • the system is deployed in a scheduling cluster to provide services for terminal equipment used by users, and the terminal equipment can communicate with a local DNS server.
  • the local DNS server may send a query request to the top-level domain name server to query the NS records of the authoritative DNS server for processing the domain name resolution request.
  • the scheduling system can summarize the Internet Protocol (IP) address list of the local DNS server, and report the IP address list to the detection system.
  • the detection system issues the IP address list to a plurality of detection machines distributed in different geographical locations, so as to use the detection machines to detect the communication quality of the egress IP address of the local DNS server. The detection result can be reported to the analysis system by the detection machine.
  • IP Internet Protocol
  • the optimal NS record can be set for each local DNS server, and the optimal NS record can be sent to the scheduling system. Subsequently, the resolution result of the top-level domain name server is adjusted by the scheduling system, so that the best NS record can be fed back to the local DNS server.
  • the scheduling system, the analysis system, and the detection system may be deployed on the same device in the scheduling cluster, or may be deployed on different devices, which are not specifically limited here.
  • the domain name resolution method provided by the present application can be applied to a scheduling cluster, and the method can include the following steps.
  • the query request After receiving the query request of the local DNS server, the query request includes the exit IP address of the local DNS server, so that the detection machine detects the exit IP address of the local DNS server.
  • S002 Send the server setting information fed back by the analysis system according to the detection result to the local DNS server, where the server setting information includes an authoritative DNS server set for the local DNS server; wherein, if the server setting information contains The authoritative DNS server currently used by the local DNS server is inconsistent with the authoritative DNS server currently used by the local DNS server, and the authoritative DNS server currently used is replaced with the authoritative DNS server in the server setting information.
  • the authoritative DNS server currently used by the local DNS server may be the authoritative DNS server defined by the server setting information of the previous round, or may be the authoritative DNS server set in a conventional manner.
  • the analysis system can set a more efficient authoritative DNS server for the local DNS server according to the detection results reported by each detection machine. In this way, if the authoritative DNS server in the server setting information is inconsistent with the authoritative DNS server currently used by the local DNS server, it means that the current network state has changed, and the local DNS server can dynamically change the corresponding authoritative DNS server.
  • the domain name resolution method provided by an embodiment of the present application may include the following multiple steps.
  • the scheduling system receives the query request from each local DNS server, and records the egress IP address of each local DNS server to generate a list of IP addresses to be detected, and reports the list of IP addresses to the detection system.
  • the terminal device can send the domain name resolution request to the local DNS server.
  • the domain name resolution request can obtain the NS record of the top-level domain name server from the root server through recursive query, and then the local DNS server can send a query request to the top-level domain name server to obtain the NS record of the next-level authoritative DNS server.
  • the top-level domain name server can recursively query the scheduling system for the corresponding NS record.
  • the dispatch system can record the egress IP address of the local DNS server.
  • a cluster of top-level domain name servers can receive query requests from multiple local DNS servers, and the scheduling system can record the egress IP addresses of these local DNS servers.
  • the scheduling system may perform aggregation processing on the recorded egress IP addresses.
  • IP addresses with the same C segment can be considered to come from the same local DNS server. Therefore, the exit IP addresses of each of the local DNS servers can be classified according to the specified address segment, so as to obtain the classified exit IP addresses.
  • the designated address segment may be the above-mentioned C segment.
  • IP addresses can be selected as the IP addresses to be detected. In this way, by means of IP address aggregation, the number of IP addresses to be detected can be greatly reduced, and the detection results can also be It can well characterize the network quality of the egress IP addresses of different local DNS servers.
  • corresponding service area identifiers may be allocated to various egress IP addresses.
  • the service area identifier may be jointly represented by the home location and the network operator.
  • the service area identifier may be an identifier such as "Fujian Telecom", “Shanghai Telecom”, “Zhengzhou Netcom”, etc.
  • various types of egress IP addresses carrying the service area identifier may be aggregated into a list of IP addresses to be detected.
  • the IP address list may contain one or more IP addresses to be detected selected above, and these IP addresses to be detected may be bound with corresponding service area identifiers.
  • the scheduling system may report the list of IP addresses to the detection system.
  • S3 The detection system distributes the IP address list to each detection machine, so as to detect each IP address in the IP address list by each of the detection machines.
  • the detection system may detect the egress IP address of the local DNS server through detection machines distributed in various geographic locations. By distributing the to-be-detected IP address list constructed in step S1 to each detection machine, each IP address in the IP address list can be detected by each detection machine.
  • the target IP address in the list of IP addresses to be detected you can try to detect the target IP address by using the conventional PING command. Specifically, when using the PING command to detect the target IP address, you can set the Time To Live (TTL) value to the maximum value (for example, it can be 64), and then use the PING command to send request data to the target IP address Bag. If the target IP address does not return a response data packet for the PING command, it indicates that the conventional detection method fails to detect. At this point, an optimized probing scheme can be implemented.
  • TTL Time To Live
  • the TTL value when the optimized detection scheme is executed, the TTL value may be modified to the current reference tracking hop count, and the reference tracking hop count may be 32 by default.
  • the reference tracking hop count may be updated with subsequent multiple rounds of detection processes, and used as a basis for whether a new round of detection needs to be started.
  • a combination of traceroute (traceroute) and a detection protocol may be used to detect the target IP address.
  • the traceroute method can parse the TTL field in the response data packet fed back by the target IP address, or can parse the TTL field in the timeout data packet fed back by the intermediate gateway, thereby identifying the TTL value carried in the response data packet or the timeout data packet.
  • the detection of the target IP address through different detection protocols can be compatible with different network scenarios, thereby improving the detection success rate.
  • a plurality of detection protocols may jointly constitute a detection protocol group, and in the detection protocol group, the plurality of detection protocols may be sorted according to priorities. For example, the probing protocols may be sorted in order of highest to lowest priority. Then, the target IP addresses may be probed one by one using each of the probe protocols.
  • a request data packet may be sent to the target IP address based on the detection protocol. If the target IP address feeds back a response data packet for the request data packet, the total number of The time difference between the request data packet and the response data packet is determined, and the time difference is used as the round-trip delay corresponding to the successful detection.
  • the types of request packets and response packets can also be different.
  • the detection protocol in the detection protocol group includes the User Datagram Protocol (UDP)
  • the request data packet may be a UDP detection data packet
  • the corresponding response data packet may be the Internet Control Packet Protocol target unreachable (Internet Control Message Protocol(ICMP)Destination Unreachable) packet.
  • the detection protocol in the detection protocol group includes a Transmission Control Protocol (TCP)
  • the request data packet may be a TCP synchronization (TCP SYN) detection data packet
  • the corresponding response data packet may be a TCP acknowledgment (TCP ACK) )data pack.
  • the request data packet can be an Internet Control Message Protocol echo request (ICMP Echo Request) probe data packet
  • the corresponding response data packet can be an Internet Control Message Protocol echo reply (ICMP Echo Request). reply) packet.
  • ICMP Echo Request Internet Control Message Protocol echo request
  • ICMP Echo Request Internet Control Message Protocol echo reply
  • the timeout data packet with the longest survival time sent back by the intermediate gateway can be obtained.
  • the detection device may receive time-out data packets sent by different intermediate gateways, and the TTL field in these time-out data packets may carry a corresponding TTL value.
  • the intermediate gateway that sends back the timeout data packet with the largest TTL value may be far away from the target IP address. If the time difference calculated by the timeout data packet is used, it cannot accurately reflect the relationship between the target IP address and the detection device. Therefore, a specified time-to-live threshold can be set for the TTL value, and the specified storage time threshold can be used as the lower limit of TTL. If the time-to-live corresponding to the time-out data packet is greater than or equal to the specified time-to-live time threshold, it means that the time-out data packet is a valid data packet. time difference between.
  • time-to-live corresponding to the time-out data packet is less than the specified time-to-live threshold, it means that the intermediate gateway that sent back the time-out data packet is too far from the target IP address, so the time-out data packet can be discarded and the next detection can be used.
  • the protocol probes the target IP address.
  • each detection protocol fails to be detected one by one according to the priority, it indicates that the detection of the current round of detection protocol groups fails. At this time, it can be determined whether to update the reference tracking hop count according to the value of the reference tracking hop count, and whether to end the detection of the target IP address.
  • the reference tracking hop count may be reduced, and the reduced tracking hop count may be used as the reference tracking hop count for the next round of detection.
  • the minimum tracking hop count may be an empirical value during the network quality detection process. For example, the minimum tracking hop count may be 6. If the current reference tracking hop count is greater than 6, the current reference tracking hop count may be decremented by 1, and The obtained result is used as the reference tracking hop count for the next round of detection. In this way, in the next round of detection, the target IP address can be detected by using each detection protocol in the detection protocol group one by one according to the above scheme. If the detection still fails, the updated reference tracking hop count and the minimum tracking hop can be compared. The numbers are compared to determine whether to continue to update the reference tracking hop number, so as to carry out the next round of detection process.
  • RTT Round-Trip Time
  • the traditional network quality detection methods basically use the PING command under Linux to detect the target IP address. Each detection requires a process, which consumes a lot of system resources. At the same time, each probe records the probe start state, and blocks the response data packets waiting for the probe to return. The probe efficiency is low, which is not conducive to large batch probes.
  • the sending of request packets and the receiving of response packets can be carried out separately during the detection process, and each module is responsible for it. detection efficiency.
  • the identifier, packet sending time, TTL value and other required fields required to calculate the RTT value can be recorded by encapsulating them into the protocol header and body, and parsed and obtained when the protocol returns.
  • detection can be performed according to the detection sequence of UDP, TCP and ICMP.
  • the detection process can be as follows.
  • the probe sends UDP probe packets to the target IP address.
  • the time difference between the ICMP Destination Unreachable data packet and the UDP probe data is calculated, and the time difference is the round-trip delay RTT value.
  • the destination IP address When the destination IP address does not respond to the ICMP Destination Unreachable packet, obtain the ICMP TTL timeout packet sent back by the intermediate gateway with the largest TTL value, and calculate the time difference between the ICMP TTL timeout packet and the UDP detection packet, which is the round-trip delay RTT value.
  • the maximum TTL value is less than the latest allowed TTL value, the corresponding ICMP TTL timeout packet is discarded, and other protocols are tried.
  • the probe sends a TCP[SYN] probe packet to the target IP address.
  • the target IP address sends back a TCP[SYN ACK] packet
  • the time difference between the TCP[SYN ACK] packet and the TCP[SYN] probe packet is calculated, which is the round-trip delay RTT value.
  • the target IP address does not respond to the TCP[SYN ACK] packet, obtain the ICMP TTL timeout packet sent back by the intermediate gateway with the largest TTL value, and calculate the time difference between the ICMP TTL timeout packet and the TCP[SYN] detection packet, that is, is the round-trip delay RTT value.
  • the probe sends an ICMP Echo Request probe packet to the target IP address.
  • the target IP address sends back an ICMP Echo reply packet
  • the time difference between the ICMP Echo reply packet and the ICMP Echo Request probe packet is calculated, which is the round-trip delay RTT value.
  • the target IP address does not respond to the ICMP Echo reply packet, obtain the ICMP TTL timeout packet sent back by the intermediate gateway with the largest TTL value, and calculate the time difference between the ICMP TTL timeout packet and the ICMP Echo Request detection packet, which is the round-trip time Extend the RTT value.
  • the ICMP TTL timeout packet is discarded, and the destination IP is recorded as undetectable.
  • the analysis system receives the detection results fed back by each of the detection machines, and sets an authoritative DNS server for each of the local DNS servers, so as to process the domain name resolution request sent by the local DNS server through the set authoritative DNS server .
  • detection results corresponding to each detection machine can be obtained in the above manner, and these detection results can represent the communication quality between the detection machine and the local DNS server.
  • These detection results can be fed back to the analysis system by each detector, or the detection system can summarize the detection results and send them to the analysis system together.
  • the analysis system can sort the detection results of each detection machine from good to bad, and filter out one or more detection machines with the top ranking according to the sorting results.
  • the authoritative DNS server in the area where these probes are located can provide domain name resolution for the local DNS server later.
  • the authoritative DNS servers in the regions where each of the selected probe machines are located can be determined, and a set of these authoritative DNS servers can be constructed as a list of candidate authoritative DNS servers. In this list, authoritative DNS servers can be sorted according to the detection results of the corresponding detection machines. The authoritative DNS servers with better detection results have higher priority.
  • the target detection machine corresponding to the optimal detection result for the local DNS server may be queried. Then, the authoritative DNS server in the area where the target detection machine is located may be set as the authoritative DNS server corresponding to the local DNS server.
  • the region where the local DNS server is located and the supported network operator can be identified, and the IP address of the set authoritative DNS server can be obtained, and finally the region and network operator can be constructed. and the mapping relationship between the IP addresses of the authoritative DNS servers. For example, if the area of the local DNS server is "Fujian”, the network operator is "Telecom”, and the set IP address of the authoritative DNS server is "1.1.1.1”, then "Fujian Telecom: 1.1.1.1” can be constructed Such a mapping relationship provides services for the local DNS server of Fujian Telecom through the authoritative DNS server whose IP address is "1.1.1.1".
  • mapping relationships can be arranged in order of priority. According to the requirements of the actual application scenario, a mapping relationship can be selected from the list to provide services for the local DNS server.
  • the analysis system may send the list to the scheduling system.
  • the top-level domain name server receives the query request sent by the current local DNS server, it can first designate an authoritative DNS server for the current local DNS server in a conventional manner, and the IP address of the designated authoritative DNS server can be used as the target DNS server. The resolved IP address returned by the current local DNS server. Then, the top-level domain name server can send the resolved IP address to the scheduling system. After receiving the resolved IP address, the scheduling system may compare the resolved IP address with the IP address of the authoritative DNS server set for the current local DNS server.
  • the scheduling system can notify the top-level domain name server to feed back the resolved IP address to the local DNS server. If the two are inconsistent, the scheduling system can replace the resolved IP address with the IP address of the authoritative DNS server set for the current local DNS server, so that the replaced IP address can be fed back to the the current local DNS server. In this way, through the intervention of the NS scheduling system, the top-level domain name server can provide the local DNS server with the resolved IP address of the authoritative DNS server with better communication quality according to the detection result of the detection machine.
  • the probe machine may periodically probe the quality of communication with the local DNS server.
  • the analysis system can dynamically adjust the authoritative DNS server set for the local DNS server according to the real-time detection results. Specifically, if the detection result of the target detection machine for the target local DNS server at the current moment indicates that the network is abnormal, it can be inferred that the communication quality between the authoritative DNS server in the area where the target detection machine is located and the target local DNS server may also deteriorate. .
  • the analysis system may query the target authoritative DNS server in the area where the target detection machine is located, and lower the priority of the target authoritative DNS server in the list of candidate authoritative DNS servers of the target local DNS server.
  • the detection results representing network anomalies can include various situations.
  • the network abnormality can mean that the target detection machine cannot access the target local DNS server, or the communication index between the target detection machine and the target local DNS server is lower than a fixed threshold, or a certain percentage compared with the last communication index, etc. .
  • the priority of the target authoritative DNS server can be lowered in time (for example, the priority of the target authoritative DNS server can be lowered to the lowest level), so that the candidate authoritative DNS server after the priority adjustment can be adjusted according to the priority of the target authoritative DNS server. list to reset the optimal authoritative DNS server for the target local DNS server.
  • the communication quality of the public network can be sensed in time, and the dynamic scheduling of the authoritative DNS server can be realized, thereby ensuring the stability of the domain name resolution process.
  • the present application also provides a domain name resolution system, the system includes a scheduling system, a detection system and an analysis system, wherein: the scheduling system is used to receive query requests from each local DNS server, and record each of the local DNS servers The egress IP address of the server to generate a list of IP addresses to be detected, and report the list of IP addresses to the detection system; the detection system is used to distribute the list of IP addresses to each detection machine, so as to Detect each IP address in the IP address list by each of the detection machines; the analysis system is used to receive the detection results fed back by each of the detection machines, and set an authoritative DNS server for each of the local DNS servers. , so as to process the domain name resolution request sent by the local DNS server through the set authoritative DNS server.
  • the scheduling system when the scheduling system receives the query request sent by each local DNS server, it can record the exit IP addresses of these local DNS servers, and pass the recorded exit IP addresses. to generate a list of IP addresses to be detected.
  • This list of IP addresses can be distributed by the probing system to various probing machines, which can be distributed in different geographic locations.
  • Each detection machine can detect the IP addresses in the IP address list, so as to obtain detection results for different IP addresses.
  • These detection results can characterize the communication quality between the detection machine and the local DNS server. By analyzing the detection results, the analysis system can determine the detection machine with the best communication quality with the local DNS server.
  • the analysis system can set the corresponding authority for the local DNS server.
  • DNS server The authoritative DNS server set according to the detection result can ensure better communication quality with the local DNS server.
  • the local DNS server is detected by the detection machines distributed in various geographical locations, and the NS record of the local DNS server is divided into areas according to the detection results, which can improve the accuracy of the area division of the NS record, thereby improving the efficiency of domain name resolution. .
  • the embodiments of the present application may be provided as a method, a system, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions
  • the apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.
  • a computing device includes one or more processors (eg, a central processing unit (CPU)), input/output interfaces, network interfaces, and memory.
  • processors eg, a central processing unit (CPU)
  • Memory may include non-persistent memory in computer-readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer readable media includes both persistent and non-permanent, removable and non-removable media and can be implemented by any method or technology for storage of information.
  • Information may be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase-change memory (Phase-change Random Access Memory, PRAM), static random access memory (Static Random Access Memory, SRAM), dynamic random access memory (Dynamic Random Access Memory) , DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), flash memory, or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD), or other optical storage, magnetic cassettes, tape-disk storage, or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
  • computer-readable media does not include transitory computer-readable media, such as modulated data

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请公开了一种域名解析方法及系统,所述方法应用于本地DNS服务器中,包括:向调度系统发送查询请求,所述查询请求中包含本地DNS服务器的出口IP地址,以通过探测机对所述本地DNS服务器的出口IP地址进行探测;接收分析系统根据探测结果反馈的服务器设定信息,所述服务器设定信息中包括为所述本地DNS服务器设定的权威DNS服务器;其中,若所述服务器设定信息中的权威DNS服务器与所述本地DNS服务器当前采用的权威DNS服务器不一致,将所述当前采用的权威DNS服务器替换为所述服务器设定信息中的权威DNS服务器。

Description

一种域名解析方法及系统
交叉引用
本申请基于申请号为“202110042870.5”、申请日为2021年01月13日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本申请。
技术领域
本申请涉及互联网技术领域,特别涉及一种域名解析方法及系统。
背景技术
在一些情形中,域名解析系统通常可以包含根服务器、顶级域名服务器以及权威域名系统(Domain Name System,DNS)服务器。如图1所示,客户端在发起一次域名解析请求时,首先可以尝试从本地获取解析结果。如果从本地的浏览器缓存、操作系统缓存以及本地host文件中均没有获取到解析结果时,便可以向本地DNS服务器发起域名解析请求。该域名解析请求可以先后由根服务器和顶级域名服务器进行处理,顶级域名服务器可以向本地域名系统(Domain Name System,DNS)服务器反馈权威DNS服务器的名称服务器(Name Server,NS)记录。最终,本地DNS服务器可以从权威DNS服务器处获取到域名的解析结果,并将该解析结果提供给客户端,客户端便可以根据解析结果对域名发起访问。
为了保证权威DNS服务器能够为本地DNS服务器提供良好的服务,目前可以根据不同区域、不同运营商,对权威DNS服务器的NS记录进行分区域管理,从而让本地DNS服务器与最优的权威DNS服务器进行通信。在实际应用中,通常是由人工进行NS记录的区域划分的,但人工划分的方式过于依赖人 的经验,很多时候会导致区域划分的准确度不高,进而导致域名解析的效率不高。
发明内容
本申请的目的在于提供一种域名解析方法及系统,能够提高NS记录区域划分的准确度,进而提高域名解析的效率。
本申请实施例提供一种域名解析方法,应用于调度集群中,所述方法包括:收到本地DNS服务器的查询请求后,所述查询请求中包含本地DNS服务器的出口IP地址,以通过探测机对所述本地DNS服务器的出口IP地址进行探测;向本地DNS服务器发送分析系统根据探测结果反馈的服务器设定信息,所述服务器设定信息中包括为所述本地DNS服务器设定的权威DNS服务器;其中,若所述服务器设定信息中的权威DNS服务器与所述本地DNS服务器当前采用的权威DNS服务器不一致,本地DNS服务器将所述当前采用的权威DNS服务器替换为所述服务器设定信息中的权威DNS服务器。
本申请实施例还提供一种域名解析系统,部署在调度集群中,所述系统包括调度系统、探测系统以及分析系统,其中:所述调度系统,用于接收各个本地DNS服务器发来的查询请求,并记录各个所述本地DNS服务器的出口IP地址,以生成待探测的IP地址列表,并将所述IP地址列表上报至所述探测系统;所述探测系统,用于将所述IP地址列表分发至各个探测机处,以通过各个所述探测机对所述IP地址列表中各个IP地址进行探测;所述分析系统,用于接收各个所述探测机反馈的探测结果,为各个所述本地DNS服务器分别设定权威DNS服务器,以通过设定的所述权威DNS服务器处理所述本地DNS服务器发送的域名解析请求。
由上可见,本申请一个或者多个实施例提供的技术方案,调度系统在接收到各个本地DNS服务器发来的查询请求时,可以记录这些本地DNS服务器的出口IP地址,通过记录的出口IP地址,可以生成待探测的IP地址列表。该 IP地址列表可以被探测系统分发至各个探测机,这些探测机可以分布于不同的地理位置。每个探测机都可以针对IP地址列表中的IP地址进行探测,从而得到针对不同IP地址的探测结果。这些探测结果可以表征探测机到本地DNS服务器之间通信质量的好坏。分析系统通过对探测结果进行分析,从而可以确定出与本地DNS服务器通信质量最好的探测机,这样,根据该探测机所处的地理位置,分析系统便可以为本地DNS服务器设定对应的权威DNS服务器。按照探测结果设定的权威DNS服务器,可以保证与本地DNS服务器之间的通信质量较好。这样,利用分布于各个地理位置处的探测机对本地DNS服务器进行探测,并依据探测结果对本地DNS服务器的NS记录进行区域划分,能够提高NS记录区域划分的准确度,进而提高域名解析的效率。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是相关技术中的域名解析系统构架;
图2是本申请实施例中域名解析的系统架构;
图3是本申请实施例中域名解析的方法示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请提供一种域名解析方法,该方法可以应用于图2所示的系统中。在图2中,所述系统部署在调度集群中,用于为用户使用的终端设备提供服务,该终端设备可以与本地DNS服务器进行通信。本地DNS服务器可以向顶级域名服务器发送查询请求,以查询用于处理域名解析请求的权威DNS服务器的NS记录。调度系统可以汇总本地DNS服务器的互联网协议(Internet Protocol,IP)地址列表,并将该IP地址列表上报给探测系统。探测系统通过向分布于不同地理位置的多个探测机下发IP地址列表,从而利用探测机探测本地DNS服务器的出口IP地址的通信质量。探测结果可以由探测机上报至分析系统,当分析系统解析探测结果之后,可以为各个本地DNS服务器设定最优的NS记录,该最优的NS记录可以下发至调度系统。后续,通过调度系统对顶级域名服务器的解析结果进行调节,从而可以向本地DNS服务器反馈最佳的NS记录。调度系统、分析系统及探测系统可以部署在调度集群中的同一台设备上,也可以分别部署于不同的设备,在此不做具体限定。
其中,本申请提供的域名解析方法,可以应用于调度集群中,该方法可以包括以下多个步骤。
S001:接收到本地DNS服务器的查询请求后,所述查询请求中包含本地DNS服务器的出口IP地址,以通过探测机对所述本地DNS服务器的出口IP地址进行探测。
S002:向本地DNS服务器发送分析系统根据探测结果反馈的服务器设定信息,所述服务器设定信息中包括为所述本地DNS服务器设定的权威DNS服务器;其中,若所述服务器设定信息中的权威DNS服务器与所述本地DNS服务器当前采用的权威DNS服务器不一致,将所述当前采用的权威DNS服务器替换为所述服务器设定信息中的权威DNS服务器。
在本实施例中,本地DNS服务器当前采用的权威DNS服务器可以是上一轮的服务器设定信息限定的权威DNS服务器,也可以是按照常规的方式设定的权威DNS服务器。在当前周期内,分析系统可以根据各个探测机上报的探测 结果,为本地DNS服务器设定更加高效的权威DNS服务器。这样,若服务器设定信息中的权威DNS服务器与本地DNS服务器当前采用的权威DNS服务器不一致,则表示当前的网络状态发生了变化,本地DNS服务器可以动态地更改对应的权威DNS服务器。
具体地,请参阅图2和图3,本申请一个实施例提供的域名解析方法,可以包括以下多个步骤。
S1:调度系统接收各个本地DNS服务器发来的查询请求,并记录各个所述本地DNS服务器的出口IP地址,以生成待探测的IP地址列表,并将所述IP地址列表上报至探测系统。
在本实施例中,终端设备如果无法在本地获取到域名解析请求的缓存信息,便可以向本地DNS服务器发送域名解析请求。该域名解析请求通过递归查询,可以从根服务器处得到顶级域名服务器的NS记录,然后,本地DNS服务器可以向顶级域名服务器发送查询请求,以获取下一级的权威DNS服务器的NS记录。顶级域名服务器接收到本地DNS服务器发来的查询请求后,可以向调度系统递归查询对应的NS记录。调度系统可以记录本地DNS服务器的出口IP地址。在实际应用中,顶级域名服务器的集群可以接收到多个本地DNS服务器发来的查询请求,调度系统从而可以将这些本地DNS服务器的出口IP地址均记录下来。
在一个实施例中,考虑到记录的出口IP地址的数量往往较多,为了简化数据处理的过程,调度系统可以对记录的出口IP地址进行聚合处理。通常而言,具备同一个C段的IP地址可以认为来自同一个本地DNS服务器,因此,可以将各个所述本地DNS服务器的出口IP地址按照指定地址段进行归类,从而得到归类后的出口IP地址。该指定地址段便可以是上述的C段。归类后的出口IP地址,可以选择其中的一个或者多个IP地址作为待探测的IP地址,这样,通过IP地址聚合的方式,可以极大地减少待探测的IP地址的数量,同时探测结果还能够很好地表征不同本地DNS服务器的出口IP地址的网络质量。
在本实施例中,在对出口IP地址进行归类后,可以为各类出口IP地址分配对应的服务区域标识。其中,该服务区域标识可以通过归属地和网络运营商来共同表示。例如,服务区域标识可以是“福建电信”、“上海电信”、“郑州网通”等标识。在为每类出口IP地址分配对应的服务区域标识后,可以将携带服务区域标识的各类出口IP地址汇总为待探测的IP地址列表。在IP地址列表中,可以包含上文中选择的一个或者多个待探测的IP地址,这些待探测的IP地址可以与对应的服务区域标识相绑定。
在得到待探测的IP地址列表后,调度系统可以将该IP地址列表上报给探测系统。
S3:所述探测系统将所述IP地址列表分发至各个探测机处,以通过各个所述探测机对所述IP地址列表中各个IP地址进行探测。
在本实施例中,为了给本地DNS服务器设定最优的权威DNS服务器,探测系统可以通过分布于各个地理位置处的探测机分别对本地DNS服务器的出口IP地址进行探测。通过将步骤S1中构建的待探测的IP地址列表分发至各个探测机处,便可以通过各个探测机对该IP地址列表中的各个IP地址进行探测。
以待探测的IP地址列表中的目标IP地址为例,针对该目标IP地址,可以尝试通过常规的PING命令进行探测。具体地,在使用PING命令对目标IP地址进行探测时,可以将存活时间(Time To Live,TTL)值设置为最大值(例如可以是64),然后再利用PING命令对目标IP地址发送请求数据包。如果目标IP地址没有针对PING命令反馈响应数据包,则表征常规的探测手段探测失败。此时,可以执行优化的探测方案。
在本实施例中,执行优化的探测方案时,可以将TTL值修改为当前的参考追踪跳数,该参考追踪跳数默认可以是32。该参考追踪跳数可以随着后续多轮的探测过程进行更新,并作为是否需要开启新一轮探测的依据。
在本实施例中,为了提高目标IP地址的探测成功率,可以采用路由跟踪(traceroute)与探测协议相结合的方式对目标IP地址进行探测。具体地, traceroute方式可以解析目标IP地址反馈的响应数据包中的TTL字段,或者可以解析中间网关反馈的超时数据包中的TTL字段,从而识别响应数据包或者超时数据包携带的TTL值。而通过不同的探测协议对目标IP地址进行探测,可以兼容不同的网络场景,从而提高探测成功率。
具体地,多个探测协议可以共同构成探测协议组,在该探测协议组中,可以按照优先级对多个探测协议进行排序。例如,可以按照优先级从高到低的顺序对探测协议进行排序。然后,可以逐一利用各个所述探测协议对所述目标IP地址进行探测。
在本实施例中,针对探测协议组中当前的探测协议,可以基于该探测协议向目标IP地址发送请求数据包,若所述目标IP地址针对所述请求数据包反馈响应数据包,可以计算所述请求数据包和所述响应数据包之间的时间差,并将所述时间差作为探测成功对应的往返时延。
在实际应用中,随着探测协议的不同,请求数据包和响应数据包的类型也可以不同。例如,所述探测协议组中的探测协议包括用户数据报协议(User Datagram Protocol,UDP),那么请求数据包可以为UDP探测数据包,对应的响应数据包可以为互联网控制报文协议目标不可达(Internet Control Message Protocol(ICMP)Destination Unreachable)数据包。当所述探测协议组中的探测协议包括传输控制协议(Transmission Control Protocol,TCP)时,请求数据包可以为TCP同步(TCP SYN)探测数据包,对应的响应数据包可以为TCP确认(TCP ACK)数据包。当探测协议组中的探测协议包括ICMP时,请求数据包可以为互联网控制报文协议回应请求(ICMP Echo Request)探测数据包,对应的响应数据包可以为互联网控制报文协议回应回复(ICMP Echo reply)数据包。
然而,在基于探测协议对目标IP地址进行探测时,如果目标IP地址未针对发出的请求数据包反馈响应数据包时,可以获取中间网关发回的存活时间最大的超时数据包。具体地,探测装置可以接收到不同的中间网关发来的超时数据包,这些超时数据包中的TTL字段中可以携带对应的TTL值。通常而言,距 离目标IP地址越近的中间网关,携带的TTL值也会越大。因此,在目标IP地址无法反馈响应数据包时,可以对获取的中间网关的超时数据包进行解析,并识别出TTL值最大的超时数据包。然后,可以计算该超时数据包与请求数据包之间的时间差,并将该时间差作为探测成功对应的往返时延。
在一个实施例中,发回TTL值最大的超时数据包的中间网关,可能距离目标IP地址也比较远,如果利用该超时数据包计算得到的时间差,不能准确地反应目标IP地址与探测装置之间的网络质量,因此,可以给TTL值设置一个指定存活时间阈值,该指定存储时间阈值可以作为TTL的下限值。如果超时数据包对应的存活时间大于或者等于该指定存活时间阈值,则表示该超时数据包是有效的数据包,此时可以按照上述的方案,计算所述超时数据包与所述请求数据包之间的时间差。而如果所述超时数据包对应的存活时间小于所述指定存活时间阈值,则表示发回超时数据包的中间网关距离目标IP地址过远,因此可以丢弃所述超时数据包,并利用下一个探测协议对所述目标IP地址进行探测。
在本实施例中,若按照优先级逐一利用各个探测协议均探测失败时,则表明本轮的探测协议组探测失败。此时,可以根据按参考追踪跳数的数值,判断是否对所述参考追踪跳数进行更新,以及判断是否结束针对所述目标IP地址的探测。
具体地,若当前的参考追踪跳数大于最小追踪跳数,则可以减小所述参考追踪跳数,并将减小后的追踪跳数作为下一轮探测的参考追踪跳数。其中,最小追踪跳数可以是网络质量探测过程中的经验值,例如该最小追踪跳数可以是6,那么如果当前的参考追踪跳数大于6,可以将当前的参考追踪跳数减1,并将得到的结果作为下一轮探测的参考追踪跳数。这样,下一轮探测过程中,可以按照上述的方案,逐一利用探测协议组中的各个探测协议对目标IP地址进行探测,如果依然探测失败,可以将更新后的参考追踪跳数与最小追踪跳数进行对比,以判断是否继续对参考追踪跳数进行更新,从而进行再下一轮的探测过程。
如果在探测协议组探测失败后,当前的参考追踪跳数小于或者等于最小追踪跳数,此时,可以判定所述目标IP地址探测失败,并结束针对所述目标IP地址的探测,该目标IP地址的往返时间(Round-Trip Time,RTT)值可以记录为异常值。
需要说明的是,传统的网络质量探测手段基本都是通过Linux下的PING命令对目标IP地址进行探测,每次探测都需要起用一个进程,对系统资源的消耗较大。同时,每次探测都是记录探测起始状态,并阻塞等待探测返回的响应数据包,探测效率低,不利于大批量探测。
而优化的探测技术方案,探测过程中发送请求数据包和接收响应数据包可以分离进行,各自由独立的模块负责,这将大大减少收发同步等待时间和内存读写锁等待时间,进而极大地提升了探测的效率。在探测过程中,计算RTT值所需要的标识、发包时间、TTL值及其他所需要的字段,都可以通过封装到协议包头和协议包体的方式记录,并在协议返回时解析获取。
在一个具体应用场景中,可以按照UDP、TCP以及ICMP的探测顺序进行探测。具体地,探测过程可如下所示。
1)UDP模式
探测机向目标IP地址发送UDP探测数据包。
当目标IP地址发回ICMP Destination Unreachable数据包,则计算ICMP Destination Unreachable数据包和UDP探测数据的时间差,该时间差即为往返时延RTT值。
当目标IP地址不响应ICMP Destination Unreachable数据包,则获取TTL值最大的中间网关发回的ICMP TTL超时数据包,并计算ICMP TTL超时数据包和UDP探测数据包的时间差,即为往返时延RTT值。
当最大的TTL值小于最新允许的TTL值,则丢弃对应的ICMP TTL超时数据包,并尝试其他协议。
2)TCP模式
探测机向目标IP地址发送TCP[SYN]探测数据包。
当目标IP地址发回TCP[SYN ACK]数据包,则计算TCP[SYN ACK]数据包和TCP[SYN]探测数据包的时间差,即为往返时延RTT值。
当目标IP地址不响应TCP[SYN ACK]数据包,则获取TTL值最大的中间网关发回的ICMP TTL超时数据包,并计算ICMP TTL超时数据包和TCP[SYN]探测数据包的时间差,即为往返时延RTT值。
当最大的TTL值小于最新允许的TTL值,则丢弃ICMP TTL超时数据包,并尝试其他协议。
3)ICMP模式
探测机向目标IP地址发送ICMP Echo Request探测数据包。
当目标IP地址发回ICMP Echo reply数据包,则计算ICMP Echo reply数据包和ICMP Echo Request探测数据包的时间差,即为往返时延RTT值。
当目标IP地址不响应ICMP Echo reply数据包,则获取TTL值最大的中间网关发回的ICMP TTL超时数据包,并计算ICMP TTL超时数据包和ICMP Echo Request探测数据包的时间差,即为往返时延RTT值。
当最大的TTL值小于最新允许的TTL值,则丢弃ICMP TTL超时数据包,并记录目标IP不可探测。
S5:分析系统接收各个所述探测机反馈的探测结果,为各个所述本地DNS服务器分别设定权威DNS服务器,以通过设定的所述权威DNS服务器处理所述本地DNS服务器发送的域名解析请求。
在本实施例中,针对每个本地DNS服务器,均可以通过上述的方式,得到各个探测机对应的探测结果,这些探测结果可以表征探测机与本地DNS服务器之间的通信质量。这些探测结果可以由各个探测机反馈给分析系统,也可以由探测系统对探测结果进行汇总后,一并发送给分析系统。在实际应用中,对于同一个本地DNS服务器,分析系统可以将各个探测机的探测结果从优到差进行排序,并根据排序结果筛选出排名靠前的一个或者多个探测机。
对于筛选出的探测机,可以认为探测机所在区域到本地DNS服务器的出口IP地址之间的通信质量较好,那么这些探测机所在区域的权威DNS服务器,后续就可以为本地DNS服务器提供域名解析服务。在实际应用中,可以确定各个筛选出的探测机所在区域的权威DNS服务器,并将这些权威DNS服务器的集合构建为候选权威DNS服务器列表。在该列表中,权威DNS服务器可以根据对应的探测机的探测结果进行排序,探测结果越好的权威DNS服务器,优先级也越高。
在一个实施例中,如果需要为当前的本地DNS服务器设定一个最优的权威DNS服务器,可以查询针对该本地DNS服务器的最优探测结果对应的目标探测机。然后可以将该目标探测机所在区域的权威DNS服务器设定为该本地DNS服务器对应的权威DNS服务器。
在为本地DNS服务器设定权威DNS服务器时,可以识别本地DNS服务器的所在区域以及支持的网络运营商,并获取设定的权威DNS服务器的IP地址,最终可以构建所述所在区域、网络运营商以及所述权威DNS服务器的IP地址之间的映射关系。举例来说,本地DNS服务器的所在区域是“福建”,网络运营商为“电信”,设定的权威DNS服务器的IP地址是“1.1.1.1”,那么可以构建“福建电信:1.1.1.1”这样的映射关系,从而通过IP地址为“1.1.1.1”的权威DNS服务器,为福建电信的本地DNS服务器提供服务。
当然,在候选权威DNS服务器列表中,可以按照优先级顺序,依次排列构建的映射关系,根据实际应用场景的需求,可以从该列表中选择一个映射关系来为本地DNS服务器提供服务。
在本实施例中,分析系统根据探测结果分析得到本地DNS服务器的候选权威DNS服务器列表后,可以将该列表发送至调度系统。后续,当顶级域名服务器接收到当前本地DNS服务器发来的查询请求后,可以先按照常规的方式,为当前本地DNS服务器指定一个权威DNS服务器,该指定的权威DNS服务器的IP地址便可以作为针对该当前的本地DNS服务器反馈的解析IP地址。然后, 顶级域名服务器可以将该解析IP地址发送至调度系统。调度系统接收到该解析IP地址之后,可以将该解析IP地址与为所述当前的本地DNS服务器设定的权威DNS服务器的IP地址进行比较。如果两者一致,那么调度系统可以通知顶级域名服务器,向该本地DNS服务器反馈解析IP地址。而如果两者不一致,调度系统可以利用为所述当前的本地DNS服务器设定的权威DNS服务器的IP地址替换所述解析IP地址,从而可以通过顶级域名服务器,将替换后的IP地址反馈给所述当前的本地DNS服务器。这样,通过NS调度系统的干预,可以使得顶级域名服务器能够根据探测机的探测结果,向本地DNS服务器提供通信质量较好的权威DNS服务器的解析IP地址。
在一个实施例中,探测机可以周期性地探测与本地DNS服务器之间的通信质量。当探测机与本地DNS服务器之间的网络发生波动,导致通信质量下降时,分析系统可以根据实时的探测结果,动态地调节为本地DNS服务器设定的权威DNS服务器。具体地,若目标探测机针对目标本地DNS服务器在当前时刻的探测结果表征网络异常时,那么可以推定该目标探测机所在区域的权威DNS服务器到目标本地DNS服务器之间的通信质量也可能变差。此时,分析系统可以查询所述目标探测机所在区域的目标权威DNS服务器,并在所述目标本地DNS服务器的候选权威DNS服务器列表中,将所述目标权威DNS服务器的优先级降低。其中,探测结果表征网络异常可以包含多种情况。例如,网络异常可以指目标探测机无法访问目标本地DNS服务器,或者目标探测机与目标本地DNS服务器之间的通信指标低于一个固定的阈值,或者比上一次的通信指标下降了一定的百分比等。这样,当出现网络异常的情况时,可以及时地将目标权威DNS服务器的优先级调低(例如可以将目标权威DNS服务器的优先级调到最低),从而根据调整优先级之后的候选权威DNS服务器列表,为目标本地DNS服务器重新设定最优的权威DNS服务器。通过这种动态调节的方式,能够及时地对公网网络的通信质量进行感知,并能够实现权威DNS服务器的动态调度,从而保证了域名解析过程的稳定性。
本申请还提供一种域名解析系统,所述系统包括调度系统、探测系统以及分析系统,其中:所述调度系统,用于接收各个本地DNS服务器发来的查询请求,并记录各个所述本地DNS服务器的出口IP地址,以生成待探测的IP地址列表,并将所述IP地址列表上报至所述探测系统;所述探测系统,用于将所述IP地址列表分发至各个探测机处,以通过各个所述探测机对所述IP地址列表中各个IP地址进行探测;所述分析系统,用于接收各个所述探测机反馈的探测结果,为各个所述本地DNS服务器分别设定权威DNS服务器,以通过设定的所述权威DNS服务器处理所述本地DNS服务器发送的域名解析请求。
由上可见,本申请一个或者多个实施例提供的技术方案,调度系统在接收到各个本地DNS服务器发来的查询请求时,可以记录这些本地DNS服务器的出口IP地址,通过记录的出口IP地址,可以生成待探测的IP地址列表。该IP地址列表可以被探测系统分发至各个探测机,这些探测机可以分布于不同的地理位置。每个探测机都可以针对IP地址列表中的IP地址进行探测,从而得到针对不同IP地址的探测结果。这些探测结果可以表征探测机到本地DNS服务器之间通信质量的好坏。分析系统通过对探测结果进行分析,从而可以确定出与本地DNS服务器通信质量最好的探测机,这样,根据该探测机所处的地理位置,分析系统便可以为本地DNS服务器设定对应的权威DNS服务器。按照探测结果设定的权威DNS服务器,可以保证与本地DNS服务器之间的通信质量较好。这样,利用分布于各个地理位置处的探测机对本地DNS服务器进行探测,并依据探测结果对本地DNS服务器的NS记录进行区域划分,能够提高NS记录区域划分的准确度,进而提高域名解析的效率。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,针对系统的实施例来说,均可以参照前述方法的实施例的介绍对照解释。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或 计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(如中央处理器(Central Processing Unit,CPU))、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(Random Access Memory,RAM)和/或非易失性内存等形式,如只读存储器(Read-Only Memory,ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由 任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(,Phase-change Random Access Memory,PRAM)、静态随机存取存储器(Static Random Access Memory,SRAM)、动态随机存取存储器(Dynamic Random Access Memory,DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、数字多功能光盘(Digital Versatile Disc,DVD)或其他光学存储、磁盒式磁带,磁带磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (15)

  1. 一种域名解析方法,应用于调度集群,包括:
    接收到本地域名系统DNS服务器的查询请求后,所述查询请求中包含本地DNS服务器的出口互联网协议IP地址,以通过探测机对所述本地DNS服务器的出口IP地址进行探测;
    向本地DNS服务器发送分析系统根据探测结果反馈的服务器设定信息,所述服务器设定信息中包括为所述本地DNS服务器设定的权威域名系统DNS服务器;
    其中,若所述服务器设定信息中的权威DNS服务器与所述本地DNS服务器当前采用的权威DNS服务器不一致,本地DNS服务器将所述当前采用的权威DNS服务器替换为所述服务器设定信息中的权威DNS服务器。
  2. 根据权利要求1所述的方法,还包括:
    调度系统接收各个本地DNS服务器发来的查询请求,并记录各个所述本地DNS服务器的出口IP地址,以生成待探测的IP地址列表,并将所述IP地址列表上报至探测系统;
    所述探测系统将所述IP地址列表分发至各个探测机处,以通过各个所述探测机对所述IP地址列表中各个IP地址进行探测;
    分析系统接收各个所述探测机反馈的探测结果,为各个所述本地DNS服务器分别设定权威DNS服务器,以通过设定的所述权威DNS服务器处理所述本地DNS服务器发送的域名解析请求。
  3. 根据权利要求2所述的方法,其中,生成待探测的IP地址列表包括:
    将各个所述本地DNS服务器的出口IP地址按照指定地址段进行归类,得到归类后的出口IP地址;
    为各类出口IP地址分配对应的服务区域标识,并将携带服务区域标识的各 类出口IP地址汇总为IP地址列表。
  4. 根据权利要求2所述的方法,其中,通过各个所述探测机对所述IP地址列表中各个IP地址进行探测包括:
    当针对目标IP地址的探测失败时,设置存活时间的参考追踪跳数;
    利用探测协议组对所述目标IP地址进行探测,若探测成功,记录对应的往返时延,并结束针对所述目标IP地址的探测;
    若所述探测协议组探测失败,判断是否对所述参考追踪跳数进行更新,以及判断是否结束针对所述目标IP地址的探测。
  5. 根据权利要求4所述的方法,其中,利用探测协议组对所述目标IP地址进行探测包括:
    基于所述探测协议组中当前的探测协议向所述目标IP地址发送请求数据包,若所述目标IP地址针对所述请求数据包反馈响应数据包,计算所述请求数据包和所述响应数据包之间的时间差,并将所述时间差作为探测成功对应的往返时延。
  6. 根据权利要求5所述的方法,其中,所述探测协议组中的探测协议包括用户数据报协议UDP,所述请求数据包为UDP探测数据包,所述响应数据包为互联网控制报文协议目标不可达ICMP Destination Unreachable数据包;
    所述探测协议组中的探测协议包括传输控制协议TCP,所述请求数据包为TCP SYN探测数据包,所述响应数据包为TCP ACK数据包;
    所述探测协议组中的探测协议包括互联网控制报文协议ICMP,所述请求数据包为互联网控制报文协议回应请求ICMP Echo Request探测数据包,所述响应数据包为互联网控制报文协议回应答复ICMP Echo reply数据包。
  7. 根据权利要求5所述的方法,还包括:
    若所述目标IP地址未针对所述请求数据包反馈响应数据包,获取中间网关发回的存活时间最大的超时数据包;
    计算所述超时数据包与所述请求数据包之间的时间差,并将所述时间差作为探测成功对应的往返时延。
  8. 根据权利要求7所述的方法,其中,在计算所述超时数据包与所述响应数据包之间的时间差之前,所述方法还包括:
    若所述超时数据包对应的存活时间大于或者等于指定存活时间阈值,计算所述超时数据包与所述请求数据包之间的时间差;
    若所述超时数据包对应的存活时间小于所述指定存活时间阈值,丢弃所述超时数据包,并利用下一个探测协议对所述目标IP地址进行探测。
  9. 根据权利要求4所述的方法,其中,判断是否对所述参考追踪跳数进行更新包括:
    若所述参考追踪跳数大于最小追踪跳数,减小所述参考追踪跳数,并将减小后的追踪跳数作为下一轮探测的参考追踪跳数。
  10. 根据权利要求4所述的方法,其中,判断是否结束针对所述目标IP地址的探测包括:
    若所述参考追踪跳数小于或者等于最小追踪跳数,判定所述目标IP地址探测失败,并结束针对所述目标IP地址的探测。
  11. 根据权利要求2所述的方法,其中,为各个所述本地DNS服务器分别设定权威DNS服务器包括:
    针对当前的本地DNS服务器,查询最优探测结果对应的目标探测机;
    将所述目标探测机所在区域的权威DNS服务器设定为所述当前的本地DNS服务器对应的权威DNS服务器。
  12. 根据权利要求2或11所述的方法,其中,为各个所述本地DNS服务器分别设定权威DNS服务器包括:
    识别本地DNS服务器的所在区域以及支持的网络运营商,并获取设定的权威DNS服务器的IP地址,构建所述所在区域、网络运营商以及所述权威DNS服务器的IP地址之间的映射关系。
  13. 根据权利要求2所述的方法,其中,通过设定的所述权威DNS服务器处理所述本地DNS服务器发送的域名解析请求包括:
    向调度系统发送针对当前的本地DNS服务器反馈的解析IP地址,以通过所述调度系统对比所述解析IP地址与为所述当前的本地DNS服务器设定的权威DNS服务器的IP地址;若两者不一致,利用为所述当前的本地DNS服务器设定的权威DNS服务器的IP地址替换所述解析IP地址,并将替换后的IP地址反馈给所述当前的本地DNS服务器。
  14. 根据权利要求2所述的方法,还包括:
    若目标探测机针对目标本地DNS服务器在当前时刻的探测结果表征网络异常时,查询所述目标探测机所在区域的目标权威DNS服务器,并在所述目标本地DNS服务器的候选权威DNS服务器列表中,将所述目标权威DNS服务器的优先级降低。
  15. 一种域名解析系统,包括调度系统、探测系统以及分析系统,其中:
    所述调度系统,用于接收各个本地域名系统DNS服务器发来的查询请求,并记录各个所述本地DNS服务器的出口互联网协议IP地址,以生成待探测的 IP地址列表,并将所述IP地址列表上报至所述探测系统;
    所述探测系统,用于将所述IP地址列表分发至各个探测机处,以通过各个所述探测机对所述IP地址列表中各个IP地址进行探测;
    所述分析系统,用于接收各个所述探测机反馈的探测结果,为各个所述本地DNS服务器分别设定权威域名系统DNS服务器,以通过设定的所述权威DNS服务器处理所述本地DNS服务器发送的域名解析请求。
PCT/CN2021/098481 2021-01-13 2021-06-04 一种域名解析方法及系统 WO2022151643A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP21887866.8A EP4072046A4 (en) 2021-01-13 2021-06-04 DOMAIN NAME RESOLUTION METHOD AND SYSTEM
US17/743,441 US11770320B2 (en) 2021-01-13 2022-05-12 Method and system for domain name resolution

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110042870.5A CN112769976B (zh) 2021-01-13 2021-01-13 一种域名解析方法及系统
CN202110042870.5 2021-01-13

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/743,441 Continuation US11770320B2 (en) 2021-01-13 2022-05-12 Method and system for domain name resolution

Publications (1)

Publication Number Publication Date
WO2022151643A1 true WO2022151643A1 (zh) 2022-07-21

Family

ID=75700186

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/098481 WO2022151643A1 (zh) 2021-01-13 2021-06-04 一种域名解析方法及系统

Country Status (4)

Country Link
US (1) US11770320B2 (zh)
EP (1) EP4072046A4 (zh)
CN (1) CN112769976B (zh)
WO (1) WO2022151643A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112769976B (zh) * 2021-01-13 2023-10-24 网宿科技股份有限公司 一种域名解析方法及系统
US11949578B2 (en) * 2021-01-14 2024-04-02 Zscaler, Inc. Adaptive probing to discover a protocol for network tracing
CN113382093B (zh) * 2021-05-14 2022-08-26 贵州白山云科技股份有限公司 域名解析的方法、电子装置以及系统
US11811638B2 (en) * 2021-07-15 2023-11-07 Juniper Networks, Inc. Adaptable software defined wide area network application-specific probing
CN114938373B (zh) * 2022-05-23 2023-11-03 睿云联(厦门)网络通讯技术有限公司 一种云平台tcp长连接服务的高可用连接方法及系统
CN115473870B (zh) * 2022-09-06 2024-05-10 中国电子信息产业集团有限公司第六研究所 顶级域名解析方法、系统、电子设备及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101656762A (zh) * 2009-09-10 2010-02-24 福建星网锐捷网络有限公司 域名服务器信息的发送方法、装置和系统
CN102932451A (zh) * 2012-10-31 2013-02-13 北龙中网(北京)科技有限责任公司 一种针对内容分发网络的解决系统
CN107360270A (zh) * 2017-07-24 2017-11-17 杭州迪普科技股份有限公司 一种dns解析的方法及装置
WO2019010694A1 (zh) * 2017-07-14 2019-01-17 深圳前海达闼云端智能科技有限公司 获取本地域名服务器地址的方法、装置和权威域名服务器
CN109347998A (zh) * 2018-12-27 2019-02-15 网宿科技股份有限公司 一种DNS出口服务器ip地址的探测方法及系统
CN111327495A (zh) * 2020-02-25 2020-06-23 网宿科技股份有限公司 一种访客ip服务区域探测方法及设备
CN112769976A (zh) * 2021-01-13 2021-05-07 网宿科技股份有限公司 一种域名解析方法及系统

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7886023B1 (en) * 2000-01-21 2011-02-08 Cisco Technology, Inc. Method and apparatus for a minimalist approach to implementing server selection
US20080288470A1 (en) * 2004-10-06 2008-11-20 France Telecom Method and System for Distributed Dns Resolution
US8214524B2 (en) * 2007-12-21 2012-07-03 Hostway Corporation System and method for selecting an optimal authoritative name server
CN103051740B (zh) * 2012-12-13 2016-04-20 上海牙木通讯技术有限公司 域名解析方法、dns服务器及域名解析系统
CN105262851B (zh) * 2015-09-16 2019-04-09 互联网域名系统北京市工程研究中心有限公司 一种基于多策略的dns转发方法及系统
US20170207989A1 (en) * 2016-01-14 2017-07-20 Dell Software Inc. Dynamic domain name system destination selection
CN107623751B (zh) * 2016-07-14 2021-02-12 网宿科技股份有限公司 Dns网络系统、域名解析方法及系统
CN107071078B (zh) * 2017-02-19 2019-05-10 网宿科技股份有限公司 域名解析系统、域名解析服务器和域名解析方法
CN106888277B (zh) * 2017-03-07 2023-02-14 腾讯科技(深圳)有限公司 一种域名查询方法及装置
CN109150561B (zh) * 2017-06-16 2021-07-20 贵州白山云科技股份有限公司 一种域名系统解析配置方法、装置和系统
US11032127B2 (en) * 2017-06-26 2021-06-08 Verisign, Inc. Resilient domain name service (DNS) resolution when an authoritative name server is unavailable
CN107395783B (zh) * 2017-07-25 2020-08-28 北京奇艺世纪科技有限公司 一种ip地址处理方法、系统、装置及电子设备
CN110474994A (zh) * 2018-05-10 2019-11-19 中国移动通信集团有限公司 域名解析方法、装置、电子设备和存储介质
US11949650B2 (en) * 2019-09-25 2024-04-02 Hughes Network Systems, Llc System and method for improving network performance when using secure DNS access schemes
CN111726428B (zh) * 2020-06-12 2023-09-22 网宿科技股份有限公司 一种权威服务器的选择方法、装置、设备及存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101656762A (zh) * 2009-09-10 2010-02-24 福建星网锐捷网络有限公司 域名服务器信息的发送方法、装置和系统
CN102932451A (zh) * 2012-10-31 2013-02-13 北龙中网(北京)科技有限责任公司 一种针对内容分发网络的解决系统
WO2019010694A1 (zh) * 2017-07-14 2019-01-17 深圳前海达闼云端智能科技有限公司 获取本地域名服务器地址的方法、装置和权威域名服务器
CN107360270A (zh) * 2017-07-24 2017-11-17 杭州迪普科技股份有限公司 一种dns解析的方法及装置
CN109347998A (zh) * 2018-12-27 2019-02-15 网宿科技股份有限公司 一种DNS出口服务器ip地址的探测方法及系统
CN111327495A (zh) * 2020-02-25 2020-06-23 网宿科技股份有限公司 一种访客ip服务区域探测方法及设备
CN112769976A (zh) * 2021-01-13 2021-05-07 网宿科技股份有限公司 一种域名解析方法及系统

Also Published As

Publication number Publication date
CN112769976A (zh) 2021-05-07
EP4072046A4 (en) 2023-01-11
US11770320B2 (en) 2023-09-26
US20220272019A1 (en) 2022-08-25
CN112769976B (zh) 2023-10-24
EP4072046A1 (en) 2022-10-12

Similar Documents

Publication Publication Date Title
WO2022151643A1 (zh) 一种域名解析方法及系统
WO2021203623A1 (zh) 一种物联网资源接入系统及资源接入方法
JP3270012B2 (ja) ネットワークサーバ負荷検出装置、割当装置および方法
US7996531B2 (en) Content delivery network map generation using passive measurement data
AU778459B2 (en) Method for high-performance delivery of web content
US20010049741A1 (en) Method and system for balancing load distribution on a wide area network
US20040044790A1 (en) Heuristics-based peer to peer message routing
CN101540775A (zh) 内容分发方法、装置与内容分发网络系统
JP2003256310A (ja) サーバ負荷分散システム、サーバ負荷分散装置、コンテンツ管理装置、及びサーバ負荷分散プログラム
CN103825975A (zh) Cdn节点分配服务器及系统
US20230362024A1 (en) Method of and a session management function for provisioning a user plane function, a method of and a user plane function for processing user traffic and a method of and charging function for charging user traffic
WO2022105048A1 (zh) 一种分布式共享文件系统及其数据处理方法
WO2017219873A1 (zh) Syn攻击域名定位方法和装置
CN109688229A (zh) 一种负载均衡集群下会话保持系统
WO2022206529A1 (zh) 一种资源请求处理的方法、装置、计算机设备及介质
CN107343012A (zh) 视频存储系统及其视频数据发送方法
US11622396B2 (en) Method and network node of setting up a wireless connection
JP5871908B2 (ja) ネットワーク内部のデータ通信を制御するための方法およびシステム
CN111797341B (zh) 一种基于可编程交换机的网内缓存方法
CN110380981B (zh) 一种流量分发方法及设备
CN113890849B (zh) 基于内容分发网络、去中心化的回源路由选择系统
JP3510623B2 (ja) ネットワークサーバ割当装置
CN113259492B (zh) 服务请求转发方法及系统
WO2022078330A1 (zh) 域名递归查询方法、装置、递归服务器以及dns系统
Tomic et al. Implementation and efficiency analysis of composite DNS-metric for dynamic server selection

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2021887866

Country of ref document: EP

Effective date: 20220509

NENP Non-entry into the national phase

Ref country code: DE