WO2021120355A1 - 一种域名解析方法、权威域名服务器和本地域名服务器 - Google Patents

一种域名解析方法、权威域名服务器和本地域名服务器 Download PDF

Info

Publication number
WO2021120355A1
WO2021120355A1 PCT/CN2020/071458 CN2020071458W WO2021120355A1 WO 2021120355 A1 WO2021120355 A1 WO 2021120355A1 CN 2020071458 W CN2020071458 W CN 2020071458W WO 2021120355 A1 WO2021120355 A1 WO 2021120355A1
Authority
WO
WIPO (PCT)
Prior art keywords
domain name
server
record
authoritative
target
Prior art date
Application number
PCT/CN2020/071458
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 网宿科技股份有限公司
Publication of WO2021120355A1 publication Critical patent/WO2021120355A1/zh

Links

Images

Classifications

    • 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/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]

Definitions

  • the invention relates to the field of Internet technology, in particular to a domain name resolution method, an authoritative domain name server and a local domain name server.
  • the local domain name server After the local domain name server receives the domain name access request sent by the user, it can generate a corresponding domain name resolution request for the domain name access request, and query the root server for the domain name resolution result of the corresponding domain name. According to the type of domain name to be resolved, the root server can feed back the information of the authoritative domain name server to the local domain name server. Subsequently, the local domain name server can obtain the corresponding domain name resolution result from the authoritative domain name server.
  • the authoritative domain name server currently providing services needs to be switched to another authoritative domain name server.
  • the authoritative domain name server often needs to switch between the authoritative domain name server after the time-to-live (TTL) of the record expires.
  • TTL time-to-live
  • the retention time of the authoritative domain name server is usually 1 to 2 days, so the switching process of the authoritative domain name server is very untimely, which will affect the user's domain name access experience.
  • the purpose of this application is to provide a domain name resolution method, an authoritative domain name server and a local domain name server, which can speed up the switching process of the authoritative domain name server.
  • this application provides a domain name resolution method, which is applied to an authoritative domain name server, and the method includes: receiving a domain name resolution request sent by a local domain name server, and the domain name resolution request includes a target The target subdomain name under the domain name; query the domain name resolution record of the target subdomain name in the domain name configuration information of the target domain name, and feed back the domain name resolution record obtained by the query to the local domain name server, so that the The local domain name server obtains the domain name resolution result of the target subdomain name according to the external authorized server pointed to by the domain name resolution record fed back.
  • the authoritative domain name server includes a processor and a memory.
  • the memory is used to store a computer program.
  • another aspect of this application also provides a domain name resolution method, the method is applied to a local domain name server, the method includes: sending a domain name resolution request to an authoritative domain name server, the domain name resolution request includes a target The target subdomain name under the domain name; receiving the domain name resolution record of the target subdomain name fed back by the authoritative domain name server, where the domain name resolution record points to an external authorization server authorized by the authoritative domain name server; sending to the external authorization server again The domain name resolution request is used to obtain the domain name resolution result of the target subdomain name through the external authorization server.
  • the local domain name server includes a processor and a memory.
  • the memory is used to store a computer program.
  • the technical solution provided by one or more implementations of this application can be included in the domain name configuration information of the target domain name after receiving the domain name resolution request sent by the local domain name server when the target domain name needs to switch the authoritative domain name server.
  • Query the domain name resolution record of the target subdomain name corresponding to the domain name resolution request and feed back the queried domain name resolution record to the local domain name server.
  • the local domain name server can continue to re-initiate a domain name resolution request to the switched external authorization server according to the received domain name resolution record, so that the corresponding domain name resolution result can be obtained smoothly.
  • Figure 1 is a schematic diagram of traditional domain name resolution
  • Fig. 2 is a schematic diagram of switching of an authoritative domain name server in an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a domain name resolution method executed by an authoritative domain name server in an embodiment of the present invention
  • FIG. 4 is a schematic diagram of the isolation of the attack and non-attack processes in the embodiment of the present invention.
  • FIG. 5 is a schematic diagram of the structure of an authoritative domain name server in an embodiment of the present invention.
  • Fig. 6 is a schematic diagram of a domain name resolution method executed by a local domain name server in an embodiment of the present invention.
  • the user client may be involved.
  • the domain name test1.com as an example, when registering the domain name, you can configure the authorization of the domain name as ns1.test1.com, and set the domain name resolution server of the domain name to ns1.test1.com2.2.2.2.
  • the .com server can be the upper server of the domain name test1.com, and the following information can be configured in the .com server:
  • the first line indicates that the authorization of the domain name test1.com is ns1.test1.com, and the retention time of the authorization record is 172800 seconds
  • the second line indicates that all domain names of test1.com can be in the domain name resolution server ns1.test1.com : Parsed in 2.2.2.2, and the retention time of the second line record is 86400 seconds.
  • the first line indicates that the domain name resolution result of the subdomain name a.test1.com under the test1.com domain name is a server with an IP address of 3.3.3.3
  • the second line indicates that the subdomain name b.test1.com under the test1.com domain name is b.test1.com.
  • the result of domain name resolution is a server with an IP address of 4.4.4.4, and the retention time of these two lines of records can both be 60 seconds.
  • the local domain name server When the local domain name server receives the domain name access request for a.test1.com from the user client, it can send the corresponding domain name resolution request to the root server. Then, the root server can feed back the record information of the .com server to the local domain name server and provide the IP address of the .com server. In this way, the local domain name server can then send the domain name resolution request to the .com server. After the .com server receives the domain name resolution request, it can feed back the above-mentioned configuration information to the local domain name server. The local domain name server can thus continue to send the domain name resolution request to the domain name resolution server ns1.test1.com:2.2.2.2. ns1.test1.com: The 2.2.2.2 server can also feed back the above two lines of records to the local domain name server. The local domain name server can finally feed back the domain name resolution result with the IP address of 3.3.3.3 to the user client.
  • the various information obtained by the local domain name server in the above process can be cached locally, and the effective duration of the cache is consistent with the retention duration of the record.
  • the local domain name server can send a domain name resolution request for the domain name test1.com to the ns1.test1.com:2.2.2.2 server in the next 86400 seconds, and if it receives a.test1 in the next 60 seconds
  • the domain name resolution result with the IP address of 3.3.3.3 or 4.4.4.4 can be directly fed back to the user client.
  • test1.com 172800 IN NS ns1.test1.com modified to test1.com 172800 IN NS ns1.ttes.com, ns1.ttes.com 86400 IN A 5.5.5.5, but in the same way, because of test1 .com 172800 IN NS1.test1.com is cached in the local domain name server, so you need to wait for 172800 seconds before you can switch normally. It can be seen that the server switching according to the traditional domain name resolution method will be very untimely.
  • an embodiment of the present application provides a domain name resolution method.
  • the domain name resolution server ns1.test1.com: 2.2.2.2 can also be used as an authoritative domain name server, but the authoritative domain name server is the next level authoritative domain name server of the .com server.
  • This application can improve the authoritative domain name server at the level of ns1.test1.com:2.2.2.2.
  • the authoritative domain name server mentioned below can all refer to the authoritative domain name server at the level of ns1.test1.com:2.2.2.2.
  • the domain name resolution method may include the following multiple steps.
  • the domain name configuration information of the target domain name can be generated, and the domain name configuration information includes the domain name resolution records of one or more subdomains under the target domain name, and the one or The domain name resolution records of multiple subdomains point to at least one external authorized server.
  • the target domain name to be adjusted may be a domain name that needs to be switched by an authoritative domain name server.
  • the domain name configuration information of the target domain name can be generated in the authoritative domain name server currently in use. Specifically, in the authoritative domain name server currently in use, there was originally an A record of each subdomain name under the target domain name. For example, for the target domain name test1.com, there are two subdomains of a.test1.com and b.test1.com under the target domain name, then the authoritative domain name server currently in use can originally have A as shown below recording:
  • the domain name configuration information of the target domain name can be generated in the authoritative domain name server currently in use.
  • the domain name configuration information may include domain name resolution records of one or more subdomains under the target domain name.
  • the domain name record contained under the target domain name can be identified, and the retention time and external authorization server can be set for the identified domain name record.
  • the target domain name test1.com has two subdomains, a.test1.com and b.test1.com
  • the retention time may refer to the valid duration of the generated domain name resolution record of the subdomain name
  • the external authorization server may refer to the switched authoritative domain name server, and the domain name resolution result of the subdomain name may be subsequently obtained from the external authorization server.
  • the domain name resolution record of each of the subdomain names can be generated. For example, for two subdomains of a.test1.com and b.test1.com, the following domain name resolution records can be generated:
  • the retention time of the domain name resolution records of the two subdomains, a.test1.com and b.test1.com can both be 86400 seconds, and the authoritative domain name server after switching is ns1.ttes.com.
  • the collection of each domain name resolution record can be used as the domain name configuration information of the target domain name.
  • the domain name configuration information of the target domain name can be used to replace the A record of the original subdomain name.
  • S11 Receive a domain name resolution request from a local domain name server, where the domain name resolution request includes a target subdomain name under the target domain name.
  • the currently used authoritative domain name server after receiving the domain name resolution request from the local domain name server, it can identify whether the domain name resolution request contains the domain name under the target domain name.
  • Target subdomain Wherein, the target subdomain name may refer to the subdomain name that needs to be switched by the authoritative domain name server. If included, the subsequent domain name resolution process can be performed according to the generated domain name configuration information of the target domain name. If the received domain name resolution request contains other subdomains that do not need to switch to an authoritative domain name server, you can follow the originally configured A record to feed back a.test2.com 60 IN A 6.6.6.6A record to the local domain name server.
  • the domain name resolution record of the target subdomain name can be queried in the domain name configuration information of the target domain name. Then, the domain name resolution record of the target subdomain obtained by the query can be fed back to the local domain name server.
  • the currently used authoritative domain name server receives a domain name resolution request from a.test1.com, it can feed back a domain name resolution record such as a.test1.com 86400 INNS1.ttes.com to the local domain name server.
  • the local domain name server can identify the external authorized server after receiving the domain name resolution record of the target subdomain name. Then, the local domain name server may send the domain name resolution request of the target subdomain name to the external authorization server. In the external authorization server, you can configure the A record of the target subdomain name.
  • the A record of the target subdomain name can be, for example:
  • the local domain name server can obtain the A record with the IP address of 7.7.7.7.
  • the above-mentioned technical solution can also be used to isolate domain name resolution requests that have attack behaviors.
  • the currently used authoritative domain name server is ns1.test1.com: 2.2.2.2
  • the authoritative domain name server can have one or more backup servers. These backup servers can initially be idle and do not directly provide domain name resolution results to the local domain name server. In these backup servers, the authoritative domain name server can be configured synchronously initially.
  • the A record For example, in Figure 4, the authoritative domain name server ns1.test1.com: 2.2.2.2 can have two backup servers. Initially, the A records in the authoritative domain name server can be configured synchronously in these two backup servers.
  • the authoritative domain name server When the authoritative domain name server receives the domain name resolution request sent by the local domain name server, it can judge whether the domain name resolution request has attack behavior according to the built-in network attack protection function. If there is no attack, the A record of the domain name resolution request can be provided to the local domain name server normally. And if the current domain name resolution request has attack behavior, you can enable the attack protection function to distinguish subdomains with attack behaviors and subdomains without attack behaviors, and isolate their respective access traffic. Specifically, if there is an attack behavior in the current domain name resolution request, the authoritative domain name server may use the domain name corresponding to the domain name resolution request as the target domain name to be adjusted. The domain name corresponding to the domain name resolution request mentioned here may be the domain name at the upper level of the subdomain name. For example, if the currently received domain name resolution request is for a.test1.com, then test1.com can be used as the target domain name to be adjusted.
  • the first type of subdomain name under the target domain name with attack behavior and the second type of subdomain name without attack behavior can be identified.
  • a.test1.com can be used as the first type of subdomain with offensive behavior
  • b.test1.com can be used as the second type of subdomain without offensive behavior.
  • different external authorization servers can be configured for the first type subdomain name and the second type subdomain name, so as to isolate the access traffic of the two types of subdomain names. For example, it is possible to configure a first backup server for subdomains that have attack behaviors, and configure a second backup server for subdomains that do not have attacks. Then, according to the configured external authorization server, corresponding domain name resolution records may be generated for the first type subdomain name and the second type subdomain name respectively, and the generated set of domain name resolution records may be used as the target domain name Domain name configuration information.
  • an authoritative domain name server can generate two types of domain name resolution records as shown below:
  • the domain name resolution traffic of the subdomain a.test1.com that has the offensive behavior will be directed to the backup server of dns3.test3.com, and the domain name resolution traffic of the subdomain b.test1.com that does not have the offensive behavior will be redirected. Be directed to the backup server of dns2.test2.com.
  • the first domain name resolution record and the second domain name resolution record can be used to replace the original configuration in the authoritative domain name server.
  • the A record of the subdomain name with the attack behavior may be configured in the first backup server, and the A record of the subdomain name without the attack behavior may be configured in the second backup server.
  • the information configured in the authoritative domain name server and the backup server is changed.
  • the authoritative domain name server and the backup server have synchronized A records of each subdomain name. After the attack occurs, for the target domain name that has the attack, the original A record is replaced with the domain name configuration information in the authoritative domain name server.
  • Different backup servers are also responsible for directing different domain name resolution traffic, so that the A records in some backup servers are replaced with the A records of the subdomains that have attack behavior, and the A records in the other backup servers are replaced with no attack.
  • the A record of the subdomain of the behavior is also responsible for directing different domain name resolution traffic, so that the A records in some backup servers are replaced with the A records of the subdomains that have attack behavior, and the A records in the other backup servers are replaced with no attack. The A record of the subdomain of the behavior.
  • domain name resolution records can be configured in the authoritative domain name server:
  • the domain name resolution request of the subdomain name with attack behavior will eventually be directed to the domain name resolution server with IP address 7.7.7.7, while the domain name resolution request of the subdomain name without attack behavior will eventually be directed to the IP address. It is located at the domain name resolution server of 6.6.6.6, so as to realize the mutual isolation of domain name resolution traffic.
  • the domain name resolution server with an IP address of 7.7.7.7 can be a domain name resolution server that is specifically anti-attack, so as to effectively process domain name resolution traffic that has attack behavior.
  • the A record of each sub-domain name under the current domain name can be configured in the authoritative domain name server, so that the authoritative domain name server sends the local domain name server to the local domain name server. Provide the A record of the current domain name.
  • each backup server of the authoritative domain name server can be placed in an idle state, and the A record configured in the authoritative domain name server can be synchronously configured in each backup server.
  • the authoritative domain name server will switch to isolate the domain name resolution traffic from each other.
  • the authoritative domain name server can judge the received domain name resolution request. If the domain name pointed to by the domain name resolution request requires an authoritative server switch, it can feed back external authorization information to the local domain name server in the above manner. If the domain name pointed to by the domain name resolution request does not need to be adjusted, the authoritative domain name server can directly feed back the stored A record to the local domain name server, so as to feed back the corresponding A record to the user client through the local domain name server.
  • An embodiment of the present application also provides an authoritative domain name server. Please refer to FIG. 5.
  • the authoritative domain name server includes a memory and a processor.
  • the memory is used to store a computer program.
  • the domain name resolution method executed by the above-mentioned authoritative domain name server can be realized.
  • This application also provides a domain name resolution method, which can be applied to a local domain name server. Please refer to Figure 6, the method may include the following multiple steps.
  • S21 Send a domain name resolution request to an authoritative domain name server, where the domain name resolution request includes the target subdomain name under the target domain name.
  • the local domain name server can store the records fed back by the root server, the upper-level authoritative domain name server (for example, .com server or .info server), and the lower-level authoritative domain name server (for example, the test1.com server in Figure 1) locally. , And each record is valid within the corresponding retention time. Once the corresponding retention time is exceeded, the record can be considered invalid. In this way, when the local domain name server receives the domain name access request sent by the user client, it can determine whether the A record of the domain name access request in the local domain name server has expired. Among them, the A record can be an A record such as a.test1.com 60 IN A 7.7.7.7 provided by a lower-level authoritative domain name server. The retention time of the A record is 60 seconds.
  • the A record When the A record has not expired, you can directly The A record is fed back to the user client as the domain name resolution result. If the A record expires, a domain name resolution request corresponding to the domain name access request can be generated, and the generated domain name resolution request can be sent to a lower-level authoritative domain name server. Since this solution can be improved for local domain name servers and subordinate authoritative domain name servers, for ease of description, the subordinate authoritative domain name servers can be referred to as authoritative domain name servers for short.
  • the following authoritative domain name servers can all refer to ns1.test1.com: 2.2 .2.2 Authoritative domain name servers at this level.
  • the local domain name server receives the domain name access request of the target subdomain name a.test1.com, if the A record of the request expires, the corresponding domain name resolution request can be generated and sent to the authoritative domain name server to the domain name Parse the request.
  • the authoritative domain name server after receiving the domain name resolution request from the local domain name server, the authoritative domain name server can feed back the domain name resolution record of the target subdomain name to the local domain name server according to the solutions in steps S11 to S15.
  • the domain name resolution record may include the duration of the domain name resolution record and the identifier of the external authorization server after the switch.
  • the retention duration may indicate the effective duration of the domain name resolution record.
  • the domain name resolution record can be stored in the local domain name server. Subsequently, if the local domain name server determines that the domain name resolution record has not expired according to the retention time length, it may send the domain name resolution request to the external authorization server again. If the domain name resolution record has expired, the local domain name server needs to obtain the corresponding domain name resolution record from the authorized domain name server again.
  • S25 Send the domain name resolution request to the external authorization server again, so as to obtain the domain name resolution result of the target subdomain name through the external authorization server.
  • the external authorization server can feed back the A record of the target subdomain name to the local domain name server.
  • the A record may be, for example, a.test1.com 60 IN A 7.7.7.7.
  • the local domain name server can finally obtain the domain name resolution result 7.7.7.7 of the target subdomain name from dns3.test3.com:3.3.3.3.
  • the A record fed back by the external authorization server may include the target subdomain name and the retention time of the A record.
  • the retention time is 60 seconds.
  • the local domain name server can store the A record locally, and when it receives a domain name access request pointing to the target subdomain name again, it can judge the A record according to the retention time in the A record Whether it has expired. If it has not expired, the stored A record can be directly fed back to the user client.
  • a domain name resolution request corresponding to the domain name access request can be generated, and the generated domain name resolution request can be sent to the authoritative domain name server, and the authorization information in the authoritative domain name server can be obtained, so that according to The external authorization server pointed to by the authorization information obtains the final domain name resolution result.
  • This application also provides a local domain name server, and the local domain name server includes:
  • a domain name resolution request sending unit configured to send a domain name resolution request to an authoritative domain name server, where the domain name resolution request includes the target subdomain name under the target domain name;
  • a domain name resolution record receiving unit configured to receive a domain name resolution record of the target subdomain that is fed back by the authoritative domain name server, where the domain name resolution record points to an external authorization server authorized by the authoritative domain name server;
  • the domain name resolution result receiving unit is configured to send the domain name resolution request to the external authorization server again, so as to obtain the domain name resolution result of the target subdomain name through the external authorization server.
  • the local domain name server includes a memory and a processor.
  • the memory is used to store a computer program.
  • the domain name executed by the local domain name server is realized. Analysis method.
  • the memory may include a physical device for storing information, which is usually digitized and then stored in a medium using electrical, magnetic, or optical methods.
  • the memory may also include: a device that uses electrical energy to store information, such as RAM or ROM, etc.; a device that uses magnetic energy to store information, such as hard disk, floppy disk, magnetic tape, magnetic core memory, bubble memory, or U disk; using optical mode A device that stores information, such as a CD or DVD.
  • a device that uses electrical energy to store information such as RAM or ROM, etc.
  • a device that uses magnetic energy to store information such as hard disk, floppy disk, magnetic tape, magnetic core memory, bubble memory, or U disk
  • optical mode A device that stores information such as a CD or DVD.
  • quantum memory or graphene memory there are other types of memory, such as quantum memory or graphene memory.
  • the processor can be implemented in any suitable manner.
  • the processor may take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program codes (for example, software or firmware) executable by the (micro)processor, logic gates, switches, special-purpose integrated Circuit (Application Specific Integrated Circuit, ASIC), programmable logic controller and embedded microcontroller form, etc.
  • program codes for example, software or firmware
  • the domain name configuration information of the target domain name can be generated in the current authoritative domain name server.
  • the domain name configuration information does not directly give the domain name resolution result of the target domain name, but contains the domain name resolution record of the subdomain name under the target domain name, and the domain name resolution record can point to the external authorized server after the switch.
  • the domain name resolution record of the target subdomain corresponding to the domain name resolution request can be queried in the domain name configuration information of the target domain name, and the queried domain name resolution record is fed back to the local domain name server.
  • the local domain name server can continue to re-initiate a domain name resolution request to the switched external authorization server according to the received domain name resolution record, so that the corresponding domain name resolution result can be obtained smoothly. It can be seen that the technical solutions provided in one or more implementation manners of this application can realize the switching process of the authoritative domain name server without waiting for the expiration of the retention time of the authoritative domain name server, thereby greatly speeding up the switching speed of the authoritative domain name server and improving User's domain name access experience.
  • the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention may adopt a form of a complete hardware implementation, a complete software implementation, or a combination of software and hardware implementations. Moreover, the present invention may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent 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 computer readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash memory
  • Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
  • the information can be computer-readable instructions, data structures, program modules, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), 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, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. According to the definition in this article, computer-readable media does not include transitory media, such as modulated data signals and carrier waves.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种域名解析方法、权威域名服务器和本地域名服务器,其中,所述方法包括:接收本地域名服务器发来的域名解析请求,所述域名解析请求中包括目标域名下的目标子域名(S11);在所述目标域名的域名配置信息中查询所述目标子域名的域名解析记录,并将查询得到的所述域名解析记录反馈给所述本地域名服务器,以使得所述本地域名服务器根据反馈的所述域名解析记录指向的外部授权服务器,获取所述目标子域名的域名解析结果(S13)。所述方法能够加快权威域名服务器的切换过程。

