WO2022078330A1 - 域名递归查询方法、装置、递归服务器以及dns系统 - Google Patents

域名递归查询方法、装置、递归服务器以及dns系统 Download PDF

Info

Publication number
WO2022078330A1
WO2022078330A1 PCT/CN2021/123299 CN2021123299W WO2022078330A1 WO 2022078330 A1 WO2022078330 A1 WO 2022078330A1 CN 2021123299 W CN2021123299 W CN 2021123299W WO 2022078330 A1 WO2022078330 A1 WO 2022078330A1
Authority
WO
WIPO (PCT)
Prior art keywords
query request
recursive
domain name
ecs
dns
Prior art date
Application number
PCT/CN2021/123299
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 WO2022078330A1 publication Critical patent/WO2022078330A1/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/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/256NAT traversal
    • H04L61/2567NAT traversal for reachability, e.g. inquiring the address of a correspondent behind a NAT server

Definitions

  • the present disclosure relates to the field of communication technologies, and in particular, to a method, an apparatus, a recursive server, a DNS system, and a storage medium for recursive domain name query.
  • CDN Content Delivery Network
  • GSLB Global Server Load Balancing, Global Load Balancing Server
  • DNS Domain Name System
  • the basic principle is that the client obtains the CDN service node through DNS request. IP address.
  • the CDN GSLB does not directly interact with the client, but queries the CDN GSLB through the Local DNS. Therefore, the CDN GSLB can only estimate the user IP address based on the query address (recursive service address) of the Local DNS.
  • the IETF has released the ECS (EDNS-Client-Subnet) protocol, which appends the user IP address requesting domain name resolution to the DNS request packet. Therefore, the CDN obtains the user's precise IP network segment through ECS.
  • ECS EDNS-Client-Subnet
  • a method for recursive domain name query is provided, which is applied to a recursive server. Adding ECS label information to the recursive query request; using a smart network card to detect the ECS recursive query request from the domain name recursive query request based on the ECS label information; wherein, the recursive server is provided with the smart network card; using The smart network card performs matching processing on the ECS recursive query request based on a preset matching rule, and performs corresponding processing on the ECS recursive query request based on the matching processing result.
  • determining the recursive domain name query request that complies with a preset label adding rule in the received recursive domain name query request includes: receiving the domain name recursive query request reported by the DNS cache of the domain name system; judging and reporting the domain name Whether the DNS cache requested by the recursive query is a DNS partition cache; if so, it is determined that the recursive domain name query request conforms to the labeling rule; if not, it is determined that the domain name recursive query request does not meet the labeling rule.
  • the ECS label information includes: an ECS code; the method includes: acquiring a preset ECS code, and adding the ECS code to a domain name recursive query request that complies with the label adding rule.
  • the domain name recursive query request includes: a DNS query request; the method further includes: setting the value of the OPCODE field in the header of the DNS query request message to the ECS code; obtaining the DNS The partition cache number of the partition cache, and the partition cache number is added to the ID field in the header of the DNS query request message.
  • the step of detecting the ECS recursive query request from the domain name recursive query request based on the ECS label information includes: judging whether the value of the OPCODE field in the header of the DNS query request packet is the specified value. If yes, it is determined that the DNS query request is the ECS recursive query request; if not, it is determined that the DNS query request is not the ECS recursive query request.
  • the performing matching processing on the ECS recursive query request based on a preset matching rule includes: obtaining the CDN domain name of the content distribution network in the global load balancing server GSLB; Whether the domain name matches the CDN domain name; if so, it is determined that the DNS query request message conforms to the matching rule; if not, it is determined that the DNS query request message does not conform to the matching rule.
  • performing corresponding processing on the ECS recursive query request based on the matching processing result includes: adding EDNS OPT information to the DNS query request message that conforms to the matching rule, and reporting the DNS query request to the Send the message to the GSLB; use the smart network card to receive the CDN node IP address returned by the GSLB and return it to the DNS partition cache.
  • the EDNS OPT information includes user subnet information; the method includes: obtaining the partition cache number from a header of the DNS query request message; generating a user subnet based on the partition cache number information.
  • a domain name recursive query device which is applied to a recursive server and includes: a labeling module for determining a domain name recursive query request that conforms to a preset label adding rule in the received domain name recursive query request , and add the ECS label information in this domain name recursive query request; the sorting module is used to use the smart network card to detect the ECS recursive query request from the domain name recursive query request based on the ECS label information; wherein, the described The intelligent network card is provided in the recursive server; the matching processing module is used to perform matching processing on the ECS recursive query request based on a preset matching rule by using the intelligent network card, and perform corresponding processing on the ECS recursive query request based on the matching processing result. processing.
  • the label module is specifically configured to receive the domain name recursive query request reported by the DNS cache of the domain name system; determine whether the DNS cache that reports the domain name recursive query request is a DNS partition cache; if so, determine whether The domain name recursive query request complies with the label adding rule, and if not, it is determined that the domain name recursive query request does not meet the label adding rule.
  • the ECS label information includes: an ECS code; wherein, the label module is further configured to obtain a preset ECS code, and add the ECS to a domain name recursive query request that complies with the label adding rule code.
  • the domain name recursive query request includes: a DNS query request; wherein, the label module is specifically configured to set the value of the OPCODE field in the header of the DNS query request message to the ECS code; Obtain the partition cache number of the DNS partition cache, and add the partition cache number to the ID field in the header of the DNS query request message.
  • the sorting module is configured to determine whether the value of the OPCODE field in the header of the DNS query request message is the ECS code; if so, determine that the DNS query request is the ECS recursion query request; if not, it is determined that the DNS query request is not the ECS recursive query request.
  • the matching processing module is configured to obtain the CDN domain name of the content distribution network in the global load balancing server GSLB; determine whether the domain name in the DNS query request message matches the CDN domain name; if yes , it is determined that the DNS query request message conforms to the matching rule; if not, it is determined that the DNS query request message does not conform to the matching rule.
  • the matching processing module is further configured to add EDNS OPT information to the DNS query request message that conforms to the matching rule, and send the DNS query request message to the GSLB; using the The smart network card receives the CDN node IP address returned by the GSLB and returns it to the DNS partition cache.
  • the EDNS OPT information includes user subnet information; wherein, the matching processing module is further configured to obtain the partition cache number from the header of the DNS query request message; based on the partition The cache number generates user subnet information.
  • a domain name recursive query apparatus comprising: a memory; and a processor coupled to the memory, the processor configured to execute the above based on instructions stored in the memory the method described.
  • a recursive server comprising: the above-mentioned recursive domain name query apparatus.
  • a DNS system comprising: the recursive server as described above.
  • a computer-readable storage medium storing computer instructions, the instructions being executed by a processor as described above.
  • FIG. 1 is a schematic flowchart of some embodiments of a method for recursive domain name query provided according to the present disclosure
  • FIG. 2A is a schematic diagram of recursive query by Local DNS in the prior art
  • FIG. 2B is a schematic diagram of recursive query by Local DNS by utilizing a smart network card in the present disclosure
  • FIG. 3 is a schematic diagram of logic processing of some embodiments of the recursive domain name query method provided according to the present disclosure
  • FIG. 4 is a schematic diagram of a header of a DNS message
  • FIG. 5 is a schematic flowchart of other embodiments of the recursive domain name query method provided according to the present disclosure.
  • FIG. 6 is a schematic block diagram of some embodiments of a domain name recursive query apparatus provided according to the present disclosure
  • FIG. 7 is a schematic block diagram of other embodiments of the recursive domain name query apparatus according to the present disclosure.
  • CDN GSLB widely uses DNS scheduling technology.
  • the basic principle is that the client obtains the IP address of the CDN service node through DNS request.
  • the CDN GSLB does not directly interact with the client, but uses the Local DNS to query the CDN GSLB. Therefore, the CDN GSLB can only estimate the user IP address based on the local DNS query address (recursive service address).
  • Most of the existing operators' Local DNS are deployed in provincial units. Therefore, CDN GSLB cannot identify the precise location of the user (such as which domain network, which BRAS, etc.) the user is in from the query address of the Local DNS.
  • the IETF has released the ECS (EDNS-Client-Subnet) protocol, which will append the user IP address requesting domain name resolution to the DNS request packet, so that the CDN can obtain the user's precise IP network segment through ECS.
  • ECS EDNS-Client-Subnet
  • the ECS protocol also brings new problems: if Local DNS enables the ECS function for all domain names, the CP can obtain the user IP network segment information, which can be very convenient to compile the user attribution table, which is easy to leak privacy, and is not conducive to operators. If Local DNS only enables ECS function for the specified CDN service domain name by tracking the DNS recursion process, because the existing solution needs to search the CDN domain name table through the CPU, the local DNS recursion performance will be greatly affected.
  • the embodiments of the present disclosure provide a domain name recursive query method, device, recursive server, DNS system, and storage medium, which determine a domain name recursive query request that complies with preset label adding rules and add ECS label information, and utilize intelligent
  • the network card detects the ECS recursive query request based on the ECS label information, uses the smart network card to perform matching processing based on the preset matching rules, and performs corresponding processing on the ECS recursive query request; it can effectively improve the efficiency of the recursive query and improve the user experience; only Sending an ECS query message to the CDN GSLB protects the operator's user network information; improves the differentiated service capability of the operator's CDN and effectively reduces resource consumption.
  • FIG. 1 is a schematic flowchart of some embodiments of the method for recursive domain name query provided by the present disclosure.
  • the method for recursive domain name query of the present disclosure is applied to a recursive server, and the recursive server is a DNS recursive server, etc. As shown in FIG. 1 :
  • Step 101 Determine a domain name recursive query request that complies with a preset label adding rule in the received domain name recursive query request, and add ECS label information to the domain name recursive query request.
  • recursive domain name query means that after the client sends a domain name resolution request to the DNS server, the server traverses the domain name space by searching for the domain name authorization server from the root zone, and finally obtains a response corresponding to the domain name by interacting with the authorization server record and return it to the client.
  • Edns-client-subnet is a DNS extension protocol proposed by Google, which can be applied to DNS intelligent scheduling, CDN and other fields. Provide users with more accurate analysis results.
  • Step 102 using the smart network card to detect the ECS recursive query request from the domain name recursive query request based on the ECS label information; wherein, the recursive server is provided with a smart network card.
  • Intelligent Network Interface Card is a high-performance network access card with a network processor as the core. (Quality of Service, QoS) and other characteristics.
  • Step 103 use the smart network card to perform matching processing on the ECS recursive query request based on a preset matching rule, and perform corresponding processing on the ECS recursive query request based on the matching processing result.
  • the domain name recursive query method of the present disclosure formulates a processing flow for the ECS query message, and transfers the task that originally needs to be processed by the CPU of the recursive server to the intelligent network card for processing, thereby improving the recursive query performance.
  • multiple methods may be used to determine the recursive domain name query request that complies with the preset labeling rules. For example, receiving a domain name recursive query request reported by the DNS cache of the domain name system, and determining whether the DNS cache reporting the domain name recursive query request is a DNS partition cache; The domain name recursive query request does not meet the labeling rules.
  • the domain name recursive query request sent by the user terminal can be cached in different DNS caches.
  • Different DNS shard caches can be set for different administrative regions, network partitions, user groups, units, etc., and the domain name recursive query requests sent by user terminals belonging to different administrative regions, network partitions, user groups, and units are cached in the corresponding in the DNS shard cache.
  • For the domain name recursive query request in the common DNS cache use the existing domain name recursive query method.
  • the ECS label information needs to be added to the domain name recursive query request.
  • the ECS tag information includes an ECS code.
  • the ECS code can be set, for example, the ECS code is 15 and so on. Obtain the preset ECS code, and add the ECS code to the recursive query request of the domain name that conforms to the label adding rules.
  • the domain name recursive query request includes a DNS query request; the value of the OPCODE field in the header of the DNS query request message is set as the ECS code; the partition cache number of the DNS partition cache is obtained, and the partition cache number is added to the DNS query. In the ID field of the header of the request message.
  • Various methods can be used to detect the ECS recursive query request from the domain name recursive query request. For example, determine whether the value of the OPCODE field in the header of the DNS query request message is an ECS code; if so, determine that the DNS query request is an ECS recursive query request; if not, determine that the DNS query request is not an ECS recursive query request .
  • the recursive service module of Local DNS is usually divided into a common recursive module and an ECS recursive module.
  • the ECS recursive module receives recursive requests from the DNS partition cache, and sends ECS packets to the contracted domain name server and CDN GSLB. Since the introduction of partition cache greatly increases the amount of recursive queries, the ECS recursive module in the existing solution compares each DNS query with the GSLB domain name, which consumes a lot of CPU resources; at the same time, in the case of DDOS attacks, the ECSECS recursive module Handling massive ECS queries can easily overload the Local DNS server and cause major security incidents.
  • the recursive domain name query method of the present disclosure uses a unified recursive process, and does not distinguish between ECS and non-ECS queries; using a recursive smart network card, the smart network card checks the sent packets, and the qualified packets will add ECS label information .
  • the smart NIC Through the smart NIC, the ECS packets can be processed at wire speed without increasing CPU consumption.
  • a number of methods may be used to perform the matching process on ECS recursive query requests. For example, obtain the CDN domain name of the content distribution network in the global load balancing server GSLB, and the CDN domain name is the contracted CDN domain name, etc. Determine whether the domain name in the DNS query request packet matches the CDN domain name; if so, determine that the DNS query request packet conforms to the matching rule; if not, determine that the DNS query request packet does not conform to the matching rule. For the DNS query request packets that do not meet the matching rules, the existing recursive query method is used to process the DNS query request packets.
  • Various methods may be used to perform corresponding processing on the ECS recursive query request based on the matching processing result. For example, add EDNS OPT information to the DNS query request message that matches the matching rule, and send the DNS query request message to GSLB. Use the smart network card to receive the IP address of the CDN node returned by GSLB and return it to the DNS partition cache. GSLB can use the existing method to process the DNS query request message to obtain the IP address of the CDN node.
  • extension DNS mechanism EDNS Extension Mechanisms for DNS
  • EDNS Extension Mechanisms for DNS
  • OPT Resource Record
  • OPT does not contain any DNS data, and OPT RR cannot be cached, forwarded, or stored in zone files. There can only be one OPT pseudo-resource record in each DNS packet.
  • EDNS OPT information includes user subnet information, etc.
  • Global load balancing GSLB can achieve load balancing and balance among multiple CDN nodes.
  • the DNS query request message includes the EDNS OPT information, and the EDNS OPT information includes the user subnet information generated based on the partition cache number.
  • the same domain name can have multiple CDN nodes.
  • GSLB provides different CDN node IP addresses for different partition cache numbers and returns them according to the user subnet information generated based on the partition cache number, which can achieve load balancing.
  • the recursive server is provided with an intelligent network card, and a plurality of functional modules can be implemented by utilizing the programmability of the intelligent network card.
  • the CPU of the recursive server is used to process the label module and the recursive module.
  • the sorting module and the processing module can be set in the intelligent network card, and corresponding processing is performed through the intelligent network card.
  • Label module For the DNS query message reported by the partition cache, update the OPCODE field value in the header to 15; write the partition cache number into the first 10 bits of the ID field in the header of the DNS query message, and the last 6 bits of the ID field as Sequence number.
  • the sorting module of the smart network card sorting DNS query packets according to the OPCODE value.
  • the processing module of the smart network card establish a "match-processing" module for the main domain name of each CDN GSLB. When the main CDN domain name is matched, the EDNS OPT information is added to the DNS query message; the user subnet information in the EDNS OPT, Determined by the label module's partition cache number.
  • the header format of the DNS query request message is shown in Figure 4.
  • the label module updates the OPCODE value in the header of the DNS query request message reported by the partition cache to 15 (ECS code). The message is not processed.
  • the tag module needs to update the ID field in the header of the DNS query request message, write the DNS partition cache number into the first 10 bits of the ID field, and the last 6 bits of the ID field as the sequence number.
  • the value of the ID field in the header of the DNS query request message is used as the unique identifier of the same recursive process, and will not be rewritten in the subsequent DNS recursive process. Therefore, the subsequent recursive process can further perform corresponding processing based on this field.
  • FIG. 5 is a schematic flowchart of other embodiments of the recursive domain name query method provided according to the present disclosure, as shown in FIG. 5 :
  • Step 501 Send a DNS query request message for querying the IP address of ABC.COM.
  • Step 502 set the OPCODE field value in the header of the DNS query request message to 15, write the DNS partition cache number into the first 10 bits of the ID field in the header of the DNS query request message, and the last 6 bits of the ID field as the sequence No.
  • Step 503 Send a DNS query request message to perform a recursive query.
  • Step 504 Sort the DNS query request message according to the value of the OPCODE field, and send the sorted DNS query request message as the ECS recursive query request.
  • Step 505 if the domain name in the DNS query request message does not match the CDN domain name of the content distribution network in the GSLB, send a request.
  • Step 506 Step 507: Return the CDN domain name CNAME in the GSLB according to the recursive server address.
  • Step 508 Send a DNS query request message to perform a recursive query.
  • Step 509 Continue to send the recursive request according to the ID field in the header of the DNS query request message.
  • Step 510 if the domain name in the DNS query request message matches the CNAME, add OPT information in the DNS query request message based on the partition cache number, send the DNS query request message, and perform a recursive query.
  • the recursive software can be upgraded by installing a smart network card on the existing recursive server to apply the domain name recursive query method of the present disclosure.
  • the cache and the new recursive server are one A loosely coupled relationship.
  • the present disclosure provides a domain name recursive query device 60 , which is applied to a recursive server and includes: a labeling module 61 , a sorting module 62 and a matching processing module 63 .
  • the labeling module 61 determines, in the received recursive domain name query request, a domain name recursive query request that complies with a preset label adding rule, and adds ECS label information to the domain name recursive query request.
  • a smart network card is installed in the recursive server.
  • the sorting module 62 and the matching processing module 63 can be set in the smart network card.
  • the sorting module 62 uses the smart network card to sort out the ECS recursive query request from the domain name recursive query request based on the ECS label information.
  • the matching processing module 63 uses the smart network card to perform matching processing on the ECS recursive query request based on a preset matching rule, and performs corresponding processing on the ECS recursive query request based on the matching processing result.
  • the labeling module 61 receives the domain name recursive query request reported by the DNS cache of the domain name system, and determines whether the DNS cache that reports the domain name recursive query request is a DNS partition cache; if so, the labeling module 61 determines that the domain name recursive query request conforms to Label adding rules, if not, the labeling module 61 determines that the domain name recursive query request does not meet the label adding rules.
  • the ECS label information includes an ECS code and the like.
  • the labeling module 61 obtains the preset ECS code, and adds the ECS code to the recursive query request of the domain name that conforms to the labeling rule.
  • the domain name recursive query request includes DNS query request and so on.
  • the labeling module 61 sets the value of the OPCODE field in the header of the DNS query request message to the ECS code; the labeling module 61 obtains the partition cache number of the DNS partition cache, and adds the partition cache number to the ID field in the header of the DNS query request message middle.
  • the sorting module 62 determines whether the OPCODE field value in the header of the DNS query request message is an ECS code; if so, the sorting module 62 determines that the DNS query request is an ECS recursive query request; if not, Then, the sorting module 62 determines that the DNS query request is not an ECS recursive query request.
  • the matching processing module 63 obtains the CDN domain name of the content distribution network in the global load balancing server GSLB, and judges whether the domain name in the DNS query request message matches the CDN domain name; if so, the matching processing module 63 determines that the DNS query request message matches the matching rule; if not, the matching processing module 63 determines that the DNS query request packet does not meet the matching rule.
  • the matching processing module 63 adds EDNS OPT information in the DNS query request message that meets the matching rule, and sends this DNS query request message to GSLB; the matching processing module 63 uses the smart network card to receive the CDN node IP address returned by GSLB and returns to DNS partition cache.
  • the EDNS OPT information includes user subnet information.
  • the matching processing module 63 is further configured to obtain the partition cache number from the header of the DNS query request message, and generate user subnet information based on the partition cache number.
  • FIG. 7 is a block diagram of another embodiment of the recursive domain name query apparatus according to the present disclosure.
  • the apparatus may include a memory 71 , a processor 72 , a communication interface 73 and a bus 74 .
  • the memory 71 is used for storing instructions
  • the processor 72 is coupled to the memory 71
  • the processor 72 is configured to implement the above-mentioned recursive domain name query method based on the execution of the instructions stored in the memory 71 .
  • the memory 71 may be a high-speed RAM memory, a non-volatile memory, or the like, and the memory 71 may also be a memory array.
  • the storage 71 may also be divided into blocks, and the blocks may be combined into virtual volumes according to certain rules.
  • the processor 72 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the recursive domain name query method of the present disclosure.
  • the present disclosure provides a recursive server, including the domain name recursive query apparatus in any of the above embodiments.
  • the present disclosure provides a DNS system including a recursive server as in any of the above embodiments.
  • the present disclosure provides a computer-readable storage medium, where computer instructions are stored in the computer-readable storage medium, and when the instructions are executed by a processor, implement the method for recursive domain name query in any of the foregoing embodiments.
  • embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein .
  • computer-usable non-transitory 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.
  • the domain name recursive query method, device, recursive server, DNS system, and storage medium in the above-mentioned embodiment determine the domain name recursive query request that conforms to the preset label adding rule and add ECS label information, and use the smart network card to detect and detect based on the ECS label information.
  • the smart network card For ECS recursive query requests, the smart network card is used to perform matching processing based on preset matching rules, and the ECS recursive query requests are processed accordingly; it can effectively improve the efficiency of recursive query and user experience; only send ECS query packets to CDN GSLB , which protects the operator's user network information; it is suitable for the application scenario of precise scheduling of the operator's self-built CDN, improves the differentiated service capability of the operator's CDN, and effectively reduces the resource consumption of the recursive server.
  • the methods and systems of the present disclosure may be implemented in many ways.
  • the methods and systems of the present disclosure may be implemented in software, hardware, firmware, or any combination of software, hardware, and firmware.
  • the above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise.
  • the present disclosure can also be implemented as programs recorded in a recording medium, the programs including machine-readable instructions for implementing methods according to the present disclosure.
  • the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

