[go: up one dir, main page]

CN104506665B - Distinguish method and system in a kind of IPv4/IPv6 addresses - Google Patents

Distinguish method and system in a kind of IPv4/IPv6 addresses Download PDF

Info

Publication number
CN104506665B
CN104506665B CN201410773471.6A CN201410773471A CN104506665B CN 104506665 B CN104506665 B CN 104506665B CN 201410773471 A CN201410773471 A CN 201410773471A CN 104506665 B CN104506665 B CN 104506665B
Authority
CN
China
Prior art keywords
address
ipv6
domain name
ipv4
ipv6 address
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
CN201410773471.6A
Other languages
Chinese (zh)
Other versions
CN104506665A (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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201410773471.6A priority Critical patent/CN104506665B/en
Publication of CN104506665A publication Critical patent/CN104506665A/en
Application granted granted Critical
Publication of CN104506665B publication Critical patent/CN104506665B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/251Translation of Internet protocol [IP] addresses between different IP versions

Landscapes

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

Abstract

本发明提供一种IPv4/IPv6地址区分方法及系统,涉及通信领域,以解决双栈用户通过IPv6协议栈访问IPv4服务器造成的用户体验降低的问题。该方法包括:权威DNS接收本地DNS发送的域名,并根据域名地址映射列表,得到对应域名的IPv4地址和IPv6地址,其中,对应域名的IPv6地址为原生的IPv6地址或权威DNS增加的对应于IPv4地址的IPv6地址,权威DNS对增加的对应于IPv4地址的IPv6地址进行标记,并将对应域名的IPv4地址和IPv6地址发送至本地DNS;本地DNS接收对应域名的IPv4地址和IPv6地址,并根据用户终端的类型以及IPv6地址是否具有标记,向用户终端发送IPv4地址或IPv6地址。本发明用于IPv4向IPv6转换的过渡业务中。

The invention provides a method and system for distinguishing IPv4/IPv6 addresses, relates to the communication field, and solves the problem of reduced user experience caused by dual-stack users accessing an IPv4 server through an IPv6 protocol stack. The method includes: the authoritative DNS receives the domain name sent by the local DNS, and according to the domain name address mapping list, obtains the IPv4 address and the IPv6 address of the corresponding domain name, wherein the IPv6 address corresponding to the domain name is the original IPv6 address or the corresponding IPv4 address added by the authoritative DNS The IPv6 address of the address, the authoritative DNS marks the added IPv6 address corresponding to the IPv4 address, and sends the IPv4 address and IPv6 address of the corresponding domain name to the local DNS; the local DNS receives the IPv4 address and IPv6 address of the corresponding domain name, and according to the user The type of the terminal and whether the IPv6 address has a flag, and the IPv4 address or the IPv6 address is sent to the user terminal. The present invention is used in the transition business of converting from IPv4 to IPv6.

Description

一种IPv4/IPv6地址区分方法及系统A method and system for distinguishing IPv4/IPv6 addresses

技术领域technical field

本发明涉及通信领域,尤其涉及一种IPv4/IPv6地址区分方法及系统。The invention relates to the communication field, in particular to a method and system for distinguishing IPv4/IPv6 addresses.

背景技术Background technique

近年来,由于IPv4网络所包含的网络地址不足,已限制了网络发展的原因,全球网络具有由IPv4向IPv6过渡的必然趋势,在此过程中,绝大多数中小型CP(ContentProvider,内容提供商)/SP(Service Provider,服务提供商)无能力也无资源向IPv6整体迁移,因此,IPv6单栈用户访问IPv4应用的问题不可避免。现有技术采用NAT64/DNS64系统以解决上述问题。该方案在互联网数据中心IDC(Internet Data Center)出口处部署NAT64,通过协议翻译,将IPv4数据包转换为IPv6数据包并发送回用户终端,以使IPv6单栈用户能够访问IPv4应用。In recent years, due to the lack of network addresses contained in the IPv4 network, the development of the network has been limited. The global network has an inevitable trend of transition from IPv4 to IPv6. During this process, most small and medium CP (ContentProvider, content provider )/SP (Service Provider, Service Provider) has neither the ability nor the resources to migrate to IPv6 as a whole. Therefore, the problem of IPv6 single-stack users accessing IPv4 applications is inevitable. The prior art adopts the NAT64/DNS64 system to solve the above problems. This solution deploys NAT64 at the exit of the Internet Data Center (IDC), converts IPv4 data packets into IPv6 data packets through protocol translation and sends them back to user terminals, so that IPv6 single-stack users can access IPv4 applications.

然而,在NAT64、DNS64系统中,IPv4/IPv6双栈用户不但可通过IPv4协议栈直接访问IPv4应用,也可同IPv6单栈服务器一样,通过IPv6协议栈经过NAT64翻译以访问IPv4应用。当大量双栈用户通过IPv6协议栈经过NAT64翻译以访问IPv4应用时,IDC出口部署的NAT64设备被大量双栈用户所占用,致使IPv6单栈用户无法得到充分的NAT64翻译服务,且NAT64的翻译过程导致双栈用户的访问产生时延,最终影响IPv6单栈用户和双栈用户的业务体验。However, in NAT64 and DNS64 systems, IPv4/IPv6 dual-stack users can not only directly access IPv4 applications through the IPv4 protocol stack, but also access IPv4 applications through NAT64 translation through the IPv6 protocol stack, just like IPv6 single-stack servers. When a large number of dual-stack users access IPv4 applications through NAT64 translation through the IPv6 protocol stack, the NAT64 devices deployed at the IDC egress are occupied by a large number of dual-stack users, resulting in the inability of IPv6 single-stack users to obtain sufficient NAT64 translation services, and the translation process of NAT64 This leads to delays in the access of dual-stack users, and ultimately affects the service experience of IPv6 single-stack users and dual-stack users.

发明内容Contents of the invention

本发明实施例提供了一种IPv4/IPv6地址区分方法及系统,以解决大量双栈用户通过IPv6协议栈经过NAT64翻译以访问IPv4服务器,所造成的IPv6单栈用户和双栈用户的业务体验降低的问题。The embodiment of the present invention provides a method and system for distinguishing IPv4/IPv6 addresses to solve the problem that a large number of dual-stack users access IPv4 servers through NAT64 translation through the IPv6 protocol stack, resulting in reduced service experience of IPv6 single-stack users and dual-stack users The problem.

为达到上述目的,本发明的实施例采用如下技术方案:In order to achieve the above object, embodiments of the present invention adopt the following technical solutions:

第一方面,本发明提供了一种IPv4/IPv6地址区分方法,包括以下步骤:In a first aspect, the present invention provides a method for distinguishing IPv4/IPv6 addresses, comprising the following steps:

地址标记步骤,权威DNS接收本地DNS发送的域名,并根据权威DNS的域名地址映射列表,得到对应所述域名的IPv4地址和IPv6地址,其中,对应所述域名的IPv6地址为原生的IPv6地址或权威DNS增加的对应所述IPv4地址的IPv6地址,权威DNS对所述增加的对应所述IPv4地址的IPv6地址进行标记,并将对应所述域名的IPv4地址和IPv6地址发送至本地DNS,以使本地DNS能够通过对应所述域名的IPv6地址是否具有标记判断对应所述域名的服务器是否支持IPv6协议栈;Address marking step, the authoritative DNS receives the domain name sent by the local DNS, and obtains the IPv4 address and IPv6 address corresponding to the domain name according to the domain name address mapping list of the authoritative DNS, wherein the IPv6 address corresponding to the domain name is a native IPv6 address or The IPv6 address corresponding to the IPv4 address added by the authoritative DNS, the authoritative DNS marks the added IPv6 address corresponding to the IPv4 address, and sends the IPv4 address and IPv6 address corresponding to the domain name to the local DNS, so that The local DNS can judge whether the server corresponding to the domain name supports the IPv6 protocol stack by whether the IPv6 address corresponding to the domain name has a mark;

地址发送步骤,本地DNS接收对应所述域名的IPv4地址和IPv6地址,并根据用户类型以及所述IPv6地址是否具有标记,向所述用户终端发送所述IPv4地址或IPv6地址,以为用户终端提供对应用户访问的域名的地址。The address sending step, the local DNS receives the IPv4 address and IPv6 address corresponding to the domain name, and sends the IPv4 address or IPv6 address to the user terminal according to the user type and whether the IPv6 address has a mark, so as to provide the user terminal with a corresponding The address of the domain name that the user visits.

结合第一方面,在第一种可能的实施方式中,所述根据域名地址映射列表,得到对应所述域名的IPv4地址和IPv6地址包括:With reference to the first aspect, in a first possible implementation manner, the obtaining the IPv4 address and IPv6 address corresponding to the domain name according to the domain name address mapping list includes:

地址获取模块查询所述域名地址映射列表,得到对应所述域名的IPv4地址;以及The address acquisition module queries the domain name address mapping list to obtain the IPv4 address corresponding to the domain name; and

地址获取模块查询所述域名地址映射列表,若能够查询到原生的IPv6地址,则得到对应所述域名的IPv6地址;若无法查询到原生的IPv6地址,则增加对应所述IPv4地址的IPv6地址,得到对应所述域名的IPv6地址。The address acquisition module queries the domain name address mapping list, if the original IPv6 address can be found, then obtains the IPv6 address corresponding to the domain name; if the original IPv6 address cannot be found, then increases the IPv6 address corresponding to the IPv4 address, An IPv6 address corresponding to the domain name is obtained.

结合第一方面和第一方面的第一种可能的实施方式,在第二种可能的实施方式中,所述根据用户类型以及所述IPv6地址是否具有标记,向所述用户终端发送所述IPv4地址或IPv6地址包括:In combination with the first aspect and the first possible implementation manner of the first aspect, in a second possible implementation manner, according to the user type and whether the IPv6 address has a flag, sending the IPv4 address to the user terminal Addresses or IPv6 addresses include:

用户类型判断步骤,用户类型判断模块根据用户的源地址判断所述用户类型,所述用户类型包括IPv4单栈用户,IPv6单栈用户,双栈用户;User type judging step, the user type judging module judges the user type according to the source address of the user, and the user type includes IPv4 single-stack users, IPv6 single-stack users, dual-stack users;

发送步骤,发送模块根据用户类型判断模块判断的结果,向所述用户终端发送IPv4地址或IPv6地址。In the sending step, the sending module sends the IPv4 address or IPv6 address to the user terminal according to the judgment result of the user type judging module.

结合第一方面的第二种可能的实施方式,在第三种可能的实施方式中,当所述用户类型判断模块判断所述用户类型为双栈用户时,所述发送步骤具体包括:With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner, when the user type judging module judges that the user type is a dual-stack user, the sending step specifically includes:

若所述对应所述域名的IPv6地址具有标记,则向所述用户终端发送对应所述域名的IPv4地址;If the IPv6 address corresponding to the domain name has a mark, sending the IPv4 address corresponding to the domain name to the user terminal;

若所述对应所述域名的IPv6地址不具有标记,则向所述用户终端发送对应所述域名的IPv6地址。If the IPv6 address corresponding to the domain name does not have a flag, sending the IPv6 address corresponding to the domain name to the user terminal.

结合第一方面的第一种可能的实施方式,在第四种可能的实施方式中,所述对所述权威DNS增加的对应所述IPv4地址的IPv6地址进行标记具体包括:With reference to the first possible implementation manner of the first aspect, in a fourth possible implementation manner, the marking the IPv6 address corresponding to the IPv4 address added by the authoritative DNS specifically includes:

将所述权威DNS增加的对应所述IPv4地址的IPv6地址的至少一位设置为标记值。Setting at least one bit of the IPv6 address corresponding to the IPv4 address added by the authoritative DNS as a flag value.

结合第一方面的第二种可能的实施方式,在第五种可能的实施方式中,所述用户类型判断步骤所采用的具体方式包括:With reference to the second possible implementation manner of the first aspect, in a fifth possible implementation manner, the specific methods adopted in the step of determining the user type include:

通过预存储双栈用户的IP地址范围,判断所述用户类型;以及By pre-storing the IP address range of the dual-stack users, judging the user type; and

通过与接入认证设备交互,根据进行IPv6解析请求的用户源IPv6地址判断所述用户类型。By interacting with the access authentication device, the user type is judged according to the source IPv6 address of the user making the IPv6 resolution request.

结合第一方面的第五种可能的实施方式,在第六种可能的实施方式中,提供了所述接入认证设备的具体定义,包括:With reference to the fifth possible implementation manner of the first aspect, in a sixth possible implementation manner, a specific definition of the access authentication device is provided, including:

宽带远程接入服务器BRAS、远程用户拨号认证系统RADIUS。Broadband remote access server BRAS, remote user dial-up authentication system RADIUS.

第二方面,本发明提供了一种IPv4/IPv6地址区分系统,包括:In a second aspect, the present invention provides a system for distinguishing IPv4/IPv6 addresses, including:

权威DNS,用于接收本地DNS发送的域名,并根据权威DNS的域名地址映射列表,得到对应所述域名的IPv4地址和IPv6地址,其中,对应所述域名的IPv6地址为原生的IPv6地址或权威DNS增加的对应所述IPv4地址的IPv6地址,权威DNS对所述增加的对应所述IPv4地址的IPv6地址进行标记,并将对应所述域名的IPv4地址和IPv6地址发送至本地DNS,以使本地DNS能够通过对应所述域名的IPv6地址是否具有标记判断对应所述域名的服务器是否支持IPv6协议栈;The authoritative DNS is used to receive the domain name sent by the local DNS, and obtain the IPv4 address and IPv6 address corresponding to the domain name according to the domain name address mapping list of the authoritative DNS, wherein the IPv6 address corresponding to the domain name is a native IPv6 address or an authoritative DNS address. The IPv6 address corresponding to the IPv4 address added by the DNS, the authoritative DNS marks the added IPv6 address corresponding to the IPv4 address, and sends the IPv4 address and IPv6 address corresponding to the domain name to the local DNS, so that the local DNS can judge whether the server corresponding to the domain name supports the IPv6 protocol stack by whether the IPv6 address corresponding to the domain name has a mark;

本地DNS,与所述权威DNS连接,用于接收对应所述域名的IPv4地址和IPv6地址,并根据用户类型以及所述IPv6地址是否具有标记,向所述用户终端发送所述IPv6地址或IPv4地址,以为用户终端提供对应用户访问的域名的地址。A local DNS, connected to the authoritative DNS, used to receive the IPv4 address and IPv6 address corresponding to the domain name, and send the IPv6 address or IPv4 address to the user terminal according to the user type and whether the IPv6 address has a mark , to provide the user terminal with the address corresponding to the domain name accessed by the user.

结合第二方面,在第一种可能的实施方式中,所述权威DNS包括:With reference to the second aspect, in a first possible implementation manner, the authoritative DNS includes:

地址获取模块,用于Address acquisition module for

查询所述域名地址映射列表,得到对应所述域名的IPv4地址;以及Querying the domain name address mapping list to obtain the IPv4 address corresponding to the domain name; and

查询所述域名地址映射列表,若能够查询到原生的IPv6地址,则得到对应所述域名的IPv6地址;若无法查询到原生的IPv6地址,则增加对应所述IPv4地址的IPv6地址,得到对应所述域名的IPv6地址。Query the domain name address mapping list, if the original IPv6 address can be queried, the IPv6 address corresponding to the domain name is obtained; if the original IPv6 address cannot be queried, the IPv6 address corresponding to the IPv4 address is added to obtain the corresponding IPv6 address. IPv6 address of the above domain name.

结合第二方面和第二方面的第一种可能的实施方式,在第二种可能的实施方式中,所述本地DNS包括:With reference to the second aspect and the first possible implementation manner of the second aspect, in the second possible implementation manner, the local DNS includes:

用户类型判断模块,用于根据用户的源地址判断所述用户类型,所述用户类型包括IPv4单栈用户,IPv6单栈用户,双栈用户;User type judging module, for judging the user type according to the source address of the user, the user type includes IPv4 single-stack user, IPv6 single-stack user, dual-stack user;

发送模块,与用户类型判断模块连接,用于根据所述用户类型判断模块判断的结果,向所述用户终端发送IPv4地址或IPv6地址。The sending module is connected with the user type judging module, and is used to send the IPv4 address or IPv6 address to the user terminal according to the judgment result of the user type judging module.

结合第二方面的第一种可能的实施方式,在第三种可能的实施方式中,所述权威DNS包括:With reference to the first possible implementation manner of the second aspect, in a third possible implementation manner, the authoritative DNS includes:

标记模块,与所述地址获取模块连接,用于将所述权威DNS增加的对应所述IPv4地址的IPv6地址的至少一位设置为标记值。A marking module, connected to the address acquisition module, configured to set at least one bit of the IPv6 address corresponding to the IPv4 address added by the authoritative DNS as a marking value.

本发明实施例提供了一种IPv4/IPv6地址区分方法及系统,通过对权威DNS增加的IPv6地址进行标记,以识别仅支持IPv4协议栈的服务器(该服务器仅具有原生的IPv4地址)和同时支持IPv4协议栈和IPv6协议栈的服务器(该服务器具有原生的IPv4地址和IPv6地址)。在用户终端对某域名进行访问时,根据用户终端的类型以及其访问的域名所对应的IPv6地址是否具有标记,向用户终端发送IPv4地址或IPv6地址。因此,本发明实施例根据用户类型以及用户访问的服务器所支持的协议栈合理地为用户提供其访问域名下的地址,避免双栈用户访问IPv4服务器时无意义的翻译过程(即通过NAT64设备实现IPv4数据包与IPv6数据包互相翻译的过程),从而既能够降低双栈用户的访问时延,又能够为单栈用户提供充分的NAT64翻译服务,最终提高用户的业务体验。The embodiment of the present invention provides a method and system for distinguishing IPv4/IPv6 addresses, by marking the IPv6 addresses added by the authoritative DNS, to identify servers that only support the IPv4 protocol stack (the server only has native IPv4 addresses) and supports both A server of the IPv4 protocol stack and the IPv6 protocol stack (the server has a native IPv4 address and an IPv6 address). When a user terminal visits a domain name, according to the type of the user terminal and whether the IPv6 address corresponding to the domain name it visits has a flag, an IPv4 address or an IPv6 address is sent to the user terminal. Therefore, the embodiment of the present invention reasonably provides the address under the domain name for the user according to the user type and the protocol stack supported by the server accessed by the user, so as to avoid the meaningless translation process when the dual-stack user accesses the IPv4 server (i.e., through the NAT64 device) The mutual translation process of IPv4 data packets and IPv6 data packets), so as to not only reduce the access delay of dual-stack users, but also provide sufficient NAT64 translation services for single-stack users, and finally improve the service experience of users.