Description

一种域名解析方法、权威域名服务器和本地域名服务器 技术领域
本发明涉及互联网技术领域,特别涉及一种域名解析方法、权威域名服务器和本地域名服务器。
背景技术
在当前的域名解析过程中,本地域名服务器接收到用户发来的域名访问请求后,可以针对该域名访问请求生成对应的域名解析请求,并向根服务器查询对应域名的域名解析结果。根服务器根据待解析的域名类型,可以向本地域名服务器反馈权威域名服务器的信息。后续,本地域名服务器可以从权威域名服务器处获取到对应的域名解析结果。
在实际应用中,很有可能需要将当前提供服务的权威域名服务器切换为另一个权威域名服务器。通常而言,权威域名服务器往往需要在记录的存留时长(Time-To-Live,TTL)过期之后,才能实现权威域名服务器的切换。而权威域名服务器的存留时长通常为1至2天,因此导致权威域名服务器的切换过程非常不及时,进而会影响用户的域名访问体验。
发明内容
本申请的目的在于提供一种域名解析方法、权威域名服务器和本地域名服务器,能够加快权威域名服务器的切换过程。
为实现上述目的,本申请一方面提供一种域名解析方法,所述方法应用于权威域名服务器中,所述方法包括:接收本地域名服务器发来的域名解析请求,所述域名解析请求中包括目标域名下的目标子域名;在所述目标域名的域名配置信息中查询所述目标子域名的域名解析记录,并将查询得到的所述域名解析记录反馈给所述本地域名服务器,以使得所述本地域名服务器根据反馈的所述域名解析记录指向的外部授权服务器,获取所述目标子域名的域名解析结果。
为实现上述目的,本申请另一方面还提供一种权威域名服务器,所述权威 域名服务器包括处理器和存储器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现上述的域名解析方法。
为实现上述目的,本申请另一方面还提供一种域名解析方法,所述方法应用于本地域名服务器中,所述方法包括:向权威域名服务器发送域名解析请求,所述域名解析请求中包括目标域名下的目标子域名;接收所述权威域名服务器反馈的所述目标子域名的域名解析记录,所述域名解析记录指向所述权威域名服务器授权的外部授权服务器;向所述外部授权服务器再次发送所述域名解析请求,以通过所述外部授权服务器获取所述目标子域名的域名解析结果。
为实现上述目的,本申请另一方面还提供一种本地域名服务器,所述本地域名服务器包括处理器和存储器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现上述的域名解析方法。
由上可见,本申请一个或者多个实施方式提供的技术方案,当目标域名需要切换权威域名服务器时,在接收到本地域名服务器发来的域名解析请求后,可以在目标域名的域名配置信息中查询该域名解析请求对应的目标子域名的域名解析记录,并将查询到的域名解析记录反馈给本地域名服务器。这样,本地域名服务器根据接收到的域名解析记录,可以继续向切换后的外部授权服务器再次发起域名解析请求,从而可以顺利地获取到对应的域名解析结果。可见,本申请一个或者多个实施方式中提供的技术方案,无需等待权威域名服务器的存留时长过期,便可以实现权威域名服务器的切换过程,从而极大地加快了权威域名服务器的切换速度,提高了用户的域名访问体验。
附图说明
为了更清楚地说明本发明实施方式中的技术方案,下面将对实施方式描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是传统域名解析的示意图;
图2是本发明实施方式中权威域名服务器的切换示意图;
图3是本发明实施方式中权威域名服务器执行的域名解析方法示意图;
图4是本发明实施方式中攻击和非攻击流程的隔离示意图;
图5是本发明实施方式中权威域名服务器的结构示意图;
图6是本发明实施方式中本地域名服务器执行的域名解析方法示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施方式及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施方式仅是本申请一部分实施方式,而不是全部的实施方式。基于本申请中的实施方式,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施方式,都属于本申请保护的范围。
请参阅图1,传统的域名解析过程中,可以涉及用户客户端、本地域名服务器、根服务器、权威域名服务器以及权威域名服务器的下一级域名解析服务器。其中,以域名test1.com为例,在注册该域名时,可以配置该域名的授权为ns1.test1.com,并且将该域名的域名解析服务器设置为ns1.test1.com2.2.2.2。在这种情况下,.com服务器可以是域名test1.com的上层服务器,在该.com服务器中,可以配置如下信息:
test1.com 172800 IN NS ns1.test1.com
ns1.test1.com 86400 IN A 2.2.2.2
其中,第一行表示域名test1.com的授权为ns1.test1.com,并且该授权记录的存留时长为172800秒,第二行表示test1.com的所有域名可以在域名解析服务器ns1.test1.com:2.2.2.2中进行解析,并且第二行记录的存留时长为86400秒。
此外,还可以在域名解析服务器ns1.test1.com:2.2.2.2中配置如下记录:
a.test1.com 60 IN A 3.3.3.3
b.test1.com 60 IN A 4.4.4.4
其中,第一行表示test1.com域名下的子域名a.test1.com的域名解析结果为IP地址为3.3.3.3的服务器,第二行表示test1.com域名下的子域名b.test1.com的域名解析结果为IP地址为4.4.4.4的服务器,这两行记录的存留时长均可以为60秒。
当本地域名服务器接收到用户客户端发来的针对a.test1.com的域名访问 请求时,可以向根服务器发送对应的域名解析请求。然后,根服务器可以向本地域名服务器反馈.com服务器的记录信息,并提供.com服务器的IP地址。这样,本地域名服务器进而可以向.com服务器发送该域名解析请求。.com服务器接收到该域名解析请求后,可以将上述配置的信息反馈给本地域名服务器。本地域名服务器从而可以继续向域名解析服务器ns1.test1.com:2.2.2.2发送该域名解析请求。ns1.test1.com:2.2.2.2服务器同样可以将上述的两行记录反馈给本地域名服务器。本地域名服务器最终可以将IP地址为3.3.3.3的域名解析结果反馈给用户客户端。
在实际应用中,上述过程中本地域名服务器获取到的各项信息,都可以在本地进行缓存,并且缓存的有效时长与记录的存留时长保持一致。例如,本地域名服务器可以在接下来的86400秒内,都向ns1.test1.com:2.2.2.2服务器发送域名test1.com的域名解析请求,并且如果在接下来的60秒内接收到a.test1.com或者b.test1.com的域名解析请求,可以直接将IP地址为3.3.3.3或者4.4.4.4的域名解析结果反馈给用户客户端。
请参阅图2,在上述传统的域名解析过程中,如果需要test1.com的权威服务器从2.2.2.2切换为5.5.5.5,可以具备两种方法。一种是调整域名解析服务器的IP地址,将ns1.test1.com:2.2.2.2调整为ns1.ttes.com:5.5.5.5。但是,由于ns1.test1.com 86400 IN A 2.2.2.2在本地域名服务器中已经进行了缓存,因此只有当86400秒的存留时长过期后,才能正常进行切换。另一种方式是授权信息test1.com 172800 IN NS ns1.test1.com修改为test1.com 172800 IN NS ns1.ttes.com,ns1.ttes.com 86400 IN A 5.5.5.5,但同样地,由于test1.com 172800 IN NS ns1.test1.com在本地域名服务器中进行了缓存,因此需要等待172800秒后才能正常切换。可见,依照传统域名解析的方式来进行服务器切换时会非常不及时。
鉴于此,本申请一个实施方式中提供了一种域名解析方法。在图1中,域名解析服务器ns1.test1.com:2.2.2.2也可以作为权威域名服务器,只不过该权威域名服务器是.com服务器的下一级权威域名服务器。本申请可以对ns1.test1.com:2.2.2.2这一层级的权威域名服务器进行改进,下文涉及的权威域名服务器,均可以指ns1.test1.com:2.2.2.2这一层级的权威域名服务器。具体地,请参阅图3,该域名解析方法可以包括以下多个步骤。
在本实施方式中,针对待调整的目标域名,可以生成所述目标域名的域名配置信息,所述域名配置信息中包括所述目标域名下一个或者多个子域名的域名解析记录,所述一个或者多个子域名的域名解析记录指向至少一个外部授权服务器。所述待调整的目标域名可以是需要进行权威域名服务器切换的域名。针对所述目标域名,可以在当前使用的权威域名服务器中生成该目标域名的域名配置信息。具体地,在当前使用的权威域名服务器中,原先是具备该目标域名下各个子域名的A记录。例如,对于目标域名test1.com而言,在该目标域名下具备a.test1.com和b.test1.com两个子域名,那么在当前使用的权威域名服务器中,原先可以具备如下所示的A记录:
a.test1.com 60 IN A 3.3.3.3
b.test1.com 60 IN A 4.4.4.4
此时,为了实现权威域名服务器的快速切换,可以在当前使用的权威域名服务器中生成目标域名的域名配置信息。该域名配置信息中,可以包括目标域名下一个或者多个子域名的域名解析记录。
具体地,在生成子域名的域名解析记录时,首先可以识别目标域名下包含的域名记录,并为识别到的域名记录设置存留时长和外部授权服务器。举例来说,目标域名test1.com下具备a.test1.com和b.test1.com两个子域名,那么针对每个子域名,可以设置各自的存留时长和外部授权服务器。其中,存留时长可以指生成的子域名的域名解析记录的有效时长,外部授权服务器可以指切换后的权威域名服务器,后续便可以从该外部授权服务器处获取子域名的域名解析结果。根据设置的所述存留时长和所述外部授权服务器,便可以生成各个所述子域名的域名解析记录。例如,针对a.test1.com和b.test1.com两个子域名,可以生成如下所示的域名解析记录:
a.test1.com 86400 IN NS ns1.ttes.com
b.test1.com 86400 IN NS ns1.ttes.com
ns1.ttes.com 7200 IN A 5.5.5.5
其中,a.test1.com和b.test1.com这两个子域名的域名解析记录的存留时长均可以为86400秒,并且切换后的权威域名服务器为ns1.ttes.com。
在生成各个子域名的域名解析记录之后,便可以将各个域名解析记录的集合作为目标域名的域名配置信息。
在本实施方式中,在生成目标域名的域名配置信息后,便可以利用该域名配置信息替换原先的子域名的A记录。
S11:接收本地域名服务器发来的域名解析请求,所述域名解析请求中包括目标域名下的目标子域名。
在本实施方式中,当前使用的权威域名服务器在生成了目标域名的域名配置信息后,当接收到本地域名服务器发来的域名解析请求后,可以识别该域名解析请求中是否包含目标域名下的目标子域名。其中,该目标子域名可以指需要进行权威域名服务器切换的子域名。若包含,则可以按照生成的目标域名的域名配置信息进行后续的域名解析流程。若接收到的域名解析请求中是其它不需要进行权威域名服务器切换的子域名,则可以按照原先配置的A记录,向本地域名服务器反馈a.test2.com 60 IN A 6.6.6.6A记录。
S13:在所述目标域名的域名配置信息中查询所述目标子域名的域名解析记录,并将查询得到的所述域名解析记录反馈给所述本地域名服务器,以使得所述本地域名服务器根据反馈的所述域名解析记录指向的外部授权服务器,获取所述目标子域名的域名解析结果。
在本实施方式中,当本地域名服务器发来的域名解析请求中包含目标域名下的目标子域名时,可以在目标域名的域名配置信息中查询该目标子域名的域名解析记录。然后可以将查询得到的目标子域名的域名解析记录反馈给本地域名服务器。例如,当前使用的权威域名服务器在接收到a.test1.com的域名解析请求时,可以将a.test1.com 86400 IN NS ns1.ttes.com这样的域名解析记录反馈给本地域名服务器。
在本实施方式中,本地域名服务器在接收到目标子域名的域名解析记录后,可以识别其中的外部授权服务器。然后,本地域名服务器可以将目标子域名的域名解析请求发送至该外部授权服务器。在该外部授权服务器中,可以配置目标子域名的A记录。该目标子域名的A记录例如可以是:
a.test1.com 60 IN A 7.7.7.7
这样,本地域名服务器便可以根据获取到的IP地址为7.7.7.7的A记录。
在一个实施方式中,上述的技术方案还可以用于隔离存在攻击行为的域名解析请求。具体地,请参阅图4,假设当前正常使用的权威域名服务器是ns1.test1.com:2.2.2.2,在该权威域名服务器中,一开始可以配置各个子域 名的A记录。该权威域名服务器可以具备一个或者多个备用服务器,这些备用服务器最初都可以处于空闲状态,并不直接向本地域名服务器提供域名解析结果,并且在这些备用服务器中,最初可以同步配置权威域名服务器中的A记录。例如在图4中,权威域名服务器ns1.test1.com:2.2.2.2可以具备两个备用服务器。在最初时,这两个备用服务器中可以同步配置权威域名服务器中的A记录。
当该权威域名服务器接收到本地域名服务器发来的域名解析请求时,可以按照内置的网络攻击防护功能,判断该域名解析请求是否存在攻击行为。如果不存在攻击行为,则可以正常地向本地域名服务器提供域名解析请求的A记录。而如果当前的域名解析请求存在攻击行为,则可以启用攻击防护功能,将存在攻击行为的子域名和不存在攻击行为的子域名进行区分,并将各自的访问流量进行隔离。具体地,如果当前的域名解析请求存在攻击行为,那么权威域名服务器可以将该域名解析请求对应的域名作为待调整的目标域名。这里所述的域名解析请求对应的域名,可以是子域名上一级的域名。例如,当前接收到的域名解析请求是针对a.test1.com的,那么可以将test1.com作为待调整的目标域名。
在本实施方式中,在确定出待调整的目标域名后,可以识别该目标域名下存在攻击行为的第一类子域名和不存在攻击行为的第二类子域名。例如,对于目标域名test1.com而言,a.test1.com可以作为存在攻击行为的第一类子域名,而b.test1.com可以作为不存在攻击行为的第二类子域名。在对攻击行为进行区分后,可以分别为所述第一类子域名和所述第二类子域名配置不同的外部授权服务器,从而将这两类子域名的访问流量进行隔离。例如,可以为存在攻击行为的子域名配置第一备用服务器,而为不存在攻击行为的子域名配置第二备用服务器。然后,可以根据配置的外部授权服务器,分别为所述第一类子域名和所述第二类子域名生成对应的域名解析记录,并将生成的所述域名解析记录的集合作为所述目标域名的域名配置信息。
具体地,可以为存在攻击行为的子域名生成指向第一备用服务器的第一域名解析记录,以及为不存在攻击行为的子域名生成指向第二备用服务器的第二域名解析记录。举例来说,权威域名服务器可以生成如下所示的两种域名解析记录:
a.test1.com 86400 IN NS dns3.test3.com
dns3.test3.com 7200 IN A 7.7.7.7
b.test1.com 86400 IN NS dns2.test2.com
dns2.test2.com 7200 IN A 6.6.6.6
这样,存在攻击行为的子域名a.test1.com的域名解析流量便会被引导至dns3.test3.com的备用服务器,而不存在攻击行为的子域名b.test1.com的域名解析流量便会被引导至dns2.test2.com的备用服务器。
在本实施方式中,在生成了第一域名解析记录和第二域名解析记录之后,便可以利用所述第一域名解析记录和所述第二域名解析记录替换所述权威域名服务器中原先配置的A记录。同时,可以在所述第一备用服务器中配置所述存在攻击行为的子域名的A记录,以及在所述第二备用服务器中配置所述不存在攻击行为的子域名的A记录。这样,当攻击行为发生之后,权威域名服务器以及备用服务器中配置的信息都发生了改变。具体地,在攻击行为发生之前,权威域名服务器和备用服务器中同步配置了各个子域名的A记录。而在攻击行为发生后,对于存在攻击行为的目标域名而言,在权威域名服务器中将原先的A记录替换为了域名配置信息。不同的备用服务器也负责引导不同的域名解析流量,从而使得一部分备用服务器中的A记录被替换为存在攻击行为的子域名的A记录,而另一部分备用服务器中的A记录被替换为不存在攻击行为的子域名的A记录。
在一个实际应用场景中,可以在权威域名服务器中配置如下所示的域名解析记录:
a.test1.com 86400 IN NS dns3.test3.com
dns3.test3.com 7200 IN A 7.7.7.7
b.test1.com 86400 IN NS dns2.test2.com
dns2.test2.com 7200 IN A 6.6.6.6
然后,在备用服务器dns3.test3.com中可以配置如下所示的A记录:
a.test1.com 60 IN A 3.3.3.3
并且在备用服务器dns2.test2.com中可以配置如下所示的A记录:
b.test1.com 60 IN A 4.4.4.4
这样,存在攻击行为的子域名的域名解析请求,最终会被引导至IP地址为 7.7.7.7的域名解析服务器处,而不存在攻击行为的子域名的域名解析请求,最终会被引导至IP地址为6.6.6.6的域名解析服务器处,从而实现域名解析流量的相互隔离。其中,IP地址为7.7.7.7的域名解析服务器可以是专门防攻击的域名解析服务器,从而有效地对存在攻击行为的域名解析流量进行处理。
由上可见,若当前域名下的各个子域名均不存在攻击行为,在所述权威域名服务器中可以配置所述当前域名下各个子域名的A记录,从而通过所述权威域名服务器向本地域名服务器提供所述当前域名的A记录。同时,权威域名服务器的各个备用服务器可以置于空闲状态,并且可以将所述权威域名服务器中配置的A记录同步配置于各个备用服务器中。但是一旦发生攻击行为后,权威域名服务器便会进行切换,从而实现域名解析流量的相互隔离。
需要说明的是,权威域名服务器可以对接收到的域名解析请求进行判断,如果域名解析请求指向的域名需要进行权威服务器切换,那么可以按照上述方式向本地域名服务器反馈外部授权信息。而如果域名解析请求指向的域名无需进行调整,那么权威域名服务器可以直接将存储的A记录反馈给本地域名服务器,从而通过本地域名服务器向用户客户端反馈对应的A记录。
本申请一个实施方式还提供一种权威域名服务器,请参阅图5,所述权威域名服务器包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,可以实现上述权威域名服务器执行的域名解析方法。
本申请还提供一种域名解析方法,该方法可以应用于本地域名服务器中。请参阅图6,该方法可以包括以下多个步骤。
S21:向权威域名服务器发送域名解析请求,所述域名解析请求中包括目标域名下的目标子域名。
在本实施方式中,本地域名服务器可以将根服务器、上级权威域名服务器(例如.com服务器或者.info服务器)以及下级权威域名服务器(例如图1中的test1.com服务器)反馈的记录存储于本地,并且每种记录在对应的存留时长内都是有效的,一旦超过对应的存留时长,则可以认为记录失效。这样,当本地域名服务器接收到用户客户端发来的域名访问请求时,可以判断所述域名访问请求在本地域名服务器中的A记录是否过期。其中,该A记录可以是下级权威域名服务器提供的诸如a.test1.com 60 IN A 7.7.7.7这样的A记录,该A记录的存留时长为60秒,当该A记录未过期时,可以直接将A记录作为域名解 析结果反馈给用户客户端。而如果该A记录过期了,则可以生成所述域名访问请求对应的域名解析请求,并向下级权威域名服务器发送生成的所述域名解析请求。由于本方案可以针对本地域名服务器和下级权威域名服务器进行改进,因此为了便于描述,可以将下级权威域名服务器简称为权威域名服务器,以下涉及的权威域名服务器,均可以指ns1.test1.com:2.2.2.2这一层级的权威域名服务器。
在本实施方式中,本地域名服务器接收到目标子域名a.test1.com的域名访问请求后,若该请求的A记录过期,则可以生成对应的域名解析请求,并向权威域名服务器发送给域名解析请求。
S23:接收所述权威域名服务器反馈的所述目标子域名的域名解析记录,所述域名解析记录指向所述权威域名服务器授权的外部授权服务器。
在本实施方式中,权威域名服务器在接收到本地域名服务器发来的域名解析请求后,可以按照步骤S11至S15中的方案,向本地域名服务器反馈目标子域名的域名解析记录。
具体地,在该域名解析记录中,可以包括域名解析记录的存留时长和切换后的外部授权服务器的标识。该存留时长可以表示域名解析记录的有效时长。该域名解析记录可以存储于本地域名服务器中。后续,若本地域名服务器根据所述存留时长判定所述域名解析记录未过期,则可以向所述外部授权服务器再次发送所述域名解析请求。而如果该域名解析记录已过期,本地域名服务器则需要重新从授权域名服务器处获取对应的域名解析记录。
S25:向所述外部授权服务器再次发送所述域名解析请求,以通过所述外部授权服务器获取所述目标子域名的域名解析结果。
在本实施方式中,本地域名服务器根据接收到的域名解析记录,向外部授权服务器再次发送域名解析请求后,外部授权服务器可以向本地域名服务器反馈目标子域名的A记录。该A记录例如可以是a.test1.com 60 IN A 7.7.7.7。这样,假设外部授权服务器为dns3.test3.com:3.3.3.3,那么本地域名服务器最终便可以从dns3.test3.com:3.3.3.3处获取到目标子域名的域名解析结果7.7.7.7。
在本实施方式中,在外部授权服务器反馈的A记录中,可以包括目标子域名和所述A记录的存留时长。例如,a.test1.com 60 IN A 7.7.7.7中,存留时 长为60秒。本地域名服务器接收到该A记录后,可以在本地存储该A记录,并且当再次接收到指向所述目标子域名的域名访问请求时,可以根据所述A记录中的存留时长判断所述A记录是否过期。如果未过期,则可以直接将存储的A记录反馈给用户客户端。而如果A记录已过期,则可以生成所述域名访问请求对应的域名解析请求,并向所述权威域名服务器发送生成的所述域名解析请求,可以获取到权威域名服务器中的授权信息,从而根据该授权信息指向的外部授权服务器获取最终的域名解析结果。
通过以上的技术方案可见,在传统的域名解析过程中,当权威服务器需要切换时,至少需要等待86400秒后才能完成切换。而采用本申请的技术方案,在权威域名服务器中可以将A记录替换为指向外部授权服务器的域名解析记录,只需要等到本地域名服务器中的A记录失效后(60秒的存留时长),便可以实现从权威域名服务器切换至外部授权服务器,极大地减少了切换权威域名服务器所需的时间。
本申请还提供一种本地域名服务器,所述本地域名服务器包括:
域名解析请求发送单元,用于向权威域名服务器发送域名解析请求,所述域名解析请求中包括目标域名下的目标子域名;
域名解析记录接收单元,用于接收所述权威域名服务器反馈的所述目标子域名的域名解析记录,所述域名解析记录指向所述权威域名服务器授权的外部授权服务器;
域名解析结果接收单元,用于向所述外部授权服务器再次发送所述域名解析请求,以通过所述外部授权服务器获取所述目标子域名的域名解析结果。
本申请还提供一种本地域名服务器,所述本地域名服务器包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现上述本地域名服务器执行的域名解析方法。
在本申请中,所述存储器可以包括用于存储信息的物理装置,通常是将信息数字化后再以利用电、磁或者光学等方法的媒体加以存储。所述存储器又可以包括:利用电能方式存储信息的装置,如RAM或ROM等;利用磁能方式存储信息的装置,如硬盘、软盘、磁带、磁芯存储器、磁泡存储器或U盘;利用光学方式存储信息的装置,如CD或DVD。当然,还有其他方式的存储器,例如量子存储器或石墨烯存储器等等。
在本申请中,所述处理器可以按任何适当的方式实现。例如,所述处理器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式等等。
由上可见,本申请一个或者多个实施方式提供的技术方案,当目标域名需要切换权威域名服务器时,可以在当前的权威域名服务器中生成目标域名的域名配置信息。该域名配置信息并非直接给出目标域名的域名解析结果,而是包含该目标域名下子域名的域名解析记录,该域名解析记录可以指向切换后的外部授权服务器。在接收到本地域名服务器发来的域名解析请求后,可以在目标域名的域名配置信息中查询该域名解析请求对应的目标子域名的域名解析记录,并将查询到的域名解析记录反馈给本地域名服务器。这样,本地域名服务器根据接收到的域名解析记录,可以继续向切换后的外部授权服务器再次发起域名解析请求,从而可以顺利地获取到对应的域名解析结果。可见,本申请一个或者多个实施方式中提供的技术方案,无需等待权威域名服务器的存留时长过期,便可以实现权威域名服务器的切换过程,从而极大地加快了权威域名服务器的切换速度,提高了用户的域名访问体验。
本说明书中的各个实施方式均采用递进的方式描述,各个实施方式之间相同相似的部分互相参见即可,每个实施方式重点说明的都是与其他实施方式的不同之处。尤其,针对系统和设备的实施方式来说,均可以参照前述方法的实施方式的介绍对照解释。
本领域内的技术人员应明白,本发明的实施方式可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施方式、完全软件实施方式、或结合软件和硬件方面的实施方式的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施方式的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处 理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句 “包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
以上所述仅为本申请的实施方式而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (13)

  1. 一种域名解析方法,其特征在于,所述方法应用于权威域名服务器中,所述方法包括:
    接收本地域名服务器发来的域名解析请求,所述域名解析请求中包括目标域名下的目标子域名;
    在所述目标域名的域名配置信息中查询所述目标子域名的域名解析记录,并将查询得到的所述域名解析记录反馈给所述本地域名服务器,以使得所述本地域名服务器根据反馈的所述域名解析记录指向的外部授权服务器,获取所述目标子域名的域名解析结果。
  2. 根据权利要求1所述的方法,其特征在于,在接收本地域名服务器发来的域名解析请求之后,所述方法还包括:
    判断所述域名解析请求对应的目标域名是否需要切换权威域名服务器,若需要切换,生成所述目标域名的域名配置信息,所述域名配置信息中包括所述目标域名下一个或者多个子域名的域名解析记录,所述一个或者多个子域名的域名解析记录指向至少一个外部授权服务器;
    若不需要切换权威域名服务器,向所述本地域名服务器反馈所述域名解析请求对应的A记录。
  3. 根据权利要求2所述的方法,其特征在于,生成所述目标域名的域名配置信息包括:
    识别所述目标域名下包含的子域名,并为各个所述子域名设置存留时长和外部授权服务器;
    根据设置的所述存留时长和所述外部授权服务器,生成各个所述子域名的域名解析记录,并将各个所述域名解析记录的集合作为所述目标域名的域名配置信息。
  4. 根据权利要求2所述的方法,其特征在于,判断所述域名解析请求对应的目标域名是否需要切换权威域名服务器包括:
    在接收到本地域名服务器发来的域名解析请求时,判断所述域名解析请求是否存在攻击行为;若存在攻击行为,判定所述域名解析请求对应的目标域名需要切换权威域名服务器。
  5. 根据权利要求2或4所述的方法,其特征在于,生成所述目标域名的域名配置信息包括:
    识别所述目标域名下存在攻击行为的第一类子域名和不存在攻击行为的第二类子域名,并分别为所述第一类子域名和所述第二类子域名配置不同的外部授权服务器;
    根据配置的外部授权服务器,分别为所述第一类子域名和所述第二类子域名生成对应的域名解析记录,并将生成的所述域名解析记录的集合作为所述目标域名的域名配置信息。
  6. 根据权利要求1所述的方法,其特征在于,所述权威域名服务器具备一个或者多个备用服务器;所述方法还包括:
    若当前域名下的各个子域名均不存在攻击行为,在所述权威域名服务器中配置所述当前域名下各个子域名的A记录,以通过所述权威域名服务器向本地域名服务器提供所述当前域名的A记录;并且将所述备用服务器置于空闲状态,以及将所述权威域名服务器中配置的A记录同步配置于所述备用服务器中。
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:
    若所述当前域名下的子域名存在攻击行为,为存在攻击行为的子域名生成指向第一备用服务器的第一域名解析记录,以及为不存在攻击行为的子域名生成指向第二备用服务器的第二域名解析记录;
    利用所述第一域名解析记录和所述第二域名解析记录替换所述权威域名服务器中的A记录,并在所述第一备用服务器中配置所述存在攻击行为的子域名的A记录,以及在所述第二备用服务器中配置所述不存在攻击行为的子域名的A记录。
  8. 一种权威域名服务器,其特征在于,所述权威域名服务器包括存储器和 处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现如权利要求1至7中任一所述的方法。
  9. 一种域名解析方法,其特征在于,所述方法应用于本地域名服务器中,所述方法包括:
    向权威域名服务器发送域名解析请求,所述域名解析请求中包括目标域名下的目标子域名;
    接收所述权威域名服务器反馈的所述目标子域名的域名解析记录,所述域名解析记录指向所述权威域名服务器授权的外部授权服务器;
    向所述外部授权服务器再次发送所述域名解析请求,以通过所述外部授权服务器获取所述目标子域名的域名解析结果。
  10. 根据权利要求9所述的方法,其特征在于,向权威域名服务器发送域名解析请求之前,所述方法还包括:
    接收用户客户端发来的域名访问请求,并判断所述域名访问请求在所述本地域名服务器中的A记录是否过期;
    若未过期,将所述A记录反馈给所述用户客户端;若过期,生成所述域名访问请求对应的域名解析请求,并向权威域名服务器发送生成的所述域名解析请求。
  11. 根据权利要求9所述的方法,其特征在于,所述权威域名服务器反馈的所述域名解析记录中,包括所述域名解析记录的存留时长;其中,若所述本地域名服务器根据所述存留时长判定所述域名解析记录已过期,向所述外部授权服务器再次发送所述域名解析请求。
  12. 根据权利要求9所述的方法,其特征在于,在向所述外部授权服务器再次发送所述域名解析请求之后,所述本地域名服务器接收到所述外部授权服务器反馈的A记录;在反馈的所述A记录中,包括所述目标子域名和所述A记录的存留时长;所述方法还包括:
    所述本地域名服务器存储所述外部授权服务器反馈的A记录,并且当再次 接收到指向所述目标子域名的域名访问请求时,根据所述A记录中的存留时长判断所述A记录是否过期;
    若未过期,按照存储的所述A记录获取所述目标子域名的域名解析结果;若过期,生成所述域名访问请求对应的域名解析请求,并向所述权威域名服务器发送生成的所述域名解析请求。
  13. 一种本地域名服务器,其特征在于,所述本地域名服务器包括存储器和处理器,所述存储器用于存储计算机程序,所述计算机程序被所述处理器执行时,实现如权利要求9至12中任一所述的方法。
