CN108848205B - CNAME domain name resolution method for distinguishing IPv4 and IPv6 - Google Patents

CNAME domain name resolution method for distinguishing IPv4 and IPv6 Download PDF

Info

Publication number
CN108848205B
CN108848205B CN201810838351.8A CN201810838351A CN108848205B CN 108848205 B CN108848205 B CN 108848205B CN 201810838351 A CN201810838351 A CN 201810838351A CN 108848205 B CN108848205 B CN 108848205B
Authority
CN
China
Prior art keywords
domain name
record
ipv6
name resolution
ipv4
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201810838351.8A
Other languages
Chinese (zh)
Other versions
CN108848205A (en
Inventor
邓宇庭
王鹏
王道佳
李子超
郭思琦
王君妍
丛群
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Wangruida Science & Technology Co ltd
Original Assignee
Beijing Wangruida Science & Technology Co ltd
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 Beijing Wangruida Science & Technology Co ltd filed Critical Beijing Wangruida Science & Technology Co ltd
Priority to CN201810838351.8A priority Critical patent/CN108848205B/en
Publication of CN108848205A publication Critical patent/CN108848205A/en
Application granted granted Critical
Publication of CN108848205B publication Critical patent/CN108848205B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/10Mapping addresses of different types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/668Internet protocol [IP] address subnets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/686Types of network addresses using dual-stack hosts, e.g. in Internet protocol version 4 [IPv4]/Internet protocol version 6 [IPv6] networks

Abstract

A CNAME domain name resolution method for distinguishing IPv4 and IPv6 selects IPv4CNAME or IPv6CNAME respectively for replying according to whether the domain name type queried by a client is A record or AAAA record, thereby solving the defect that the CNAME does not support multiple values at the same time. When the domain name resolution request inquired by the client is of an ANY or CNAME type, the IP address of the client source in the request message can be checked, and IPv4CNAME or IPv6CNAME can be judged and selected to respond according to the IP address. The invention can use the CDN server only supporting IPv4 and/or IPv6 to realize domain name resolution for IPv4 and IPv6 users and provide consistent network access experience for different users. The method can be applied to the whole long-term process of transition from IPv4 to IPv6, and effectively and reasonably provides an IPv6 service channel. In addition, the invention only changes the resolution record configuration of the domain name, does not change the client, has good compatibility and is convenient for popularization and application.

Description

CNAME domain name resolution method for distinguishing IPv4 and IPv6
Technical Field
The invention relates to a CNAME domain name resolution method for distinguishing IPv4 and IPv6, belonging to the technical field of computer network communication.
Background
The domain Name system dns (domain Name system) is a core service of the internet, also called a system for solving machine naming on the internet, and serves as a distributed database that maps domain names and IP addresses to each other, enabling users to access the internet more conveniently without memorizing IP address numeric strings that can be directly read by machines. Because each host on the Internet must first know its address when accessing another host, the IP address in the TCP/IP protocol is composed of four 32-bit binary digits separated by ". quadrature.. The domain name system is used to manage the correspondence between the name and the IP address where the computer or server is located. The conversion process of finally obtaining the IP address corresponding to the domain name through the domain name is called domain name resolution.
Typically, for the sake of brevity, domain names are used to identify the node addresses of the computers in place of IP addresses, and resolution of the domain names is accomplished by a DNS server. Each domain name has its own authoritative DNS server, which is provided with a zone file (zone file) of the domain name, the zone file is composed of a plurality of records, wherein the common record types include a record, AAAA record, CNAME record, and the like.
The a record is a record for corresponding a domain name (or a host name) to an IPv4 address, the AAAA record is a record for corresponding a domain name (or a host name) to an IPv6 address, and the chinese translation name of the CNAME record is an alias, also known as a canonical name; such records are used to alias domain names, i.e., to map multiple names (i.e., aliases) to the same computer, typically a computer that provides both WWW and MAIL services. For example, the name (or domain name) of a computer is "host" (A record), which provides both WWW and MAIL services. To facilitate user access to the service. The computer is set with two CNAMEs of WWW and MAIL, respectively: the full names of the two aliases are the domain name beginning with www (e.g., www.test.com) and the domain name beginning with mail (e.g., mail. In effect, both aliases point to "host". That is, access requests to www.test.com and/or mail.test.com can all be resolved to host.example.com. The method can be used for recording A of one domain name to point to the IP address of the server when a user has a plurality of domain names and needs to point to the same IP address of the server. Then, other domain names are used as alias names and point to the domain name recorded before A, so that when the IP address of the server of the user is changed, the point of each domain name can be changed one by one without trouble. Only the pointing direction of the domain name recorded in the A record needs to be changed, and other pointing directions taking the alias as the domain name can be automatically changed to a new IP address. Furthermore, the CNAME record in the prior art cannot coexist with the a record and the AAAA record, that is, once the CNAME record is set for a certain domain name, the a record and the AAAA record cannot be set again.
In order to solve the problem of access delay caused by geographical position distribution, bandwidth and server performance and improve the response speed and success rate of a user accessing a website, the current large-scale website delivers website services to a Content Delivery Network (CDN) service provider for hosting, specifically, a CNAME record is added to a domain name, the CNAME record corresponds to the domain name provided by the hosted CDN service provider, so that an access request of the user to the domain name is forwarded to the corresponding CDN service provider, the service provider serves nearby according to user access characteristic information, and the access experience of the user is improved.
In recent years, with the popularization of the IPv6 technology, domain names receive more and more domain name resolution requests from IPv6 users. When a user using the IPv6 protocol accesses a domain name, the domain name needs to be resolved to an IPv6 address. However, since the domain name uses the CDN hosting service and the CNAME record is set, the AAAA record cannot be set any more. However, the current IPv6 technology is still in the promotion transition phase, and the process of promotion transition is likely to be a long period of time. In addition, since the current commercial CDN service provider cannot provide content delivery service based on the IPv6 protocol, that is, the CDN service provider cannot provide domain name resolution results for IPv6 users, the IPv6 users cannot access domain names or request domain name resolution service using the IPv6 protocol. The technical bottleneck which seriously affects the network access experience of the IPv6 user becomes a new topic with great practical value, and is a new focus of attention of technical personnel in the industry.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a CNAME domain name resolution method for distinguishing IPv4 and IPv6, which can be used by a provider of a website service to simultaneously use a CDN server supporting only IPv4 and/or only IPv6, or use CDN servers supporting both IPv4 and IPv6, so as to intelligently implement IPv4 resolution and IPv6 resolution of domain names for IPv4 users and/or IPv6 users, respectively, that is, to provide consistent network access experience for different users of IPv4 and/or IPv 6. By using the method of the invention, in the whole process of transition from IPv4 to IPv6, a service provider can effectively and reasonably provide an IPv6 service channel without being restricted by the transition process of the existing CDN service provider IPv 6.
In order to achieve the above object, the present invention provides a CNAME domain name resolution method for distinguishing IPv4 and IPv6, wherein the method includes the following steps:
step 1, at least one IPv4CNAME record and IPv6CNAME record are respectively set for each domain name which needs to provide domain name resolution for IPv4 and/or IPv6 users and further obtains an IPv4 address and/or IPv6 address resolution result, and then the domain name is set to be an N-type domain name;
step 2, when receiving a domain name resolution request from a user client, a domain name server firstly detects whether a domain name needing resolution in a domain name resolution request message is an N-type domain name; if not, executing the traditional domain name resolution operation step; if yes, calculating and judging the domain name resolution request type in the client request message, and executing corresponding follow-up operation according to the judgment result:
(a) if the domain name resolution request type in the resolution request message is A record, executing the subsequent step 3;
(b) if the domain name resolution request type in the resolution request message is an AAAA record, skipping to execute a subsequent step 4;
(c) if the domain name resolution request type in the resolution request message is an ANY or CNAME record, then further checking the client source IP address type in the resolution request message, and if the domain name resolution request type is an IPv4 address, then executing the subsequent step 3; if the address is the IPv6 address, skipping to execute the subsequent step 4;
(d) if the domain name resolution request in the resolution request message is other than the four types, executing the traditional domain name resolution operation step;
step 3, the domain name server returns an IPv4CNAME record corresponding to the record A for the client;
step 4, the domain name server returns IPv6CNAME records corresponding to the AAAA records to the client;
step 5, after receiving the response message of the domain name server, the client side continues to initiate a domain name resolution request to the CNAME record in the response message; then, a conventional subsequent domain name resolution service is provided by a content Delivery network (cdn) service provider.
The CNAME domain name resolution method for distinguishing IPv4 and IPv6 has the advantages and effects that:
the method of the invention better solves the problem that the prior CDN service provider can not resolve the IPv6 domain name due to technical limitation, but has the urgent need that a plurality of users hope that the owner of the website provides IPv6 domain name resolution service. If the CDN service provider still cannot support the requirement of resolving the IPv6 domain name, the owner of the website may select a self-established domain name resolution path additionally using the method of the present invention, or may select another CDN service provider that supports IPv6 resolution using the method of the present invention to provide IPv6 domain name resolution service, so as to provide the IPv4 and/or IPv6 domain name resolution service to the user at the same time.
The method only changes the resolution record configuration of the domain name, and does not need to change the client, so the method has good compatibility and is convenient for popularization and application.
The application of the method of the invention can promote and accelerate the popularization and application of the IPv6 technology in the IPv6 transition stage, and provides the domain name resolution service of IPv6 for the existing domain name resolution service based on IPv4, especially for the CDN content distribution network.
The key innovative technology of the CNAME domain name resolution method for distinguishing IPv4 and IPv6 in the invention is as follows:
the method of the invention is to select IPv4CNAME record or IPv6CNAME record respectively for reply according to whether the domain name resolution request type inquired by the client is A record or AAAA record, thereby solving the problem that the CNAME record can not support multiple values at the same time.
When the domain name resolution request type inquired by the client is ANY or CNAME record, the method can further check and inquire the client source IP address in the domain name resolution request message, thereby judging the network protocol supported by the client source IP address according to the client source IP address, and pertinently selecting IPv4CNAME record or IPv6CNAME record to reply.
The invention can simultaneously support the multi-value resolution of the same network protocol domain name resolution request type: when a domain name has multiple IPv4CNAME records or multiple IPv6CNAME records, the load can be balanced among multiple CDN service providers according to multiple methods such as weighting, polling, or random.
Drawings
Fig. 1 is a flowchart of the operation steps of the CNAME domain name resolution method for distinguishing IPv4 and IPv6 according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the accompanying drawings.
Referring to fig. 1, the specific operation steps of the CNAME domain name resolution method for distinguishing IPv4 and IPv6 according to the present invention are described:
step 1, at least one IPv4CNAME record and IPv6CNAME record are respectively set for each domain name which needs to provide domain name resolution for IPv4 and/or IPv6 users and further obtains IPv4 addresses and/or IPv6 address resolution results, and then the domain name is set to be an N-type domain name.
In the operation step, if there are 2 or more than 2 IPv4CNAME records and/or IPv6CNAME records, a record selection algorithm is to be set for each of 2 or more than 2 CNAME records of each type, where the record selection algorithm includes: random out-of-order selection, weight-scale selection, or round-robin selection.
Step 2, when receiving a domain name resolution request from a user client, a domain name server firstly detects whether a domain name needing resolution in a domain name resolution request message is an N-type domain name;
if not, executing the traditional domain name resolution operation step;
if yes, calculating and judging the domain name resolution request type in the client request message, and executing corresponding follow-up operation according to the judgment result:
(a) if the domain name resolution request type in the resolution request message is A record, executing the subsequent step 3;
(b) if the domain name resolution request type in the resolution request message is an AAAA record, skipping to execute a subsequent step 4;
(c) if the domain name resolution request type in the resolution request message is an ANY or CNAME record, then further checking the client source IP address type in the resolution request message, and if the domain name resolution request type is an IPv4 address, then executing the subsequent step 3; if the address is the IPv6 address, skipping to execute the subsequent step 4;
(d) if the domain name resolution request in the resolution request message is of other types than the above four types, the traditional domain name resolution operation step is executed.
Step 3, the domain name server returns an IPv4CNAME record corresponding to the record A for the client; if the corresponding IPv4CNAME records have 2 or more than 2 records, one record needs to be selected for response according to a set record selection algorithm.
Step 4, the domain name server returns IPv6CNAME records corresponding to the AAAA records to the client; if the corresponding IPv6CNAME records have 2 or more than 2 records, one record needs to be selected for response according to a set record selection algorithm.
Step 5, after receiving the response message of the domain name server, the client side continues to initiate a domain name resolution request to the CNAME record in the response message; then, a conventional subsequent domain name resolution service is provided by a content Delivery network (cdn) service provider.
The invention has been carried out with the experimental application of the simulation embodiment: the home page www.wrdtech.com of netereda is subjected to domain name resolution by the domain name resolution method of the present invention, that is, two CNAME records are set in the domain name www.wrdtech.com. Where CNAME for IPv4 is recorded at www4.wrdtech.com, and CNAME for IPv6 is recorded at www6. wrdtech.com. The AAAA record for the domain name www6.wrdtech.com is set to 2001: da8:215: 1. The method and the device realize the desire of respectively returning different analysis results to the IPv4 client and the IPv6 client. Through implementation tests of dozens of weeks, the CNAME domain name resolution method for distinguishing IPv4 and IPv6 is successful, achieves the purpose of the invention and is expected to be further popularized and applied.

Claims (4)

1. A CNAME domain name resolution method for distinguishing IPv4 and IPv6 is characterized by comprising the following operation steps:
step 1, at least one IPv4CNAME record and one IPv6CNAME record are respectively set for the same domain name which needs to provide domain name resolution for IPv4 and/or IPv6 users and further obtains the IPv4 address and/or IPv6 address resolution result, and then the domain name is set as an N-type domain name;
step 2, when receiving a domain name resolution request from a user client, a domain name server firstly detects whether a domain name needing resolution in a domain name resolution request message is an N-type domain name; if not, executing the traditional domain name resolution operation step; if yes, calculating and judging the domain name resolution request type in the client request message, and executing corresponding follow-up operation according to the judgment result:
(a) if the domain name resolution request type in the resolution request message is A record, executing the subsequent step 3;
(b) if the domain name resolution request type in the resolution request message is an AAAA record, skipping to execute a subsequent step 4;
(c) if the domain name resolution request type in the resolution request message is an ANY or CNAME record, then further checking the client source IP address type in the resolution request message, and if the domain name resolution request type is an IPv4 address, then executing the subsequent step 3; if the address is the IPv6 address, skipping to execute the subsequent step 4;
(d) if the domain name resolution request in the resolution request message is other than the four types, executing the traditional domain name resolution operation step;
step 3, the domain name server returns an IPv4CNAME record corresponding to the record A for the client;
step 4, the domain name server returns IPv6CNAME records corresponding to the AAAA records to the client;
step 5, after receiving the response message of the domain name server, the client side continues to initiate a domain name resolution request to the CNAME record in the response message; then, a conventional subsequent domain name resolution service is provided by a content Delivery network (cdn) service provider.
2. The method of claim 1, wherein: in step 1, if there are 2 or more than 2 IPv4CNAME records and/or IPv6CNAME records, a record selection algorithm is to be set for each of 2 or more than 2 CNAME records, where the record selection algorithm includes: random out-of-order selection, weight-scale selection, or round-robin selection.
3. The method of claim 2, wherein: in step 3, if there are 2 or more IPv4CNAME records, it is necessary to select one of the records according to a set record selection algorithm to respond.
4. The method of claim 2, wherein: in the step 4, if there are 2 or more IPv6CNAME records, one of the records needs to be selected according to a set record selection algorithm to respond.
CN201810838351.8A 2018-07-27 2018-07-27 CNAME domain name resolution method for distinguishing IPv4 and IPv6 Active CN108848205B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810838351.8A CN108848205B (en) 2018-07-27 2018-07-27 CNAME domain name resolution method for distinguishing IPv4 and IPv6

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810838351.8A CN108848205B (en) 2018-07-27 2018-07-27 CNAME domain name resolution method for distinguishing IPv4 and IPv6

Publications (2)

Publication Number Publication Date
CN108848205A CN108848205A (en) 2018-11-20
CN108848205B true CN108848205B (en) 2021-12-28

Family

ID=64192248

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810838351.8A Active CN108848205B (en) 2018-07-27 2018-07-27 CNAME domain name resolution method for distinguishing IPv4 and IPv6

Country Status (1)

Country Link
CN (1) CN108848205B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109547583B (en) * 2018-11-22 2022-02-25 中国移动通信集团江苏有限公司 Domain name resource query method, device, equipment and computer storage medium
CN110809070A (en) * 2019-11-12 2020-02-18 睿哲科技股份有限公司 Website domain name resolution record processing method and device, electronic equipment and storage medium
CN110995888A (en) * 2019-12-17 2020-04-10 互联网域名系统北京市工程研究中心有限公司 Intelligent resolution method of domain name system
CN111147621B (en) * 2019-12-30 2022-05-03 互联网域名系统北京市工程研究中心有限公司 Method for supporting IPv6 service access of external network user
CN111010462A (en) * 2019-12-30 2020-04-14 互联网域名系统北京市工程研究中心有限公司 IPv6 domain name resolution method based on TRANS record
CN111416884B (en) * 2020-03-12 2021-08-31 苏州浪潮智能科技有限公司 CTDB virtual IP allocation method and device and distributed storage equipment
CN111447297B (en) * 2020-03-20 2021-10-15 福建万物易联网络科技有限公司 IPv4 and IPv6 DNS unified access management method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1756263A (en) * 2004-09-27 2006-04-05 上海贝尔阿尔卡特股份有限公司 Domain name analytic method, domain name server and domain name system
CN102098192A (en) * 2011-03-18 2011-06-15 清华大学 Cross-domain network measuring method based on web servers
CN102771083A (en) * 2009-12-23 2012-11-07 思杰系统有限公司 Systems and methods for mixed mode of IPv6 and IPv4 DNS of global server load balancing
CN103856408A (en) * 2014-02-17 2014-06-11 中国科学院计算机网络信息中心 IPv6 and IPv4 intercommunication method based on DNS
US9231903B2 (en) * 2011-12-30 2016-01-05 Time Warner Cable Enterprises Llc System and method for resolving a DNS request using metadata

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10033635B2 (en) * 2015-11-11 2018-07-24 Fastly, Inc. Enhanced infrastructure routing with prefixed network addressing in content delivery networks

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1756263A (en) * 2004-09-27 2006-04-05 上海贝尔阿尔卡特股份有限公司 Domain name analytic method, domain name server and domain name system
CN102771083A (en) * 2009-12-23 2012-11-07 思杰系统有限公司 Systems and methods for mixed mode of IPv6 and IPv4 DNS of global server load balancing
CN102098192A (en) * 2011-03-18 2011-06-15 清华大学 Cross-domain network measuring method based on web servers
US9231903B2 (en) * 2011-12-30 2016-01-05 Time Warner Cable Enterprises Llc System and method for resolving a DNS request using metadata
CN103856408A (en) * 2014-02-17 2014-06-11 中国科学院计算机网络信息中心 IPv6 and IPv4 intercommunication method based on DNS

Also Published As

Publication number Publication date
CN108848205A (en) 2018-11-20

Similar Documents

Publication Publication Date Title
CN108848205B (en) CNAME domain name resolution method for distinguishing IPv4 and IPv6
US10666608B2 (en) Transparent proxy authentication via DNS processing
US9231903B2 (en) System and method for resolving a DNS request using metadata
US9525749B2 (en) DNS server arrangement and method
CN111245972B (en) Domain name resolution method, device, medium and equipment
US20180227269A1 (en) Correlating nameserver IPv6 and IPv4 addresses
WO2017173766A1 (en) Domain name parsing acceleration method, system and apparatus
US8326980B2 (en) Using DNS reflection to measure network performance
US8966122B2 (en) Cross-protocol communication in domain name systems
US20060218289A1 (en) Systems and methods of registering and utilizing domain names
CN103281409B (en) Based on mobile Internet domain name analytic method and the dns server of Transmission Control Protocol
CN107786678B (en) Domain name resolution method, device and system
CN111447304B (en) Anycast node IP address enumeration method and system for anycast recursive domain name system
CN109327559B (en) Domain name resolution method and device based on hybrid cloud platform
CN107613039B (en) IP address attribution inquiry method, device, system and storage medium
CN106161667A (en) A kind of domain name analytic method and device
CN110809070A (en) Website domain name resolution record processing method and device, electronic equipment and storage medium
CN104079682A (en) Address translation method and device based on domain name system (DNS)
KR100342107B1 (en) Methods for deciding Internet address groups distinguished by assigned organizations or locations and for resolving the geographical information for each address group, which are intended to set up Internet address supplementary system and its applications
CN111447297B (en) IPv4 and IPv6 DNS unified access management method and system
CN116566945A (en) Access method and device for decentralised application, electronic equipment and storage medium
Lu et al. Research on Unexpected DNS Response from Open DNS Resolvers
CN105245626A (en) Method for realizing website addressing by using shortcut domain name in private network
JP2016208443A (en) Name resolution device, name resolution method and name resolution program
CN114268605B (en) Intelligent DNS realization method and device and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information

Inventor after: Deng Yuting

Inventor after: Wang Peng

Inventor after: Wang Daojia

Inventor after: Li Zichao

Inventor after: Guo Siqi

Inventor after: Wang Junyan

Inventor after: Cluster

Inventor before: Guo Siqi

Inventor before: Wang Junyan

Inventor before: Cluster

CB03 Change of inventor or designer information
GR01 Patent grant
GR01 Patent grant