附图说明Description of drawings

图1为本发明实施例提供的IPv6/IPv4地址区分方法流程示意图;Fig. 1 is the schematic flowchart of the IPv6/IPv4 address distinguishing method that the embodiment of the present invention provides;

图2为本发明实施例提供的获取IPv4地址和IPv6地址的具体方法流程示意图;Fig. 2 is a schematic flow chart of a specific method for obtaining an IPv4 address and an IPv6 address provided by an embodiment of the present invention;

图3为本发明实施例提供的地址发送步骤的具体方法流程示意图;FIG. 3 is a schematic flow chart of a specific method of the address sending step provided by an embodiment of the present invention;

图4为本发明实施例提供的对非原生的所述IPv6地址IPv6地址进行标记的具体方法流程示意图。Fig. 4 is a schematic flowchart of a specific method for marking the non-native IPv6 address IPv6 address provided by the embodiment of the present invention.

图5为本发明实施例提供的IPv6/IPv4地址区分系统示意图;FIG. 5 is a schematic diagram of an IPv6/IPv4 address distinguishing system provided by an embodiment of the present invention;

图6为本发明实施例提供的权威DNS的示意图;FIG. 6 is a schematic diagram of an authoritative DNS provided by an embodiment of the present invention;

图7为本发明实施例提供的本地DNS的示意图;FIG. 7 is a schematic diagram of a local DNS provided by an embodiment of the present invention;