PCT/CN2020/071458 2019-12-18 2020-01-10 一种域名解析方法、权威域名服务器和本地域名服务器 WO2021120355A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911308411.6A CN111200667B (zh) 2019-12-18 2019-12-18 一种域名解析方法、权威域名服务器和本地域名服务器
CN201911308411.6 2019-12-18

Publications (1)

Publication Number Publication Date
WO2021120355A1 true WO2021120355A1 (zh) 2021-06-24

Family

ID=70746893

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/071458 WO2021120355A1 (zh) 2019-12-18 2020-01-10 一种域名解析方法、权威域名服务器和本地域名服务器

Country Status (2)

Country Link
CN (1) CN111200667B (zh)
WO (1) WO2021120355A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114666302A (zh) * 2022-02-25 2022-06-24 网宿科技股份有限公司 域名解析方法、系统、电子设备和存储介质
CN115277636A (zh) * 2022-09-14 2022-11-01 中国科学院大学 一种泛域名解析方法和系统

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111953802A (zh) * 2020-07-06 2020-11-17 网宿科技股份有限公司 一种域名的解析方法、系统、设备及存储介质
CN111711716B (zh) * 2020-08-20 2020-12-04 苏州浪潮智能科技有限公司 一种域名解析方法、装置、设备及可读存储介质
CN114157635B (zh) * 2020-09-07 2023-08-15 中国移动通信集团湖南有限公司 内容分发网络的域名回源方法和装置、设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107623755A (zh) * 2017-09-30 2018-01-23 杭州安恒信息技术有限公司 基于学习的智能dns实现方法、装置及电子设备
CN109040343A (zh) * 2018-09-11 2018-12-18 达闼科技(北京)有限公司 域名解析方法、装置、计算机可读存储介质及电子设备
CN109688239A (zh) * 2018-12-20 2019-04-26 全链通有限公司 域名解析方法、设备、系统及存储介质
CN110324434A (zh) * 2018-03-28 2019-10-11 阿里巴巴集团控股有限公司 域名解析的方法、客户端、服务器和电子设备
CN110557464A (zh) * 2019-09-05 2019-12-10 网宿科技股份有限公司 Dns解析方法、权威dns服务器和dns解析系统

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102123180A (zh) * 2010-01-08 2011-07-13 北京中企开源信息技术有限公司 Dns网络结构及域名解析方法
CN102739453B (zh) * 2012-07-03 2015-07-29 华为软件技术有限公司 主备切换方法、设备及系统
CN105939337B (zh) * 2016-03-09 2019-08-06 杭州迪普科技股份有限公司 Dns缓存投毒的防护方法及装置
CN106210165B (zh) * 2016-07-08 2020-01-21 中国互联网络信息中心 基于ns记录分层授权缓解域名权威记录劫持影响的方法
CN106209832A (zh) * 2016-07-08 2016-12-07 中国互联网络信息中心 基于ns记录转移授权缓解域名权威记录劫持影响的方法
CN107623751B (zh) * 2016-07-14 2021-02-12 网宿科技股份有限公司 Dns网络系统、域名解析方法及系统
CN106453685A (zh) * 2016-11-15 2017-02-22 中国移动通信集团江苏有限公司 由公众dns服务器代为解析的方法、系统和服务器
CN107222492A (zh) * 2017-06-23 2017-09-29 网宿科技股份有限公司 一种dns防攻击方法、设备和系统
US11032127B2 (en) * 2017-06-26 2021-06-08 Verisign, Inc. Resilient domain name service (DNS) resolution when an authoritative name server is unavailable
US10033692B1 (en) * 2017-10-05 2018-07-24 Cloudflare, Inc. Managing domain name system (DNS) queries using a proxy DNS server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107623755A (zh) * 2017-09-30 2018-01-23 杭州安恒信息技术有限公司 基于学习的智能dns实现方法、装置及电子设备
CN110324434A (zh) * 2018-03-28 2019-10-11 阿里巴巴集团控股有限公司 域名解析的方法、客户端、服务器和电子设备
CN109040343A (zh) * 2018-09-11 2018-12-18 达闼科技(北京)有限公司 域名解析方法、装置、计算机可读存储介质及电子设备
CN109688239A (zh) * 2018-12-20 2019-04-26 全链通有限公司 域名解析方法、设备、系统及存储介质
CN110557464A (zh) * 2019-09-05 2019-12-10 网宿科技股份有限公司 Dns解析方法、权威dns服务器和dns解析系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114666302A (zh) * 2022-02-25 2022-06-24 网宿科技股份有限公司 域名解析方法、系统、电子设备和存储介质
CN115277636A (zh) * 2022-09-14 2022-11-01 中国科学院大学 一种泛域名解析方法和系统