Landscapes

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

Abstract

本公开提供了一种域名递归查询方法、装置、递归服务器以及DNS系统、存储介质,涉及通信技术领域,其中的方法包括:在接收的域名递归查询请求中确定符合预设的标签添加规则的域名递归查询请求,并在此域名递归查询请求中加入ECS标签信息;利用智能网卡基于ECS标签信息,从域名递归查询请求中分检出ECS递归查询请求;利用智能网卡基于预设的匹配规则,对ECS递归查询请求进行匹配处理,基于匹配处理结果对ECS递归查询请求进行相应的处理。本公开的方法、装置、递归服务器以及DNS系统、存储介质,能够有效提升递归查询的效率,保护了运营商的用户网络信息,提升运营商CDN的差异化服务能力,有效降低了资源消耗。

Description

域名递归查询方法、装置、递归服务器以及DNS系统
相关申请的交叉引用
本公开是以CN申请号为202011092591.1申请日为2020年10月13日的申请为基础,并主张其优先权,该CN申请的公开内容在此作为整体引入本公开中。
技术领域
本公开涉及通信技术领域,尤其涉及一种域名递归查询方法、装置、递归服务器以及DNS系统、存储介质。
背景技术
CDN(Content Delivery Network,内容分发网络)GSLB(Global Server Load Balancing,全局负载均衡服务器)通常使用DNS(Domain Name System,域名系统)调度技术,其基本原理是客户端通过DNS请求获取CDN服务节点的IP地址。在DNS地址解释过程中,CDN GSLB不直接与客户端交互,而是通过Local DNS向CDN GSLB进行查询,因此,CDN GSLB只能根据Local DNS的查询地址(递归服务地址)来估计用户IP地址。IETF发布了ECS(EDNS-Client-Subnet)协议,该协议会在DNS请求包中附加请求域名解析的用户IP地址,因此,CDN通过ECS获取用户精准IP网段。
发明内容
根据本公开的第一方面,提供一种域名递归查询方法,应用于递归服务器中,包括:在接收的域名递归查询请求中确定符合预设的标签添加规则的域名递归查询请求,并在此域名递归查询请求中加入ECS标签信息;利用智能网卡基于所述ECS标签信息,从所述域名递归查询请求中分检出ECS递归查询请求;其中,所述递归服务器中设置有所述智能网卡;利用智能网卡基于预设的匹配规则,对所述ECS递归查询请求进行匹配处理,基于匹配处理结果对所述ECS递归查询请求进行相应的处理。
在一些实施例中,所述在接收的域名递归查询请求中确定符合预设的标签添加规则的域名递归查询请求包括:接收域名系统DNS缓存上报的所述域名递归查询请求;判断上报所述域名递归查询请求的DNS缓存是否为DNS分区缓存;如果是,则确定此域名递归查询请求符合所述标签添加规则,如果否,则确定此域名递归查询请求不符合所述标签添加规则。
在一些实施例中,所述ECS标签信息包括:ECS码;所述方法包括:获取预设的ECS码,在符合所述标签添加规则的域名递归查询请求中添加所述ECS码。
在一些实施例中,所述域名递归查询请求包括:DNS查询请求;所述方法还包括:将所述DNS查询请求报文的报头中的OPCODE字段值设置为所述ECS码;获取所述DNS分区缓存的分区缓存编号,将所述分区缓存编号添加在所述DNS查询请求报文的报头中的ID字段中。
在一些实施例中,所述基于所述ECS标签信息,从所述域名递归查询请求中分检出ECS递归查询请求包括:判断所述DNS查询请求报文的报头中的OPCODE字段值是否为所述ECS码;如果是,则确定此DNS查询请求为所述ECS递归查询请求;如果否,则确定此DNS查询请求不为所述ECS递归查询请求。
在一些实施例中,所述基于预设的匹配规则,对所述ECS递归查询请求进行匹配处理包括:获取全局负载均衡服务器GSLB中的内容分发网络CDN域名;判断所述DNS查询请求报文中的域名是否与所述CDN域名相匹配;如果是,则确定此DNS查询请求报文符合所述匹配规则;如果否,则确定此DNS查询请求报文不符合所述匹配规则。
在一些实施例中,所述基于匹配处理结果对所述ECS递归查询请求进行相应的处理包括:在符合所述匹配规则的DNS查询请求报文中增加EDNS OPT信息,并将此DNS查询请求报文发送给所述GSLB;利用所述智能网卡接收所述GSLB返回的CDN节点IP地址并返回至所述DNS分区缓存。
在一些实施例中,所述EDNS OPT信息包括用户子网信息;所述方法包括:从所述DNS查询请求报文的报头中获取所述分区缓存编号;基于所述分区缓存编号生成用户子网信息。
根据本公开的第二方面,提供一种域名递归查询装置,应用于递归服务器中,包括:标签模块,用于在接收的域名递归查询请求中确定符合预设的标签添加规则的域名递归查询请求,并在此域名递归查询请求中加入ECS标签信息;分检模块,用于利用智能网卡基于所述ECS标签信息,从所述域名递归查询请求中分检出ECS递归查询请求;其中,所述递归服务器中设置有所述智能网卡;匹配处理模块,用于利用智能网卡基于预设的匹配规则,对所述ECS递归查询请求进行匹配处理,基于匹配处理结果对所述ECS递归查询请求进行相应的处理。
在一些实施例中,所述标签模块,具体用于接收域名系统DNS缓存上报的所述域名递归查询请求;判断上报所述域名递归查询请求的DNS缓存是否为DNS分区缓存;如果是,则确定此域名递归查询请求符合所述标签添加规则,如果否,则确定此域名递归查询请求不 符合所述标签添加规则。
在一些实施例中,所述ECS标签信息包括:ECS码;其中,所述标签模块,还用于获取预设的ECS码,在符合所述标签添加规则的域名递归查询请求中添加所述ECS码。
在一些实施例中,所述域名递归查询请求包括:DNS查询请求;其中,所述标签模块,具体用于将所述DNS查询请求报文的报头中的OPCODE字段值设置为所述ECS码;获取所述DNS分区缓存的分区缓存编号,将所述分区缓存编号添加在所述DNS查询请求报文的报头中的ID字段中。
在一些实施例中,所述分检模块,用于判断所述DNS查询请求报文的报头中的OPCODE字段值是否为所述ECS码;如果是,则确定此DNS查询请求为所述ECS递归查询请求;如果否,则确定此DNS查询请求不为所述ECS递归查询请求。
在一些实施例中,所述匹配处理模块,用于获取全局负载均衡服务器GSLB中的内容分发网络CDN域名;判断所述DNS查询请求报文中的域名是否与所述CDN域名相匹配;如果是,则确定此DNS查询请求报文符合所述匹配规则;如果否,则确定此DNS查询请求报文不符合所述匹配规则。
在一些实施例中,所述匹配处理模块,还用于在符合所述匹配规则的DNS查询请求报文中增加EDNS OPT信息,并将此DNS查询请求报文发送给所述GSLB;利用所述智能网卡接收所述GSLB返回的CDN节点IP地址并返回至所述DNS分区缓存。
在一些实施例中,所述EDNS OPT信息包括用户子网信息;其中,所述匹配处理模块,还用于从所述DNS查询请求报文的报头中获取所述分区缓存编号;基于所述分区缓存编号生成用户子网信息。
根据本公开的第三方面,提供一种域名递归查询装置,包括:存储器;以及耦接至所述存储器的处理器,所述处理器被配置为基于存储在所述存储器中的指令,执行如上所述的方法。
根据本公开的第四方面,提供一种递归服务器,包括:如上所述的域名递归查询装置。
根据本公开的第五方面,提供一种DNS系统,包括:如上所述的递归服务器。
根据本公开的第六方面,提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述指令被处理器执行如上述的方法。
附图说明
为了更清楚地说明本公开实施例或相关技术中的技术方案,下面将对实施例或相关技 术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为根据本公开提供的域名递归查询方法的一些实施例的流程示意图;
图2A为现有技术中通过Local DNS进行递归查询的示意图,图2B为本公开的利用智能网卡通过Local DNS进行递归查询的示意图;
图3为根据本公开提供的域名递归查询方法的一些实施例的逻辑处理示意图;
图4为DNS报文的报头示意图;
图5为根据本公开提供的域名递归查询方法的另一些实施例的流程示意图;
图6为根据本公开提供的域名递归查询装置的一些实施例的模块示意图;
图7为根据本公开提供的域名递归查询装置的另一些实施例的模块示意图。
具体实施方式
下面参照附图对本公开进行更全面的描述,其中说明本公开的示例性实施例。下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。下面结合各个图和实施例对本公开的技术方案进行多方面的描述。
发明人所知晓的相关技术中,随着VR、云游戏等边缘应用快速发展,多种应用对于网络的时延、接入带宽、网络质量提出了越来越高的要求。作为这些应用的内容分发服务平台,现有CDN的在IDC或骨干网集中式部署架构已难以满足这些业务与应用需求,CDN节点需下沉至城域网边缘。
互联网CDN GSLB广泛使用DNS调度技术,其基本原理是客户端通过DNS请求来获取CDN服务节点的IP地址。在DNS地址解释过程中,CDN GSLB不直接与客户端交互,而是通过Local DNS去CDN GSLB查询,因此,CDN GSLB只能根据Local DNS的查询地址(递归服务地址)来估计用户IP地址。现有运营商Local DNS绝大部分以省为单位部署,因此,CDN GSLB无法从Local DNS的查询地址中识别出用户所处的精确位置(例如用户处于哪个域域网、哪个BRAS等)。为解决以上问题,IETF发布了ECS(EDNS-Client-Subnet)协议,该协议会在DNS请求包中附加请求域名解析的用户IP地址,这样CDN通过ECS可 获取用户精准IP网段。
但是,ECS协议也带来了新的问题:如果Local DNS对所有域名打开ECS功能,则CP可得到用户IP网段信息,能够非常方便编制用户归属表,容易泄露隐私,而且也不利于运营商的差异化服务;如果Local DNS通过跟踪DNS递归过程,仅对指定的CDN服务域名打开ECS功能,由于现有方案需要通过CPU查找CDN域名表,Local DNS递归性能会受到极大影响。
有鉴于此,本公开的实施例提供了一种域名递归查询方法、装置、递归服务器以及DNS系统、存储介质,确定符合预设的标签添加规则的域名递归查询请求并加入ECS标签信息,利用智能网卡基于ECS标签信息分检出ECS递归查询请求,利用智能网卡基于预设的匹配规则进行匹配处理,对ECS递归查询请求进行相应的处理;能够有效提升递归查询的效率,提升了用户体验;仅对CDN GSLB发送ECS查询报文,保护了运营商的用户网络信息;提升运营商CDN的差异化服务能力,有效降低了资源消耗。
图1为根据本公开提供的域名递归查询方法的一些实施例的流程示意图,本公开的域名递归查询方法应用于递归服务器中,递归服务器为DNS递归服务器等;如图1所示:
步骤101,在接收的域名递归查询请求中确定符合预设的标签添加规则的域名递归查询请求,并在此域名递归查询请求中加入ECS标签信息。
在一些实施例中,域名递归查询是指客户端向DNS服务器发出域名解析请求后,服务器通过从根区开始寻找该域名授权服务器的方式遍历域名空间,最后通过与授权服务器交互获得域名对应的应答记录,再返回给客户端。Edns-client-subnet(ECS)是Google提出的DNS扩展协议,可应用于DNS智能调度、CDN等领域,主要作用是在域名递归查询时通过扩展option字段,将用户的源IP传递给权威DNS,为用户提供更精准的解析结果。
步骤102,利用智能网卡基于ECS标签信息,从域名递归查询请求中分检出ECS递归查询请求;其中,递归服务器中设置有智能网卡。
智能网卡(Intelligent Network Interface Card,iNIC)是一种以网络处理器为核心的高性能网络接入卡,它采用多核多线程的网络处理器架构,主要用于实现虚拟交换、安全隔离、服务质量(Quality of Service,QoS)等特性。
步骤103,利用智能网卡基于预设的匹配规则,对ECS递归查询请求进行匹配处理,基于匹配处理结果对ECS递归查询请求进行相应的处理。
本公开的域名递归查询方法制定了针对ECS查询报文的处理流程,将原来需到递归服务器的CPU处理的任务转移到智能网卡处理,提升了递归查询性能。
在一些实施例中,确定符合预设的标签添加规则的域名递归查询请求可以使用多种方法。例如,接收域名系统DNS缓存上报的域名递归查询请求,判断上报域名递归查询请求的DNS缓存是否为DNS分区缓存;如果是,则确定此域名递归查询请求符合标签添加规则,如果否,则确定此域名递归查询请求不符合标签添加规则。
用户终端发送的域名递归查询请求可以被缓存在不同的DNS缓存中,DNS缓存可以有多种,例如普通DNS缓存、DNS分片缓存等。可以对不同的行政区域、网络分区、用户群、单位等设置不同的DNS分片缓存,属于不同行政区域、网络分区、用户群、单位等的用户终端发送的域名递归查询请求,分别缓存在对应的DNS分片缓存中。对于普通DNS缓存中的域名递归查询请求,使用现有的域名递归查询方法。对于DNS分片缓存中的域名递归查询请求,需要在域名递归查询请求中加入ECS标签信息。
ECS标签信息可以有多种,例如,ECS标签信息包括ECS码。ECS码可以设置,例如ECS码为15等。获取预设的ECS码,在符合标签添加规则的域名递归查询请求中添加ECS码。
在一些实施例中,域名递归查询请求包括DNS查询请求;将DNS查询请求报文的报头中的OPCODE字段值设置为ECS码;获取DNS分区缓存的分区缓存编号,将分区缓存编号添加在DNS查询请求报文的报头中的ID字段中。
从域名递归查询请求中分检出ECS递归查询请求可以使用多种方法。例如,判断DNS查询请求报文的报头中的OPCODE字段值是否为ECS码;如果是,则确定此DNS查询请求为ECS递归查询请求;如果否,则确定此DNS查询请求不为ECS递归查询请求。
如图2A所示,在现有方案中,通常把Local DNS的递归服务模块区分为普通递归模块和ECS递归模块。ECS递归模块接收DNS分区缓存的递归请求,向签约的域名服务器及CDN GSLB发送ECS报文。由于分区缓存的引入极大增加了递归查询量,现有方案中的ECS递归模块对每个DNS查询对比GSLB域名,消耗了大量的CPU资源;同时,在出现DDOS攻击的情况下,ECSECS递归模块处理海量的ECS查询,容易对Local DNS服务器造成过载,形成重大安全事故。
如图2B所示,本公开的域名递归查询方法使用统一递归进程,不区分ECS与非ECS查询;使用递归智能网卡,由智能网卡检查发出的报文,符合条件的报文将增加ECS标签信息。通过智能网卡,可以实现线速处理ECS报文,不增加CPU消耗。
在一些实施例中,对ECS递归查询请求进行匹配处理可以使用多种方法。例如,获取全局负载均衡服务器GSLB中的内容分发网络CDN域名,CDN域名为签约CDN域名等。判断 DNS查询请求报文中的域名是否与CDN域名相匹配;如果是,则确定此DNS查询请求报文符合匹配规则;如果否,则确定此DNS查询请求报文不符合匹配规则。对于不符合匹配规则的DNS查询请求报文,使用现有的递归查询方法处理DNS查询请求报文。
基于匹配处理结果对ECS递归查询请求进行相应的处理可以使用多种方法。例如,在符合匹配规则的DNS查询请求报文中增加EDNS OPT信息,并将此DNS查询请求报文发送给GSLB。利用智能网卡接收GSLB返回的CDN节点IP地址并返回至DNS分区缓存。GSLB可以使用现有的方法对DNS查询请求报文进行处理,获取CDN节点IP地址。
在一些实施例中,扩展DNS机制EDNS(Extension Mechanisms for DNS)是在遵循已有的DNS消息格式的基础上增加一些字段,来支持更多的DNS请求业务。EDNS中引入了一种新的伪资源记录OPT(Resource Record),OPT不包含任何DNS数据,OPT RR不能被cache、不能被转发、不能被存储在zone文件中。每个DNS报文中只能有一个OPT伪资源记录。
EDNS OPT信息包括用户子网信息等。从DNS查询请求报文的报头中获取分区缓存编号,基于分区缓存编号生成用户子网信息。全局负载均衡GSLB可以实现负载均衡,在多个CDN节点之间进行均衡。DNS查询请求报文中包括EDNS OPT信息,EDNS OPT信息包括基于分区缓存编号生成的用户子网信息。同一个域名可以有多个CDN节点,GSLB根据基于分区缓存编号生成的用户子网信息,对于不同的分区缓存编号提供不同的CDN节点IP地址并返回,可以实现负载均衡。
在一些实施例中,如图3所示,递归服务器设置有智能网卡,利用智能网卡的可编程能力可以实现多个功能模块。递归服务器的CPU用于处理标签模块和递归模块,在智能网卡中可以设置分检模块和处理模块,通过智能网卡进行相应的处理。
标签模块:对分区缓存上报的DNS查询报文,更新报头中的OPCODE字段值为15;将分区缓存编号写入DNS查询报文的报头中ID字段的前10位,ID字段的后6位作为顺序号。智能网卡的分捡模块:根据OPCODE值分捡DNS查询报文。智能网卡的处理模块:为每个CDN GSLB的主域名建立一个“匹配—处理”模块,当匹配了主CDN域名则为该DNS查询报文增加EDNS OPT信息;EDNS OPT中的用户子网信息,由标签模块的分区缓存编号确定。
DNS查询请求报文的报头格式如图4所示,标签模块对分区缓存上报的DNS查询请求报文,更新其报头中的OPCODE值为15(ECS码),而对普通缓存或递归返回的DNS报文不进行处理。
标签模块需更新DNS查询请求报文的报头中的ID字段,将DNS分区缓存编号写入ID字段的前10位,ID字段的后6位作为顺序号。该DNS查询请求报文的报头中的ID字段值 作为同一递归过程的唯一标识,在后续DNS递归过程中不会被改写,因此,后续递归流程中可进一步基于本字段进行相应的处理。
图5为根据本公开提供的域名递归查询方法的另一些实施例的流程示意图,如图5所示:
步骤501,发送DNS查询请求报文,用于查询ABC.COM的IP地址。
步骤502,将DNS查询请求报文的报头中的OPCODE字段值设置为15,将DNS分区缓存编号写入DNS查询请求报文的报头中ID字段的前10位,ID字段的后6位作为顺序号。
步骤503,发送DNS查询请求报文,进行递归查询。
步骤504,根据OPCODE字段值分检DNS查询请求报文,发送分检出的DNS查询请求报文,作为ECS递归查询请求。
步骤505,如果DNS查询请求报文中的域名与GSLB中的内容分发网络CDN域名不匹配,则发送请求。
步骤506,步骤507:根据递归服务器地址返回GSLB中的CDN域名CNAME。
步骤508,发送DNS查询请求报文,进行递归查询。
步骤509,根据DNS查询请求报文的报头中的ID字段,继续发送递归请求。
步骤510,如果DNS查询请求报文中的域名与CNAME匹配,在DNS查询请求报文中基于分区缓存编号增加OPT信息,发送DNS查询请求报文,进行递归查询。
步骤511,步骤512,步骤513:根据OPT ESC信息查询CDN节点IP,并返回。
在实际应用中,为避免改动现有Local DNS软件架构及组网,可以通过在现有递归服务器上安装智能网卡,升级递归软件应用本公开的域名递归查询方法,缓存与该新递归服务器是一种松耦合的关系。
在一些实施例中,如图6所示,本公开提供一种域名递归查询装置60,应用于递归服务器中,包括:标签模块61、分检模块62和匹配处理模块63。标签模块61在接收的域名递归查询请求中确定符合预设的标签添加规则的域名递归查询请求,并在此域名递归查询请求中加入ECS标签信息。递归服务器中设置有智能网卡。分检模块62和匹配处理模块63可以设置在智能网卡中。
分检模块62利用智能网卡基于ECS标签信息,从域名递归查询请求中分检出ECS递归查询请求。匹配处理模块63利用智能网卡基于预设的匹配规则,对ECS递归查询请求进行匹配处理,基于匹配处理结果对ECS递归查询请求进行相应的处理。
在一些实施例中,标签模块61接收域名系统DNS缓存上报的域名递归查询请求,判 断上报域名递归查询请求的DNS缓存是否为DNS分区缓存;如果是,则标签模块61确定此域名递归查询请求符合标签添加规则,如果否,则标签模块61确定此域名递归查询请求不符合标签添加规则。
ECS标签信息包括ECS码等。标签模块61获取预设的ECS码,在符合标签添加规则的域名递归查询请求中添加ECS码。域名递归查询请求包括DNS查询请求等。标签模块61将DNS查询请求报文的报头中的OPCODE字段值设置为ECS码;标签模块61获取DNS分区缓存的分区缓存编号,将分区缓存编号添加在DNS查询请求报文的报头中的ID字段中。
在一些实施例中,分检模块62判断DNS查询请求报文的报头中的OPCODE字段值是否为ECS码;如果是,则分检模块62确定此DNS查询请求为ECS递归查询请求;如果否,则分检模块62确定此DNS查询请求不为ECS递归查询请求。
匹配处理模块63获取全局负载均衡服务器GSLB中的内容分发网络CDN域名,判断DNS查询请求报文中的域名是否与CDN域名相匹配;如果是,则匹配处理模块63确定此DNS查询请求报文符合匹配规则;如果否,则匹配处理模块63确定此DNS查询请求报文不符合匹配规则。
匹配处理模块63在符合匹配规则的DNS查询请求报文中增加EDNS OPT信息,并将此DNS查询请求报文发送给GSLB;匹配处理模块63利用智能网卡接收GSLB返回的CDN节点IP地址并返回至DNS分区缓存。
EDNS OPT信息包括用户子网信息。匹配处理模块63还用于从DNS查询请求报文的报头中获取分区缓存编号,基于分区缓存编号生成用户子网信息。
图7为根据本公开的域名递归查询装置的另一些实施例的模块示意图。如图7所示,该装置可包括存储器71、处理器72、通信接口73以及总线74。存储器71用于存储指令,处理器72耦合到存储器71,处理器72被配置为基于存储器71存储的指令执行实现上述的域名递归查询方法。
存储器71可以为高速RAM存储器、非易失性存储器(non-volatile memory)等,存储器71也可以是存储器阵列。存储器71还可能被分块,并且块可按一定的规则组合成虚拟卷。处理器72可以为中央处理器CPU,或专用集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本公开的域名递归查询方法的一个或多个集成电路。
在一些实施例中,本公开提供一种递归服务器,包括如上任一实施例中的域名递归查询装置。
在一些实施例中,本公开提供一种DNS系统,包括如上任一实施例中的递归服务器。
在一些实施例中,本公开提供一种计算机可读存储介质,计算机可读存储介质存储有计算机指令,指令被处理器执行时实现如上任一些实施例中的域名递归查询方法。
本领域内的技术人员应当明白,本公开的实施例可提供为方法、系统、或计算机程序产品。因此,本公开可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本公开可采用在一个或多个其中包含有计算机可用程序代码的计算机可用非瞬时性存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本公开是参照根据本公开实施例的方法、设备(系统)和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
上述实施例中的域名递归查询方法、装置、递归服务器以及DNS系统、存储介质,确定符合预设的标签添加规则的域名递归查询请求并加入ECS标签信息,利用智能网卡基于ECS标签信息分检出ECS递归查询请求,利用智能网卡基于预设的匹配规则进行匹配处理,对ECS递归查询请求进行相应的处理;能够有效提升递归查询的效率,提升了用户体验;仅对CDN GSLB发送ECS查询报文,保护了运营商的用户网络信息;适用于运营商自建CDN精准调度应用场景,提升运营商CDN的差异化服务能力,有效降低了递归服务器的资源消耗。
可能以许多方式来实现本公开的方法和系统。例如,可通过软件、硬件、固件或者软件、硬件、固件的任何组合来实现本公开的方法和系统。用于方法的步骤的上述顺序仅是为了进行说明,本公开的方法的步骤不限于以上具体描述的顺序,除非以其它方式特别说明。此外,在一些实施例中,还可将本公开实施为记录在记录介质中的程序,这些程序包括用于实现根据本公开的方法的机器可读指令。因而,本公开还覆盖存储用于执行根据本 公开的方法的程序的记录介质。
本公开的描述是为了示例和描述起见而给出的,而并不是无遗漏的或者将本公开限于所公开的形式。很多修改和变化对于本领域的普通技术人员而言是显然的。选择和描述实施例是为了更好说明本公开的原理和实际应用,并且使本领域的普通技术人员能够理解本公开从而设计适于特定用途的带有各种修改的各种实施例。