图8为本发明实施例提供的另一种权威DNS的示意图。FIG. 8 is a schematic diagram of another authoritative DNS provided by an embodiment of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

下面结合附图对本发明实施例IPv4/IPv6地址区分方法及系统进行详细描述。The method and system for distinguishing IPv4/IPv6 addresses according to the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.

本发明实施例提供了一种IPv4/IPv6地址区分方法,如图1所示,包括以下步骤:The embodiment of the present invention provides a kind of IPv4/IPv6 address distinguishing method, as shown in Figure 1, comprises the following steps:

100、地址标记步骤,权威DNS接收本地DNS发送的域名,并根据权威DNS的域名地址映射列表,得到对应所述域名的IPv4地址和IPv6地址,其中,对应所述域名的IPv6地址为原生的IPv6地址或权威DNS增加的对应所述IPv4地址的IPv6地址,权威DNS对所述增加的对应所述IPv4地址的IPv6地址进行标记,并将对应所述域名的IPv4地址和IPv6地址发送至本地DNS,以使本地DNS能够通过对应所述域名的IPv6地址是否具有标记判断对应所述域名的服务器是否支持IPv6协议栈。100. The address marking step, the authoritative DNS receives the domain name sent by the local DNS, and obtains the IPv4 address and IPv6 address corresponding to the domain name according to the domain name address mapping list of the authoritative DNS, wherein the IPv6 address corresponding to the domain name is a native IPv6 address or the IPv6 address corresponding to the IPv4 address added by the authoritative DNS, the authoritative DNS marks the added IPv6 address corresponding to the IPv4 address, and sends the IPv4 address and IPv6 address corresponding to the domain name to the local DNS, To enable the local DNS to determine whether the server corresponding to the domain name supports the IPv6 protocol stack by whether the IPv6 address corresponding to the domain name has a mark.

在该步骤中,本地DNS从用户发送的IPv4解析请求和IPv6解析请求中提取域名,该并通过域名授权系统进行递归查询,以获得该域名所对应的IPv4地址和IPv6地址。In this step, the local DNS extracts the domain name from the IPv4 resolution request and IPv6 resolution request sent by the user, and performs a recursive query through the domain name authority system to obtain the IPv4 address and IPv6 address corresponding to the domain name.

需要说明的是,在域名授权系统中,当能够从某个DNS服务器的域名地址映射列表中查询到本次访问的域名与IPv4/IPv6地址的对应关系,则确定该DNS服务器为本次访问的权威DNS。It should be noted that in the domain name authorization system, when the corresponding relationship between the domain name of this visit and the IPv4/IPv6 address can be queried from the domain name address mapping list of a certain DNS server, it is determined that the DNS server is the address of this visit. Authoritative DNS.