Also Published As

Publication number Publication date
CN111200667B (zh) 2021-08-10
CN111200667A (zh) 2020-05-26

Similar Documents

Publication Publication Date Title
WO2021120355A1 (zh) 一种域名解析方法、权威域名服务器和本地域名服务器
US10158620B2 (en) DNSSEC signing server
CN107533543B (zh) 具有本地高速缓存的分布式存储器高速缓存系统
US8645700B2 (en) DNSSEC inline signing
US8681995B2 (en) Supporting DNS security in a multi-master environment
US11647008B2 (en) Generating a negative answer to a domain name system query that indicates resource records as existing for the domain name regardless of whether those resource records actually exist
CN109120614B (zh) 基于分布式系统的业务处理方法及装置
JP6483819B2 (ja) ドメイン名システムのリソース枯渇攻撃を識別する装置及び方法
JP2016119660A (ja) コンテンツ指向ネットワーキングにおける低コスト認証対象署名委任
WO2016070752A1 (zh) 数据回填方法及装置
CN103685213A (zh) 一种减少针对dns的攻击的装置、系统和方法
US20200014625A1 (en) Router to send a request from a first subnet to a second subnet
US20220417344A1 (en) Proxy End Registration Method, System, and Related Apparatus
CN113301173A (zh) 域名更新系统及方法、消息转发方法、服务器
US10044629B1 (en) Dynamic TTL based on endpoint health checking
US8260942B2 (en) Cluster view performance
US8805987B1 (en) Ensuring a cookie-less namespace
CN109413220A (zh) 一种以别名方式接入ddos云防护系统中避免dns传播的方法
CN115442329A (zh) 域名信息查询方法、系统、装置、设备及存储介质
CN115277213B (zh) 报文转板处理方法及装置
CN111835735B (zh) 一种防攻击方法、装置、设备及机器可读存储介质
CN110875894B (zh) 通讯安全防护系统、方法及消息缓存节点
CN115412308A (zh) 报文处理方法、装置及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20902268

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20902268

Country of ref document: EP

Kind code of ref document: A1