Claims (20)

  1. 一种域名递归查询方法,应用于递归服务器中,包括:
    在接收的域名递归查询请求中确定符合预设的标签添加规则的域名递归查询请求,并在此域名递归查询请求中加入ECS标签信息;
    利用智能网卡基于所述ECS标签信息,从所述域名递归查询请求中分检出ECS递归查询请求;其中,所述递归服务器中设置有所述智能网卡;
    利用智能网卡基于预设的匹配规则,对所述ECS递归查询请求进行匹配处理,基于匹配处理结果对所述ECS递归查询请求进行相应的处理。
  2. 如权利要求1所述的方法,所述在接收的域名递归查询请求中确定符合预设的标签添加规则的域名递归查询请求包括:
    接收域名系统DNS缓存上报的所述域名递归查询请求;
    判断上报所述域名递归查询请求的DNS缓存是否为DNS分区缓存;
    如果是,则确定此域名递归查询请求符合所述标签添加规则,如果否,则确定此域名递归查询请求不符合所述标签添加规则。
  3. 如权利要求1或2所述的方法,所述ECS标签信息包括:ECS码;所述方法包括:
    获取预设的ECS码,在符合所述标签添加规则的域名递归查询请求中添加所述ECS码。
  4. 如权利要求3所述的方法,所述域名递归查询请求包括:DNS查询请求;所述方法还包括:
    将所述DNS查询请求报文的报头中的OPCODE字段值设置为所述ECS码;
    获取所述DNS分区缓存的分区缓存编号,将所述分区缓存编号添加在所述DNS查询请求报文的报头中的ID字段中。
  5. 如权利要求3或4所述的方法,所述基于所述ECS标签信息,从所述域名递归查询请求中分检出ECS递归查询请求包括:
    判断所述DNS查询请求报文的报头中的OPCODE字段值是否为所述ECS码;
    如果是,则确定此DNS查询请求为所述ECS递归查询请求;如果否,则确定此DNS查询请求不为所述ECS递归查询请求。
  6. 如权利要求5所述的方法,所述基于预设的匹配规则,对所述ECS递归查询请求进行匹配处理包括:
    获取全局负载均衡服务器GSLB中的内容分发网络CDN域名;
    判断所述DNS查询请求报文中的域名是否与所述CDN域名相匹配;
    如果是,则确定此DNS查询请求报文符合所述匹配规则;如果否,则确定此DNS查询请求报文不符合所述匹配规则。
  7. 如权利要求6所述的方法,所述基于匹配处理结果对所述ECS递归查询请求进行相应的处理包括:
    在符合所述匹配规则的DNS查询请求报文中增加EDNS OPT信息,并将此DNS查询请求报文发送给所述GSLB;
    利用所述智能网卡接收所述GSLB返回的CDN节点IP地址并返回至所述DNS分区缓存。
  8. 如权利要求7所述的方法,所述EDNS OPT信息包括用户子网信息;所述方法包括:
    从所述DNS查询请求报文的报头中获取所述分区缓存编号;
    基于所述分区缓存编号生成用户子网信息。
  9. 一种域名递归查询装置,应用于递归服务器中,包括:
    标签模块,用于在接收的域名递归查询请求中确定符合预设的标签添加规则的域名递归查询请求,并在此域名递归查询请求中加入ECS标签信息;
    分检模块,用于利用智能网卡基于所述ECS标签信息,从所述域名递归查询请求中分检出ECS递归查询请求;其中,所述递归服务器中设置有所述智能网卡;
    匹配处理模块,用于利用智能网卡基于预设的匹配规则,对所述ECS递归查询请求进行匹配处理,基于匹配处理结果对所述ECS递归查询请求进行相应的处理。
  10. 如权利要求9所述的装置,其中,
    所述标签模块,具体用于接收域名系统DNS缓存上报的所述域名递归查询请求;判断上报所述域名递归查询请求的DNS缓存是否为DNS分区缓存;如果是,则确定此域名递归查询请求符合所述标签添加规则,如果否,则确定此域名递归查询请求不符合所述标签添加规则。
  11. 如权利要求9或10所述的装置,所述ECS标签信息包括:ECS码;其中,
    所述标签模块,还用于获取预设的ECS码,在符合所述标签添加规则的域名递归查询请求中添加所述ECS码。
  12. 如权利要求11所述的装置,所述域名递归查询请求包括:DNS查询请求;其中,
    所述标签模块,具体用于将所述DNS查询请求报文的报头中的OPCODE字段值设置为所述ECS码;获取所述DNS分区缓存的分区缓存编号,将所述分区缓存编号添加在所述DNS查询请求报文的报头中的ID字段中。
  13. 如权利要求11或12所述的装置,其中,
    所述分检模块,用于判断所述DNS查询请求报文的报头中的OPCODE字段值是否为所述ECS码;如果是,则确定此DNS查询请求为所述ECS递归查询请求;如果否,则确定此DNS查询请求不为所述ECS递归查询请求。
  14. 如权利要求13所述的装置,其中,
    所述匹配处理模块,用于获取全局负载均衡服务器GSLB中的内容分发网络CDN域名;判断所述DNS查询请求报文中的域名是否与所述CDN域名相匹配;如果是,则确定此DNS查询请求报文符合所述匹配规则;如果否,则确定此DNS查询请求报文不符合所述匹配规则。
  15. 如权利要求14所述的装置,其中,
    所述匹配处理模块,还用于在符合所述匹配规则的DNS查询请求报文中增加EDNS OPT信息,并将此DNS查询请求报文发送给所述GSLB;利用所述智能网卡接收所述GSLB返回的CDN节点IP地址并返回至所述DNS分区缓存。
  16. 如权利要求15所述的装置,所述EDNS OPT信息包括用户子网信息;其中,
    所述匹配处理模块,还用于从所述DNS查询请求报文的报头中获取所述分区缓存编号;基于所述分区缓存编号生成用户子网信息。
  17. 一种域名递归查询装置,包括:
    存储器;以及耦接至所述存储器的处理器,所述处理器被配置为基于存储在所述存储器中的指令,执行如权利要求1至8中任一项所述的方法。
  18. 一种递归服务器,包括:
    如权利要求9至17任一项所述的域名递归查询装置。
  19. 一种DNS系统,包括:
    如权利要求18所述的递归服务器。
  20. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述指令被处理器执行如权利要求1至8中任一项所述的方法。