200、地址发送步骤,本地DNS接收对应所述域名的IPv4地址和IPv6地址,并根据用户类型以及所述IPv6地址是否具有标记,向所述用户终端发送所述IPv4地址或IPv6地址,以为用户终端提供对应用户访问的域名的地址。200. Address sending step, the local DNS receives the IPv4 address and IPv6 address corresponding to the domain name, and sends the IPv4 address or IPv6 address to the user terminal according to the user type and whether the IPv6 address has a mark, so as to serve as the user terminal Provide the address corresponding to the domain name accessed by the user.

在该步骤中,本地DNS一般为双栈DNS,可根据双栈DNS所预存储的双栈用户的IP地址范围对双栈用户进行识别,也可通过和相关服务器交互以查询当前用户是否为双栈用户。In this step, the local DNS is generally a dual-stack DNS, and the dual-stack user can be identified according to the IP address range of the dual-stack user pre-stored by the dual-stack DNS, and it can also interact with the relevant server to query whether the current user is a dual-stack user. stack user.

本发明实施例提供了一种IPv4/IPv6地址区分方法,通过对权威DNS增加的IPv6地址进行标记,以识别仅支持IPv4协议栈的服务器(该服务器仅具有原生的IPv4地址)和同时支持IPv4协议栈和IPv6协议栈的服务器(该服务器具有原生的IPv4地址和IPv6地址)。在用户终端对某域名进行访问时,根据用户终端的类型以及其访问的域名所对应的IPv6地址是否具有标记,向用户终端发送IPv4地址或IPv6地址。因此,本发明实施例根据用户类型以及用户访问的服务器所支持的协议栈合理地为用户提供其访问域名下的地址,避免双栈用户访问IPv4服务器时无意义的翻译过程(即通过NAT64设备实现IPv4数据包与IPv6数据包互相翻译的过程),从而既能够降低双栈用户的访问时延,又能够为单栈用户提供充分的NAT64翻译服务,最终提高用户的业务体验。The embodiment of the present invention provides a method for distinguishing IPv4/IPv6 addresses, by marking the IPv6 addresses added by the authoritative DNS, to identify servers that only support the IPv4 protocol stack (the server only has a native IPv4 address) and simultaneously support the IPv4 protocol stack and the server of the IPv6 protocol stack (the server has a native IPv4 address and an IPv6 address). When a user terminal visits a domain name, according to the type of the user terminal and whether the IPv6 address corresponding to the domain name it visits has a flag, an IPv4 address or an IPv6 address is sent to the user terminal. Therefore, the embodiment of the present invention reasonably provides the address under the domain name for the user according to the user type and the protocol stack supported by the server accessed by the user, so as to avoid the meaningless translation process when the dual-stack user accesses the IPv4 server (i.e., through the NAT64 device) The mutual translation process of IPv4 data packets and IPv6 data packets), so as to not only reduce the access delay of dual-stack users, but also provide sufficient NAT64 translation services for single-stack users, and finally improve the service experience of users.

本发明实施例中的另一实施方式中,提供了实现上述获取IPv4地址和IPv6地址的具体方法流程,该方法流程如图2所示,包括:In another implementation mode in the embodiment of the present invention, a specific method flow for realizing the above-mentioned acquisition of an IPv4 address and an IPv6 address is provided. The method flow is shown in FIG. 2 , including:

110、地址获取模块查询所述域名地址映射列表,得到对应所述域名的IPv4地址。110. The address obtaining module queries the domain name address mapping list to obtain the IPv4 address corresponding to the domain name.

上述内容已经提及,在权威DNS的域名地址映射列表中存在用户所访问的域名与其地址的映射关系,因此本步骤使权威DNS在地址映射列表中查询该域名,以获得该域名所对应的服务器的IPv4地址。As mentioned above, there is a mapping relationship between the domain name accessed by the user and its address in the domain name address mapping list of the authoritative DNS, so this step makes the authoritative DNS query the domain name in the address mapping list to obtain the server corresponding to the domain name IPv4 address.

120、地址获取模块查询所述域名地址映射列表,若能够查询到原生的IPv6地址,则得到对应所述域名的IPv6地址;若无法查询到原生的IPv6地址,则增加对应所述IPv4地址的IPv6地址,得到对应所述域名的IPv6地址。120. The address obtaining module queries the domain name address mapping list, and if the native IPv6 address can be found, then obtains the IPv6 address corresponding to the domain name; if the native IPv6 address cannot be found, then increases the IPv6 address corresponding to the IPv4 address address to obtain the IPv6 address corresponding to the domain name.

在该步骤中,若该域名对应的服务器为仅支持IPv4协议栈的服务器,则权威DNS中不存在该域名所对应的IPv6地址,因此权威DNS对步骤110中所获得的IPv4地址进行转换,以增加对应所述IPv4地址的IPv6地址,若该域名对应的服务器同时支持IPv4协议栈和IPv6协议栈,则权威DNS直接从域名地址映射列表中查询到原生的IPv6地址。In this step, if the server corresponding to the domain name is a server that only supports the IPv4 protocol stack, then there is no IPv6 address corresponding to the domain name in the authoritative DNS, so the authoritative DNS converts the IPv4 address obtained in step 110 to An IPv6 address corresponding to the IPv4 address is added, and if the server corresponding to the domain name supports both the IPv4 protocol stack and the IPv6 protocol stack, the authoritative DNS directly queries the original IPv6 address from the domain name address mapping list.

此外,权威DNS增加的对应于IPv4地址的IPv6地址的构成为:自定义前缀+ServerIPv4地址。In addition, the composition of the IPv6 address corresponding to the IPv4 address added by the authoritative DNS is: custom prefix + ServerIPv4 address.

本发明实施例中的另一实施方式中,提供了实现步骤200的具体方法流程,该方法流程如图3所示,包括In another implementation manner among the embodiments of the present invention, a specific method flow for realizing step 200 is provided, as shown in FIG. 3 , including

210、用户类型判断步骤,用户类型判断模块根据用户的源地址判断用户类型,所述用户类型包括IPv4单栈用户,IPv6单栈用户,双栈用户。210. The user type judging step. The user type judging module judges the user type according to the user's source address, and the user type includes IPv4 single-stack users, IPv6 single-stack users, and dual-stack users.

值得说明的是,用户的源地址可在用户向本地DNS发送IPv4/IPv6解析请求时确定。It should be noted that the user's source address can be determined when the user sends an IPv4/IPv6 resolution request to the local DNS.

220、发送步骤,发送模块根据所述用户类型判断模块判断的结果,向所述用户终端发送IPv4地址或IPv6地址。220. In the sending step, the sending module sends the IPv4 address or IPv6 address to the user terminal according to the judgment result of the user type judging module.

值得说明的是,根据用户类型的不同以及IPv6地址是否具有标记,相应地发送不同的地址,以根据域名对应的服务器所支持的协议栈为用户提供最合理的地址类型,其具体判断以及划分流程将在下述步骤220的具体方法流程中详细地介绍。It is worth noting that according to the different types of users and whether the IPv6 address has a mark, different addresses are sent accordingly, so as to provide users with the most reasonable address type according to the protocol stack supported by the server corresponding to the domain name, the specific judgment and division process It will be introduced in detail in the specific method flow of step 220 below.

在本发明的一个具体实施例中,提供了当所述用户类型判断模块判断所述用户类型为双栈用户时,实现步骤220的具体方法流程,包括:In a specific embodiment of the present invention, when the user type judging module judges that the user type is a dual-stack user, a specific method flow for implementing step 220 is provided, including:

若所述对应所述域名的IPv6地址具有标记,则向所述用户终端发送对应所述域名的IPv4地址;If the IPv6 address corresponding to the domain name has a mark, sending the IPv4 address corresponding to the domain name to the user terminal;

若所述对应所述域名的IPv6地址不具有标记,则向所述用户终端发送对应所述域名的IPv6地址。If the IPv6 address corresponding to the domain name does not have a flag, sending the IPv6 address corresponding to the domain name to the user terminal.

在该步骤中,由于在步骤100中,仅对权威DNS增加的IPv6地址进行标记,并未对原生的IPv6地址进行标记。换言之,若某个域名下的IPv6地址具有标记,说明该IPv6地址是由原生的IPv4地址转换而成,则该域名下的服务器不能通过IPv6协议栈直接访问;而若某个域名下的IPv6地址不具有标记,说明该IPv6地址该域名下的原生IPv6地址,则该域名下的服务器可通过IPv6协议栈直接访问,因此,首先通过判断用户类型,确认是用户终端时双栈用户,则向双栈用户提供可使其直接访问的地址类型(即上述若所述对应所述域名的IPv6地址具有标记,则向所述用户终端发送对应所述域名的IPv4地址;若所述对应所述域名的IPv6地址不具有标记,则向所述用户终端发送对应所述域名的IPv6地址)。In this step, because in step 100, only the IPv6 address added by the authoritative DNS is marked, and the original IPv6 address is not marked. In other words, if the IPv6 address under a domain name has a mark, indicating that the IPv6 address is converted from a native IPv4 address, the server under the domain name cannot be directly accessed through the IPv6 protocol stack; and if the IPv6 address under a domain name If there is no mark, it means that the IPv6 address is the original IPv6 address under the domain name, and the server under the domain name can be directly accessed through the IPv6 protocol stack. The stack user provides an address type that can be directly accessed (that is, if the above-mentioned IPv6 address corresponding to the domain name has a mark, then send the IPv4 address corresponding to the domain name to the user terminal; if the IPv6 address corresponding to the domain name If the IPv6 address does not have a tag, the IPv6 address corresponding to the domain name is sent to the user terminal).

需要说明的是,若用户类型为单栈用户,则直接向用户提供对应其协议栈的IPv4地址或IPv6地址。It should be noted that, if the user type is a single-stack user, the IPv4 address or IPv6 address corresponding to its protocol stack is directly provided to the user.

在本发明的另一实施方式中,提供了所述对所述权威DNS增加的对应所述IPv4地址的IPv6地址进行标记的具体方法流程,该方法流程如图4所示,包括:In another embodiment of the present invention, a specific method flow for marking the IPv6 address corresponding to the IPv4 address added by the authoritative DNS is provided. The method flow is shown in FIG. 4 , including:

130、将所述权威DNS增加的对应所述IPv4地址的IPv6地址的至少一位设置为标记值。130. Set at least one bit of the IPv6 address added by the authoritative DNS corresponding to the IPv4 address as a flag value.

在该步骤中,IPv6地址具有128位,前X位为网络域,标识主机所在的网络,后128-X位为主机域,标识主机的地址。X大小为人工划定,常用的X值包括48、56、64等。对IPv6地址做特殊标记,可以将网络域或主机域的至少一位设置为标记值,以使该IPv6地址具有特殊的标记,能够在后续流程中被识别。In this step, the IPv6 address has 128 bits, the first X bits are the network domain, identifying the network where the host is located, and the last 128-X bits are the host domain, identifying the address of the host. The size of X is determined manually, and commonly used X values include 48, 56, 64, etc. To make a special mark on the IPv6 address, at least one bit of the network domain or the host domain can be set as a mark value, so that the IPv6 address has a special mark and can be identified in the subsequent process.

在本发明的一个具体实施方式中,提供了识别用户类型的具体方式,例如:In a specific embodiment of the present invention, a specific way of identifying user types is provided, for example:

通过预存储双栈用户的IP地址范围,判断所述用户类型;或者Determine the user type by pre-storing the IP address range of the dual-stack user; or

通过与接入认证设备交互,根据进行IPv6解析请求的用户源IPv6地址判断所述用户类型。By interacting with the access authentication device, the user type is judged according to the source IPv6 address of the user making the IPv6 resolution request.

在该步骤中,用户侧DNS可以预先存储双栈用户和IPv6单栈用户的IPv6地址段(城域网建设时经过统一规划所生成的地址段),通过查询用户的IPv6源地址所在地址段确定用户的类型(双栈用户或IPv6单栈用户)。In this step, the user-side DNS can pre-store the IPv6 address segment of the dual-stack user and the IPv6 single-stack user (the address segment generated through unified planning during the construction of the metropolitan area network), and determine by querying the address segment where the user's IPv6 source address is located. Type of user (dual-stack user or IPv6 single-stack user).

在本发明的另一具体实施例中,提供了接入认证设备的具体定义,包括:In another specific embodiment of the present invention, a specific definition of access authentication equipment is provided, including:

宽带远程接入服务器BRAS、远程用户拨号认证系统RADIUS。Broadband remote access server BRAS, remote user dial-up authentication system RADIUS.

靠近用户的用户侧DNS往往是双栈DNS,其通常与城域网的BRAS设备、RADIUS设备(存储用户源地址和用户类型)IP路由可达,在接收到用户访问请求后,根据用户访问请求所提供的源地址信息,通过和BRAS设备、RADIUS设备交互,查询获得用户类型。The user-side DNS close to the user is often a dual-stack DNS, which is usually reachable with the IP route of the BRAS device and RADIUS device (storing user source address and user type) of the MAN. The provided source address information is exchanged with the BRAS device and the RADIUS device to query and obtain the user type.

实施例1Example 1

1、Z市城域网的权威DNS接收A用户侧的本地DNS发送的域名,该域名对应中国联通网站服务器。1. The authoritative DNS of the MAN of Z city receives the domain name sent by the local DNS of user A, which corresponds to the China Unicom website server.

2、权威DNS的从域名地址映射列表中查询到该域名对应的IPv4地址,不存在该域名所对应的IPv6地址,则权威DNS对IPv4地址进行与IPv4/IPv6地址转换,生成对应的IPv6地址,该IPv6地址的构成为:前缀+Server IPv4地址。2. The authoritative DNS queries the IPv4 address corresponding to the domain name from the domain name address mapping list. If there is no IPv6 address corresponding to the domain name, the authoritative DNS converts the IPv4 address and IPv4/IPv6 address to generate a corresponding IPv6 address. The composition of the IPv6 address is: prefix+Server IPv4 address.

3、权威DNS将该IPv6地址的第57-64位设置为10101010,以得到中国联通网站服务器对应的IPv4地址和IPv6地址,并向本地DNS发送中国联通网站服务器所对应的IPv4地址和IPv6地址;3. The authoritative DNS sets the 57th-64th bits of the IPv6 address to 10101010 to obtain the corresponding IPv4 address and IPv6 address of the China Unicom website server, and sends the corresponding IPv4 address and IPv6 address of the China Unicom website server to the local DNS;

4、本地DNS接收中国联通网站服务器所对应的IPv4地址和IPv6地址,并和BRAS设备、RADIUS设备进行交互,利用用户A的源地址信息,查询A的用户类型,判断A为双栈用户;4. The local DNS receives the IPv4 address and IPv6 address corresponding to the China Unicom website server, and interacts with the BRAS device and RADIUS device, uses the source address information of user A to query the user type of A, and judges that A is a dual-stack user;

5、本地DNS判断中国联通网站服务器所对应的IPv6地址是否具有标记,确定该IPv6地址具有标记,说明该IPv6地址并非原生IPv6地址,即中国联通网站的服务器只支持IPv4协议栈;5. The local DNS judges whether the IPv6 address corresponding to the China Unicom website server has a mark, and confirms that the IPv6 address has a mark, indicating that the IPv6 address is not a native IPv6 address, that is, the server of the China Unicom website only supports the IPv4 protocol stack;

6、本地DNS向A返回中国联通网站服务器所对应的IPv4地址,使得A能够直接通过IPv4协议栈访问中国联通网站,而不需通过NAT64设备翻译。6. The local DNS returns the IPv4 address corresponding to the China Unicom website server to A, so that A can directly access the China Unicom website through the IPv4 protocol stack without translation through the NAT64 device.

实施例2Example 2

1、Y市城域网的权威DNS接收用户B侧的本地DNS发送的域名,该域名对应中国联通网站服务器。1. The authoritative DNS of the MAN of Y city receives the domain name sent by the local DNS of user B, which corresponds to the China Unicom website server.

2、权威DNS从中国联通网站服务器获得原生的IPv4地址和IPv6地址,并向本地DNS发送中国联通网站服务器对应的IPv4地址和IPv6地址。2. The authoritative DNS obtains the original IPv4 address and IPv6 address from the China Unicom website server, and sends the corresponding IPv4 address and IPv6 address of the China Unicom website server to the local DNS.

3、本地DNS查询城域网建设时所规划的双栈用户和IPv6单栈用户的IPv6地址段,并对比用户B的IPv6源地址和上述地址段,判断用户B为双栈用户;3. The local DNS queries the IPv6 address segment of the dual-stack user and the IPv6 single-stack user planned during the construction of the MAN, and compares the IPv6 source address of user B with the above address segment, and determines that user B is a dual-stack user;

4、本地DNS判断中国联通网站服务器所对应的IPv6地址是否具有标记,确定该IPv6地址不具有标记,说明该IPv6地址为原生IPv6地址,即中国联通网站服务器支持IPv6协议栈;4. The local DNS judges whether the IPv6 address corresponding to the China Unicom website server has a mark, and determines that the IPv6 address does not have a mark, indicating that the IPv6 address is a native IPv6 address, that is, the China Unicom website server supports the IPv6 protocol stack;

5、本地DNS向B返回中国联通服务器所对应的IPv6地址,使得B能够直接通过IPv6协议栈访问中国联通网站。5. The local DNS returns the IPv6 address corresponding to the China Unicom server to B, so that B can directly access the China Unicom website through the IPv6 protocol stack.

此外,本发明提供了一种IPv4/IPv6地址区分系统,如图5所示,包括:In addition, the present invention provides a system for distinguishing IPv4/IPv6 addresses, as shown in Figure 5, including:

权威DNS10,用于接收本地DNS20发送的目的地址信息,从所述目的地址信息中提取域名,并对所述域名进行解析,得到对应所述域名的IPv4地址和IPv6地址,其中,对应所述域名的IPv6地址为原生的IPv6地址或权威DNS10增加的对应所述IPv4地址的IPv6地址,权威DNS10对所述增加的对应所述IPv4地址的IPv6地址进行标记,并将对应所述域名的IPv4地址和IPv6地址发送至本地DNS20,以使本地DNS能够通过对应所述域名的IPv6地址是否具有标记判断对应所述域名的服务器是否支持IPv6协议栈;The authoritative DNS10 is configured to receive the destination address information sent by the local DNS20, extract the domain name from the destination address information, and analyze the domain name to obtain an IPv4 address and an IPv6 address corresponding to the domain name, wherein, corresponding to the domain name The IPv6 address is the original IPv6 address or the IPv6 address corresponding to the IPv4 address added by the authoritative DNS10, and the authoritative DNS10 marks the increased IPv6 address corresponding to the IPv4 address, and will correspond to the IPv4 address of the domain name and The IPv6 address is sent to the local DNS20, so that the local DNS can judge whether the server corresponding to the domain name supports the IPv6 protocol stack by whether the IPv6 address corresponding to the domain name has a mark;

本地DNS20,与所述权威DNS10连接,用于接收对应所述域名的IPv4地址和IPv6地址,并根据用户类型以及所述IPv6地址是否具有标记,向所述用户终端发送所述IPv6地址或IPv4地址,以为用户终端提供对应用户访问的域名的地址。Local DNS20, connected to the authoritative DNS10, is used to receive the IPv4 address and IPv6 address corresponding to the domain name, and send the IPv6 address or IPv4 address to the user terminal according to the user type and whether the IPv6 address has a mark , to provide the user terminal with the address corresponding to the domain name accessed by the user.

本发明实施例提供了一种IPv4/IPv6地址区分系统,通过对权威DNS增加的IPv6地址进行标记,以识别仅支持IPv4协议栈的服务器(该服务器仅具有原生的IPv4地址)和同时支持IPv4协议栈和IPv6协议栈的服务器(该服务器具有原生的IPv4地址和IPv6地址)。在用户终端对某域名进行访问时,根据用户终端的类型以及其访问的域名所对应的IPv6地址是否具有标记,向用户终端发送IPv4地址或IPv6地址。因此,本发明实施例根据用户类型以及用户访问的服务器所支持的协议栈合理地为用户提供其访问域名下的地址,避免双栈用户访问IPv4服务器时无意义的翻译过程(即通过NAT64设备实现IPv4数据包与IPv6数据包互相翻译的过程),从而既能够降低双栈用户的访问时延,又能够为单栈用户提供充分的NAT64翻译服务,最终提高用户的业务体验。The embodiment of the present invention provides a system for distinguishing IPv4/IPv6 addresses, by marking the IPv6 addresses added by the authoritative DNS, to identify servers that only support the IPv4 protocol stack (the server only has a native IPv4 address) and simultaneously support the IPv4 protocol stack and the server of the IPv6 protocol stack (the server has a native IPv4 address and an IPv6 address). When a user terminal visits a domain name, according to the type of the user terminal and whether the IPv6 address corresponding to the domain name it visits has a flag, an IPv4 address or an IPv6 address is sent to the user terminal. Therefore, the embodiment of the present invention reasonably provides the address under the domain name for the user according to the user type and the protocol stack supported by the server accessed by the user, so as to avoid the meaningless translation process when the dual-stack user accesses the IPv4 server (i.e., through the NAT64 device) The mutual translation process of IPv4 data packets and IPv6 data packets), so as to not only reduce the access delay of dual-stack users, but also provide sufficient NAT64 translation services for single-stack users, and finally improve the service experience of users.

可选的,如图6所示,所述权威DNS包括:Optionally, as shown in Figure 6, the authoritative DNS includes:

地址获取模块11,用于Address obtaining module 11, for

查询所述域名地址映射列表,得到对应所述域名的IPv4地址;以及Querying the domain name address mapping list to obtain the IPv4 address corresponding to the domain name; and

查询所述域名地址映射列表,若能够查询到原生的IPv6地址,则得到对应所述域名的IPv6地址;若无法查询到原生的IPv6地址,则增加对应所述IPv4地址的IPv6地址,得到对应所述域名的IPv6地址。Query the domain name address mapping list, if the original IPv6 address can be queried, the IPv6 address corresponding to the domain name is obtained; if the original IPv6 address cannot be queried, the IPv6 address corresponding to the IPv4 address is added to obtain the corresponding IPv6 address. IPv6 address of the above domain name.

可选的,如图7所示,所述本地DNS包括:Optionally, as shown in Figure 7, the local DNS includes:

用户类型判断模块21,用于根据用户的源地址判断所述用户类型,所述用户类型包括IPv4单栈用户,IPv6单栈用户,双栈用户;User type judging module 21 is used to judge the user type according to the source address of the user, and the user type includes IPv4 single-stack users, IPv6 single-stack users, and dual-stack users;