PCT/CN2021/123299 2020-10-13 2021-10-12 域名递归查询方法、装置、递归服务器以及dns系统 WO2022078330A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011092591.1 2020-10-13
CN202011092591.1A CN114363287B (zh) 2020-10-13 2020-10-13 域名递归查询方法、装置、递归服务器以及dns系统

Publications (1)

Publication Number Publication Date
WO2022078330A1 true WO2022078330A1 (zh) 2022-04-21

Family

ID=81090193

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/123299 WO2022078330A1 (zh) 2020-10-13 2021-10-12 域名递归查询方法、装置、递归服务器以及dns系统

Country Status (2)

Country Link
CN (1) CN114363287B (zh)
WO (1) WO2022078330A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170111309A1 (en) * 2015-10-14 2017-04-20 Nominum, Inc. Client subnet efficiency by equivalence class aggregation
CN107896257A (zh) * 2017-12-13 2018-04-10 中国移动通信集团江苏有限公司 部署客户端子系统功能的方法、装置、设备和介质
US10033692B1 (en) * 2017-10-05 2018-07-24 Cloudflare, Inc. Managing domain name system (DNS) queries using a proxy DNS server
CN111327714A (zh) * 2018-12-17 2020-06-23 中国电信股份有限公司 域名递归查询方法、系统以及服务器、dns系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105376344B (zh) * 2015-11-26 2019-01-04 中国互联网络信息中心 一种与源地址相关的递归域名服务器的解析方法及系统
CN108494891A (zh) * 2018-02-28 2018-09-04 网宿科技股份有限公司 一种域名解析方法、服务器及系统
CN110868450B (zh) * 2019-10-15 2022-09-23 平安科技(深圳)有限公司 双机房多入口会话保持方法、系统、装置及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170111309A1 (en) * 2015-10-14 2017-04-20 Nominum, Inc. Client subnet efficiency by equivalence class aggregation
US10033692B1 (en) * 2017-10-05 2018-07-24 Cloudflare, Inc. Managing domain name system (DNS) queries using a proxy DNS server
CN107896257A (zh) * 2017-12-13 2018-04-10 中国移动通信集团江苏有限公司 部署客户端子系统功能的方法、装置、设备和介质
CN111327714A (zh) * 2018-12-17 2020-06-23 中国电信股份有限公司 域名递归查询方法、系统以及服务器、dns系统