发送模块22,与用户类型判断模块连接,用于根据所述用户类型判断模块判断的结果,向所述用户终端发送IPv4地址或IPv6地址。The sending module 22 is connected with the user type judging module, and is used to send the IPv4 address or the IPv6 address to the user terminal according to the judgment result of the user type judging module.

可选的,如图8所示,所述权威DNS包括:Optionally, as shown in Figure 8, the authoritative DNS includes:

标记模块12,与所述地址获取模块连接,用于将所述权威DNS增加的对应所述IPv4地址的IPv6地址的至少一位设置为标记值。A marking module 12, connected to the address acquisition module, configured to set at least one bit of the IPv6 address corresponding to the IPv4 address added by the authoritative DNS as a marking value.

显然,上述实施例仅仅是为清楚地说明所作的举例,而并非对实施方式的限定。对于所属领域的普通技术人员来说,在上述说明的基础上还可以做出其它不同形式的变化或变动。这里无需也无法对所有的实施方式予以穷举。而由此所引伸出的显而易见的变化或变动仍处于本发明创造的保护范围。Apparently, the above-mentioned embodiments are only examples for clear description, rather than limiting the implementation. For those of ordinary skill in the art, other changes or changes in different forms can be made on the basis of the above description. It is not necessary and impossible to exhaustively list all the implementation manners here. However, the obvious changes or changes derived therefrom still fall within the scope of protection of the present invention.

Claims (11)

1.一种IPv4/IPv6地址区分方法,其特征在于,包括以下步骤:1. A method for distinguishing IPv4/IPv6 addresses, comprising the following steps: 地址标记步骤,权威DNS接收本地DNS发送的域名,并根据权威DNS的域名地址映射列表,得到对应所述域名的IPv4地址和IPv6地址,其中,对应所述域名的IPv6地址为原生的IPv6地址或权威DNS增加的对应所述IPv4地址的IPv6地址,权威DNS对所述增加的对应所述IPv4地址的IPv6地址进行标记,并将对应所述域名的IPv4地址和IPv6地址发送至本地DNS,以使本地DNS在确定对应所述域名的IPv6地址具有标记时确定对应所述域名的服务器不支持IPv6协议栈;Address marking step, the authoritative DNS receives the domain name sent by the local DNS, and obtains the IPv4 address and IPv6 address corresponding to the domain name according to the domain name address mapping list of the authoritative DNS, wherein the IPv6 address corresponding to the domain name is a native IPv6 address or The IPv6 address corresponding to the IPv4 address added by the authoritative DNS, the authoritative DNS marks the added IPv6 address corresponding to the IPv4 address, and sends the IPv4 address and IPv6 address corresponding to the domain name to the local DNS, so that When the local DNS determines that the IPv6 address corresponding to the domain name has a mark, it determines that the server corresponding to the domain name does not support the IPv6 protocol stack; 地址发送步骤,本地DNS接收对应所述域名的IPv4地址和IPv6地址,并根据用户类型以及所述IPv6地址是否具有标记,向用户终端发送所述IPv4地址或IPv6地址,以为用户终端提供对应用户访问的域名的地址。Address sending step, the local DNS receives the IPv4 address and IPv6 address corresponding to the domain name, and sends the IPv4 address or IPv6 address to the user terminal according to the user type and whether the IPv6 address has a mark, so as to provide the corresponding user access for the user terminal The address of the domain name. 2.根据权利要求1所述的方法,其特征在于,所述根据域名地址映射列表,得到对应所述域名的IPv4地址和IPv6地址包括:2. The method according to claim 1, wherein said obtaining the IPv4 address and the IPv6 address corresponding to said domain name according to the domain name address mapping list comprises: 地址获取模块查询所述域名地址映射列表,得到对应所述域名的IPv4地址;以及The address acquisition module queries the domain name address mapping list to obtain the IPv4 address corresponding to the domain name; and 地址获取模块查询所述域名地址映射列表,若能够查询到原生的IPv6地址,则得到对应所述域名的IPv6地址;若无法查询到原生的IPv6地址,则增加对应所述IPv4地址的IPv6地址,得到对应所述域名的IPv6地址。The address acquisition module queries the domain name address mapping list, if the original IPv6 address can be found, then obtains the IPv6 address corresponding to the domain name; if the original IPv6 address cannot be found, then increases the IPv6 address corresponding to the IPv4 address, An IPv6 address corresponding to the domain name is obtained. 3.根据权利要求1或2所述的方法,其特征在于,所述根据用户类型以及所述IPv6地址是否具有标记,向用户终端发送所述IPv4地址或IPv6地址包括:3. The method according to claim 1 or 2, wherein, according to the user type and whether the IPv6 address has a mark, sending the IPv4 address or the IPv6 address to the user terminal comprises: 用户类型判断步骤,用户类型判断模块根据用户的源地址判断所述用户类型,所述用户类型包括IPv4单栈用户,IPv6单栈用户和双栈用户;User type judging step, the user type judging module judges the user type according to the source address of the user, and the user type includes IPv4 single-stack users, IPv6 single-stack users and dual-stack users; 发送步骤,发送模块根据所述用户类型判断模块判断的结果,向用户终端发送IPv4地址或IPv6地址。In the sending step, the sending module sends the IPv4 address or IPv6 address to the user terminal according to the judgment result of the user type judging module. 4.根据权利要求3所述的方法,其特征在于,当所述用户类型判断模块判断所述用户类型为双栈用户时,所述发送步骤具体包括:4. The method according to claim 3, wherein when the user type judging module judges that the user type is a dual-stack user, the sending step specifically includes: 若所述对应所述域名的IPv6地址具有标记,则向所述用户终端发送对应所述域名的IPv4地址;If the IPv6 address corresponding to the domain name has a mark, sending the IPv4 address corresponding to the domain name to the user terminal; 若所述对应所述域名的IPv6地址不具有标记,则向所述用户终端发送对应所述域名的IPv6地址。If the IPv6 address corresponding to the domain name does not have a flag, sending the IPv6 address corresponding to the domain name to the user terminal. 5.根据权利要求2所述的方法,其特征在于,所述权威DNS对所述增加的对应所述IPv4地址的IPv6地址进行标记具体包括:5. The method according to claim 2, wherein the authoritative DNS marking the increased IPv6 address corresponding to the IPv4 address specifically comprises: 将所述权威DNS增加的对应所述IPv4地址的IPv6地址的至少一位设置为标记值。Setting at least one bit of the IPv6 address corresponding to the IPv4 address added by the authoritative DNS as a flag value. 6.根据权利要求3所述的方法,其特征在于,所述用户类型判断步骤所采用的具体方式包括:6. The method according to claim 3, wherein the specific methods adopted in the user type judgment step include: 通过预存储双栈用户的IP地址范围,判断所述用户类型;以及By pre-storing the IP address range of the dual-stack users, judging the user type; and 通过与接入认证设备交互,根据进行IPv6解析请求的用户源IPv6地址判断所述用户类型。By interacting with the access authentication device, the user type is judged according to the source IPv6 address of the user making the IPv6 resolution request. 7.根据权利要求6所述的方法,其特征在于,所述接入认证设备包括宽带远程接入服务器BRAS、远程用户拨号认证系统RADIUS。7. The method according to claim 6, wherein the access authentication device comprises a broadband remote access server BRAS and a remote user dial-up authentication system RADIUS. 8.一种IPv4/IPv6地址区分系统,其特征在于,包括:8. A system for distinguishing IPv4/IPv6 addresses, comprising: 权威DNS,用于接收本地DNS发送的域名,并根据权威DNS的域名地址映射列表,得到对应所述域名的IPv4地址和IPv6地址,其中,对应所述域名的IPv6地址为原生的IPv6地址或权威DNS增加的对应所述IPv4地址的IPv6地址,权威DNS对所述增加的对应所述IPv4地址的IPv6地址进行标记,并将对应所述域名的IPv4地址和IPv6地址发送至本地DNS,以使本地DNS在确定对应所述域名的IPv6地址具有标记时确定对应所述域名的服务器不支持IPv6协议栈;The authoritative DNS is used to receive the domain name sent by the local DNS, and obtain the IPv4 address and IPv6 address corresponding to the domain name according to the domain name address mapping list of the authoritative DNS, wherein the IPv6 address corresponding to the domain name is a native IPv6 address or an authoritative DNS address. The IPv6 address corresponding to the IPv4 address added by the DNS, the authoritative DNS marks the added IPv6 address corresponding to the IPv4 address, and sends the IPv4 address and IPv6 address corresponding to the domain name to the local DNS, so that the local When DNS determines that the IPv6 address corresponding to the domain name has a mark, it determines that the server corresponding to the domain name does not support the IPv6 protocol stack; 本地DNS,与所述权威DNS连接,用于接收对应所述域名的IPv4地址和IPv6地址,并根据用户类型以及所述IPv6地址是否具有标记,向用户终端发送所述IPv6地址或IPv4地址,以为用户终端提供对应用户访问的域名的地址。The local DNS is connected to the authoritative DNS, and is used to receive the IPv4 address and IPv6 address corresponding to the domain name, and send the IPv6 address or IPv4 address to the user terminal according to the user type and whether the IPv6 address has a mark, so as to The user terminal provides an address corresponding to the domain name accessed by the user. 9.根据权利要求8所述的系统,其特征在于,所述权威DNS包括:9. The system according to claim 8, wherein the authoritative DNS comprises: 地址获取模块,用于Address acquisition module for 查询所述域名地址映射列表,得到对应所述域名的IPv4地址;以及Querying the domain name address mapping list to obtain the IPv4 address corresponding to the domain name; and 查询所述域名地址映射列表,若能够查询到原生的IPv6地址,则得到对应所述域名的IPv6地址;若无法查询到原生的IPv6地址,则增加对应所述IPv4地址的IPv6地址,得到对应所述域名的IPv6地址。Query the domain name address mapping list, if the original IPv6 address can be queried, the IPv6 address corresponding to the domain name is obtained; if the original IPv6 address cannot be queried, the IPv6 address corresponding to the IPv4 address is added to obtain the corresponding IPv6 address. IPv6 address of the above domain name. 10.根据权利要求8或9所述的系统,其特征在于,所述本地DNS包括:10. The system according to claim 8 or 9, wherein the local DNS comprises: 用户类型判断模块,用于根据用户的源地址判断所述用户类型,所述用户类型包括IPv4单栈用户,IPv6单栈用户和双栈用户;User type judging module, for judging the user type according to the source address of the user, the user type includes IPv4 single-stack users, IPv6 single-stack users and dual-stack users; 发送模块,与用户类型判断模块连接,用于根据所述用户类型判断模块判断的结果,向所述用户终端发送IPv4地址或IPv6地址。The sending module is connected with the user type judging module, and is used to send the IPv4 address or IPv6 address to the user terminal according to the judgment result of the user type judging module. 11.根据权利要求9所述的系统,其特征在于,所述权威DNS包括:11. The system according to claim 9, wherein the authoritative DNS comprises: 标记模块,与所述地址获取模块连接,用于将所述权威DNS增加的对应所述IPv4地址的IPv6地址的至少一位设置为标记值。A marking module, connected to the address acquisition module, configured to set at least one bit of the IPv6 address corresponding to the IPv4 address added by the authoritative DNS as a marking value.
CN201410773471.6A 2014-12-03 2014-12-03 Distinguish method and system in a kind of IPv4/IPv6 addresses Active CN104506665B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410773471.6A CN104506665B (en) 2014-12-03 2014-12-03 Distinguish method and system in a kind of IPv4/IPv6 addresses

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410773471.6A CN104506665B (en) 2014-12-03 2014-12-03 Distinguish method and system in a kind of IPv4/IPv6 addresses