Also Published As

Publication number Publication date
CN114363287B (zh) 2022-12-20
CN114363287A (zh) 2022-04-15

Similar Documents

Publication Publication Date Title
US10212124B2 (en) Facilitating content accessibility via different communication formats
CN108881448B (zh) Api请求的处理方法及装置
CN110166570B (zh) 业务会话管理方法、装置、电子设备
CN107528862B (zh) 域名解析的方法及装置
US10263950B2 (en) Directing clients based on communication format
US11025584B2 (en) Client subnet efficiency by equivalence class aggregation
CN109040243B (zh) 一种报文处理方法及装置
CN101873358A (zh) 一种基于域名解析的链路负载均衡方法和设备
CN107580079B (zh) 一种报文传输方法和装置
EP2869510B1 (en) Express header for packets with hierarchically structured variable-length identifiers
CN113556413B (zh) 一种报文处理方法及装置
CN112272164B (zh) 报文处理方法及装置
WO2019071995A1 (zh) 内容分发方法、设备及系统
WO2014075450A1 (zh) 资源下载方法、业务服务器及手机客户端
CN106878052B (zh) 一种用户迁移方法和装置
CN106789671B (zh) 一种业务报文转发方法及设备
WO2022078330A1 (zh) 域名递归查询方法、装置、递归服务器以及dns系统
CN114785733B (zh) 一种实现跨vpc网络流量转发中会话溯源的方法
CN103685367A (zh) 离线下载系统和方法
CN107547687B (zh) 一种报文传输方法和装置
CN111935336A (zh) 基于IPv6的网络治理方法及系统
CN114598677B (zh) Cdn调度方法及系统、智能网卡、电子设备
CN115801731B (zh) 网络报文的处理方法、装置、电子设备及存储介质
CN114268630B (zh) 基于静态arp表项实现随机负载均衡访问方法、装置及设备
WO2022089027A1 (zh) 发送报文的方法、装置、系统及存储介质

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21879374

Country of ref document: EP

Kind code of ref document: A1