Publications (2)

Publication Number Publication Date
CN104506665A CN104506665A (en) 2015-04-08
CN104506665B true CN104506665B (en) 2017-12-12

Family

ID=52948380

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410773471.6A Active CN104506665B (en) 2014-12-03 2014-12-03 Distinguish method and system in a kind of IPv4/IPv6 addresses

Country Status (1)

Country Link
CN (1) CN104506665B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108769293B (en) * 2018-08-31 2022-02-25 郑州云海信息技术有限公司 IP address resolution method and related device
CN110225150B (en) * 2019-06-27 2020-09-15 中星科源(北京)信息技术有限公司 Method, system and storage medium for communication between different network protocols
CN110677512B (en) * 2019-09-30 2022-04-22 新华三信息安全技术有限公司 Address resolution method and device
CN116094963B (en) * 2022-12-07 2024-12-24 五八同城信息技术有限公司 Traffic duty ratio statistical method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103004173A (en) * 2012-09-29 2013-03-27 华为技术有限公司 A method, device and system for allocating addresses
CN103109517A (en) * 2012-09-28 2013-05-15 华为技术有限公司 Double-stack terminal accessing service method, terminal and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003289340A (en) * 2002-03-27 2003-10-10 Toshiba Corp Identifier inquiry method, communication terminal, and network system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103109517A (en) * 2012-09-28 2013-05-15 华为技术有限公司 Double-stack terminal accessing service method, terminal and system
CN103004173A (en) * 2012-09-29 2013-03-27 华为技术有限公司 A method, device and system for allocating addresses

Also Published As

Publication number Publication date
CN104506665A (en) 2015-04-08

Similar Documents

Publication Publication Date Title
CN103856580B (en) A kind of method that IPv6 client computer accesses IPv4 servers
CN103327137B (en) Router domain name access method
WO2015117337A1 (en) Method and apparatus for setting network rule entry
CN102171986B (en) A method and a gateway for providing multiple internet access
CN1984155A (en) Method for configuring domain name in IPv6 access network and its network equipment
CN102934410A (en) Enhancing ds-lite with private ipv4 reachability
CN103109517A (en) Double-stack terminal accessing service method, terminal and system
CN103095705B (en) The method and apparatus of isolated area main frame in access local area network (LAN)
CN104506665B (en) Distinguish method and system in a kind of IPv4/IPv6 addresses
CN103037030B (en) Support the method and system of domain name group dns resolution
CN103428303A (en) Method and system for IPv6 host to have access to IPv4 server
CN102036422A (en) Method, device and system for acquiring IP address
CN102891901A (en) Dynamic domain name resolution method, server and domain name service system
CN101222495A (en) Method and router for IPv4 network host to access IPv6 network host
CN102547553B (en) Method, system and device for accessing service based on wireless application protocol (WAP)
CN101084657A (en) Gateway, network configuration, and method for controlling access to web server
CN103118145A (en) IPv4-over-IPv6 multi-tunnel automatic establishment method based on DNS (domain name system)
CN102970387A (en) Domain name resolution method, device and system
CN104702709A (en) Method and device for marking terminal type, and method and device for identifying terminal type
CN102148882B (en) Method and system for dynamic domain name resolution after deploying NAT
CN105763660A (en) Domain name analysis method and device
CN101729291A (en) A domain name query method and system
CN101938789A (en) Method and system for selecting a packet network gateway with specified capabilities
CN113472873A (en) Method for accessing router homepage by fixed pseudo IP address
CN107395635B (en) A method and device for locating the location of a wired end user

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant