[go: up one dir, main page]

CN100525295C - A method for implementing communication between IPv4 network and IPv6 network - Google Patents

A method for implementing communication between IPv4 network and IPv6 network Download PDF

Info

Publication number
CN100525295C
CN100525295C CNB2004100370128A CN200410037012A CN100525295C CN 100525295 C CN100525295 C CN 100525295C CN B2004100370128 A CNB2004100370128 A CN B2004100370128A CN 200410037012 A CN200410037012 A CN 200410037012A CN 100525295 C CN100525295 C CN 100525295C
Authority
CN
China
Prior art keywords
ipv4
address
node
ipv6
network
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.)
Expired - Fee Related
Application number
CNB2004100370128A
Other languages
Chinese (zh)
Other versions
CN1691665A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2004100370128A priority Critical patent/CN100525295C/en
Publication of CN1691665A publication Critical patent/CN1691665A/en
Application granted granted Critical
Publication of CN100525295C publication Critical patent/CN100525295C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention relates to realization method for communication between IPv4 net and IPv6 net. When node of IPv4 communicate to node of IPv6, converses the objective address according to IPv4 address and corresponding port number, and realizes communication between node of IPv4 aforementioned and node of IPv6. Thereby, the invention is that when node of IPv4 communicate to node of IPv6, corresponding multiple objective IPv6 address can be mapped to a IPv4 address simultaneously based on corresponding port number, realizes the good use of IPv4 address during the address mapping process, solves the short problem of IPv4 address, saves efficiently the utilization of IPv4 address; besides, the invention has the advantage of realization process simple.

Description

一种IPv4网络与IPv6网络通信的实现方法 A method for realizing communication between IPv4 network and IPv6 network

技术领域 technical field

本发明涉及网络通信技术领域,尤其涉及一种IPv4网络与IPv6网络通信的实现方法。The invention relates to the technical field of network communication, in particular to a method for realizing communication between an IPv4 network and an IPv6 network.

背景技术 Background technique

目前数据网络中以IPv4(互联网协议第四版)技术为主导,随着网络规模的扩大,IPv6(互联网协议第六版)技术以其庞大的地址空间等优势将逐渐取代目前的IPv4技术。然而,这种彻底的取代需要长期的过程。在这个长期由IPv4向IPv6演进过程中,为了共享网络资源,必须要解决IPv4网络和IPv6网络互通的问题,也就是需要保证IPv6节点与IPv4节点可以互访。基于这种需要产生了NAT-PT(Network Address Translation-ProtocolTranslation,网络地址转换协议)技术,该技术提供了一种IPv4网络和IPv6网络互通的解决方案,该协议规范由RFC2766(RFC,请求注解)定义。The current data network is dominated by IPv4 (Internet Protocol Version 4) technology. With the expansion of network scale, IPv6 (Internet Protocol Version 6) technology will gradually replace the current IPv4 technology with its advantages such as huge address space. However, such a thorough replacement requires a long-term process. In this long-term evolution process from IPv4 to IPv6, in order to share network resources, it is necessary to solve the problem of intercommunication between IPv4 network and IPv6 network, that is, to ensure that IPv6 nodes and IPv4 nodes can communicate with each other. Based on this need, NAT-PT (Network Address Translation-Protocol Translation, Network Address Translation Protocol) technology is produced, which provides a solution for the intercommunication between IPv4 network and IPv6 network. definition.

NAT-PT技术的主要原理是,在IPv6网络和IPv4网络之间设置网关设备,称为NAT-PT网关,在IPv6网络节点与IPv4网络节点相互通信时,NAT-PT网关将往来的IPv6报文和IPv4报文进行相互转换,以适应对端的IP协议类型。包括协议的转换(如IPv4报文头和IPv6报文头的转换)以及IP地址的转换。The main principle of NAT-PT technology is to set up a gateway device between the IPv6 network and the IPv4 network, which is called a NAT-PT gateway. Convert to and from IPv4 packets to adapt to the IP protocol type of the peer. Including protocol conversion (such as the conversion of IPv4 message header and IPv6 message header) and IP address conversion.

对于由IPv6报文到IPv4报文的转换中,IP地址的转换实际上是用可标识的IPv4地址替换IPv6地址,具体方法是NAT-PT网关从IPv4地址池中分配临时的IPv4地址来映射需要转换的IPv6地址。而对于由IPv4报文到IPv6报文的转换,则需要用相应的IPv6地址替换IPv4地址,具体采用的方式是分配专门的IPv6地址前缀,称为NAT-PT前缀,利用前缀+IPv4地址构成新的IPv6地址来映射需要转换的IPv4地址。For the conversion from IPv6 message to IPv4 message, the conversion of IP address is to replace the IPv6 address with an identifiable IPv4 address. The specific method is that the NAT-PT gateway allocates a temporary IPv4 address from the IPv4 address pool to map the required Converted IPv6 address. For the conversion from IPv4 message to IPv6 message, it is necessary to replace the IPv4 address with the corresponding IPv6 address. The specific method is to allocate a special IPv6 address prefix, called NAT-PT prefix, and use the prefix + IPv4 address to form a new The IPv6 address is mapped to the IPv4 address that needs to be converted.

为对NAT-PT技术有更进一步的了解,再结合一个实例描述NAT-PT中的IP地址转换处理过程。如图1所示,中间的NAT-PT网关包括IPv4地址池,假设包括的IPv4地址为101.1.1.1到101.1.1.10,用于映射需要转换的IPv6地址,并分配NAT-PT前缀,假设前缀为3333::0/96,用于映射需要转换的IPv4地址;参见图1,假设左边IPv6网络中,节点B和节点A的IPv6地址分别为2001::1,和2001::2;右边IPv4网络中,节点C的IPv4地址为132.1.1.1。In order to have a further understanding of NAT-PT technology, an example is used to describe the IP address translation process in NAT-PT. As shown in Figure 1, the intermediate NAT-PT gateway includes an IPv4 address pool, assuming that the included IPv4 addresses are 101.1.1.1 to 101.1.1.10, which are used to map the IPv6 addresses that need to be converted, and assign NAT-PT prefixes, assuming that the prefixes are 3333::0/96, used to map the IPv4 address that needs to be converted; see Figure 1, assuming that in the IPv6 network on the left, the IPv6 addresses of node B and node A are 2001::1 and 2001::2 respectively; the IPv4 network on the right , the IPv4 address of node C is 132.1.1.1.

当IPv6节点发起向IPv4节点的访问时,以IPv6节点B(IPv6-B)准备与IPv4节点C(IPv4-C)通信为例,具体处理过程为:当需要向节点C发送报文时,首先在NAT-PT网关需要将作为目的地址的节点C的IPv4地址映射为IPv6地址,所采用的方法是将用NAT-PT前缀+IPv4地址,即3333::132.1.1.1。这样,节点B发送IPv6报文时,相应的源地址为2001::1,目的地址为3333::132.1.1.1,在报文经过NAT-PT网关时,作为目的地址的IPv6地址再被转换为IPv4地址,即节点C的实际地址132.1.1.1;NAT-PT网关还需要从IPv4地址池分配一个地址(例为101.1.1.1)来映射IPv6源地址,并将IPv6报文转换为IPv4报文,发送给IPv4节点C,这样便完成了一次节点B向节点C发送报文的处理过程。When an IPv6 node initiates a visit to an IPv4 node, take IPv6 node B (IPv6-B) preparing to communicate with IPv4 node C (IPv4-C) as an example, the specific process is: when it is necessary to send a message to node C, first The NAT-PT gateway needs to map the IPv4 address of node C as the destination address to an IPv6 address, and the method adopted is to use the NAT-PT prefix + IPv4 address, that is, 3333::132.1.1.1. In this way, when node B sends an IPv6 message, the corresponding source address is 2001::1, and the destination address is 3333::132.1.1.1. When the message passes through the NAT-PT gateway, the IPv6 address as the destination address is converted to IPv4 address, i.e. the actual address 132.1.1.1 of node C; NAT-PT gateway also needs to distribute an address (being 101.1.1.1 for example) from IPv4 address pool to map IPv6 source address, and IPv6 message is converted into IPv4 message, Send to IPv4 node C, thus completing the process of sending a message from node B to node C once.

当IPv4节点发起向IPv6节点的访问时,以IPv4节点C准备与IPv6节点B通信为例,具体过程为:首先,在NAT-PT网关需要将节点B的IPv6地址映射为IPv4地址,假设将节点B的地址2001::1映射为相应的IPv4地址101.1.1.2;在节点C上发送IPv4报文给节点B时,直接使用映射后的节点B的IPv4地址101.1.1.2作为目的地址即可。在报文经过NAT-PT网关时,IPv4报文的源地址也将被映射为相应的IPv6地址,具体的方式是在原IPv4地址前加上NAT-PT前缀,即为3333::132.1.1.1;IPv4报文的目的地址也将被映射为相应的IPv6地址,即节点B的实际地址2001::1;NAT-PT网关再将报文转换为IPv6报文后发送给IPv6节点B即可。When an IPv4 node initiates access to an IPv6 node, take IPv4 node C preparing to communicate with IPv6 node B as an example, the specific process is as follows: first, the NAT-PT gateway needs to map the IPv6 address of node B to an IPv4 address, assuming that the node The address 2001::1 of B is mapped to the corresponding IPv4 address 101.1.1.2; when node C sends an IPv4 packet to node B, the mapped IPv4 address 101.1.1.2 of node B can be directly used as the destination address. When the message passes through the NAT-PT gateway, the source address of the IPv4 message will also be mapped to the corresponding IPv6 address. The specific way is to add the NAT-PT prefix before the original IPv4 address, which is 3333::132.1.1.1; The destination address of the IPv4 message will also be mapped to the corresponding IPv6 address, that is, the actual address of node B 2001::1; the NAT-PT gateway converts the message into an IPv6 message and sends it to the IPv6 node B.

为保证IPv4报文的目的地址可以将被映射为相应的IPv6地址,NAT-PT协议还规定了DNS-ALG(域名系统地址转换应用网关)的实现方法,可以用来协助由IPv4发起的向IPv6访问的报文的地址转换处理过程。如图2所示,NAT-PT网关需要支持DNS-ALG,即经过的报文如果是包含DNS(域名系统)报文,除对IPv6和IPv4协议报文头互相转换外,还要对DNS报文做转换;IPv6网络中的DNS是IPv6DNS服务器,负责响应IPv6的DNS请求;IPv4网络中的DNS是IPv4DNS服务器,负责响应IPv4的DNS请求。In order to ensure that the destination address of the IPv4 message can be mapped to the corresponding IPv6 address, the NAT-PT protocol also specifies the implementation method of DNS-ALG (Domain Name System Address Translation Application Gateway), which can be used to assist IPv4-initiated migration to IPv6 The address translation process of the accessed packets. As shown in Figure 2, the NAT-PT gateway needs to support DNS-ALG, that is, if the passing message contains a DNS (Domain Name System) message, in addition to converting the IPv6 and IPv4 protocol message headers, the DNS message must also be The text is converted; the DNS in the IPv6 network is an IPv6DNS server, which is responsible for responding to IPv6 DNS requests; the DNS in the IPv4 network is an IPv4DNS server, which is responsible for responding to IPv4 DNS requests.

假设IPv4节点C访问IPv6节点B,首先,节点C发出IPv4的DNS请求用来获得目的节点B的IPv4地址,该请求经过NAT-PT网关时,被改为IPv6的DNS请求,修改后的IPv6的DNS请求发送给IPv6DNS服务器,得到IPv6DNS回应,包含节点B的IPv6地址,该回应报文经过NAT-PT网关时,被转换为IPv4DNS回应报文,同时NAT-PT网关从IPv4地址池中分配IPv4地址作为节点B的IPv4地址来替换回应报文中的IPv6地址。节点C收到该DNS回应报文后,可以用该IPv4地址作为目的地址访问节点B,报文的地址转换过程如图3所示。Suppose IPv4 node C visits IPv6 node B. First, node C sends an IPv4 DNS request to obtain the IPv4 address of destination node B. When the request passes through the NAT-PT gateway, it is changed to an IPv6 DNS request, and the modified IPv6 address The DNS request is sent to the IPv6DNS server, and the IPv6DNS response is obtained, which contains the IPv6 address of node B. When the response message passes through the NAT-PT gateway, it is converted into an IPv4DNS response message, and the NAT-PT gateway allocates an IPv4 address from the IPv4 address pool The IPv6 address in the response message is replaced by the IPv4 address of Node B. After node C receives the DNS response message, it can use the IPv4 address as the destination address to access node B. The address translation process of the message is shown in FIG. 3 .

由前面描述可以看出,在NAT-PT转换过程中,对IPv6地址的映射采用IPv4地址池方式,每当新的IPv6地址需要映射时,从地址池中分配一个IPv4地址来使用。由于目前IPv4地址资源比较匮乏,通常无法分配到足够大的地址池,这样导致地址池中的地址很容易被耗尽。一旦地址池中无空余地址可供分配,所有IPv6和IPv4间建立的新的连接将无法被NAT-PT网关正常处理。It can be seen from the previous description that during the NAT-PT conversion process, the IPv6 address is mapped using the IPv4 address pool. Whenever a new IPv6 address needs to be mapped, an IPv4 address is allocated from the address pool for use. Due to the relatively scarce IPv4 address resources at present, it is usually impossible to allocate a sufficiently large address pool, which causes the addresses in the address pool to be easily exhausted. Once there is no free address available for allocation in the address pool, all new connections established between IPv6 and IPv4 will not be normally processed by the NAT-PT gateway.

为此,对于由IPv6网络发往IPv4网络的报文,NAT-PT协议又规定了基于端口号的转换方式,即除了将报文源地址转换外,还要将报文传输层的端口号也进行转换。假设有两个IPv6报文都需要将各自的IPv6源地址映射为IPv4地址,但是在NAT-PT网关可供映射的IPv4地址只有一个,此时可以使用端口号转换方式,如图4所示,除进行地址映射处理外,还将IPv6报文的源端口映射为不同的IPv4端口,这样,两个报文经过转换处理后,虽然IPv4源地址相同,但是由于分配的IPv4源端口号不同,仍然可以区分出两个报文来,这种处理方法称为PAT(基于端口号的地址转换)方式。For this reason, for packets sent from an IPv6 network to an IPv4 network, the NAT-PT protocol also stipulates a conversion method based on port numbers, that is, in addition to converting the source address of the packet, the port number of the transport layer of the packet must also be translated to convert. Suppose there are two IPv6 packets that need to map their respective IPv6 source addresses to IPv4 addresses, but there is only one IPv4 address that can be mapped on the NAT-PT gateway. At this time, the port number conversion method can be used, as shown in Figure 4. In addition to address mapping, the source port of the IPv6 message is also mapped to a different IPv4 port. In this way, after the two messages are converted, although the IPv4 source address is the same, because the assigned IPv4 source port numbers are different, they still Two packets can be distinguished, and this processing method is called PAT (Port Number-Based Address Translation) method.

当IPv6报文需要与IPv4报文通信,由于报文的目的地址采用NAT-PT前缀+IPv4地址形式,可以直接映射为IPv4地址,同时目的端口保持不变。对于源地址源端口,通过动态的分配源IPv4地址以及分配端口号来进行映射;且由于端口号的取值范围为0-65535,所以通过这种方法原则上每个IPv4地址可以同时被复用到65535个映射中,大大提高了IPv4地址的使用效率。When an IPv6 packet needs to communicate with an IPv4 packet, since the destination address of the packet is in the form of NAT-PT prefix + IPv4 address, it can be directly mapped to an IPv4 address, while the destination port remains unchanged. For the source address and source port, the mapping is performed by dynamically assigning the source IPv4 address and assigning the port number; and since the value range of the port number is 0-65535, in principle, each IPv4 address can be multiplexed at the same time by this method To 65535 mappings, greatly improving the efficiency of IPv4 address usage.

然而,上述方法仅限于在IPv6发起向IPv4报文转换的过程中,对IPv6源地址映射时使用,即仅适用于将作为源地址的IPv6地址转换为IPv4地址。而对于由IPv4网络的节点发起的向IPv6网络访问的报文转换,则仍然需要将作为目的地址的IPv6地址映射为相应的IPv4地址,而与端口号无关。并且,对于目前的NAT-PT协议规定的DNS-ALG的实现方法,也只是用从IPv4地址池中分配的IPv4地址映射目的IPv6地址,然后由DNS报文携带给IPv4网络中的源节点,而DNS报文是无法携带相应的端口号信息的,正因为如此,NAT-PT网关无法使用端口号分配方法。这样,导致IPv4地址池的地址很快被DNS-ALG耗尽,也就是说,在IPv4节点发起的到IPv6节点的地址转换过程中,对于到任意目的地址为IPv6地址的情况下,仍然不能最大效率的提高IPv4地址使用效率,即无法实现IPv4地址的最大利用。However, the above method is limited to use when mapping IPv6 source addresses during the process of converting IPv6-initiated packets to IPv4, that is, it is only suitable for converting an IPv6 address as a source address into an IPv4 address. However, for the packet conversion initiated by the node of the IPv4 network to access the IPv6 network, it is still necessary to map the IPv6 address as the destination address to the corresponding IPv4 address, regardless of the port number. And, for the implementation method of DNS-ALG that the current NAT-PT agreement stipulates, also just use the IPv4 address allocated from the IPv4 address pool to map the destination IPv6 address, and then carry it to the source node in the IPv4 network by the DNS message, and The DNS message cannot carry the corresponding port number information. Because of this, the NAT-PT gateway cannot use the port number allocation method. In this way, the addresses of the IPv4 address pool are quickly exhausted by the DNS-ALG, that is, during the address translation process initiated by the IPv4 node to the IPv6 node, for any destination address that is an IPv6 address, the maximum Improvement of efficiency IPv4 address usage efficiency, that is, the maximum utilization of IPv4 addresses cannot be realized.

因此,目前虽然可以实现IPv4网络节点和IPv6网络节点的互通,其中对于IPv6的地址映射依赖于分配到的IPv4地址池,然而IPv4地址资源目前看来也非常紧张,特别是在中国等亚洲国家。Therefore, although the intercommunication between IPv4 network nodes and IPv6 network nodes can be realized at present, the address mapping for IPv6 depends on the allocated IPv4 address pool, but IPv4 address resources are currently very tight, especially in China and other Asian countries.

发明内容 Contents of the invention

本发明的目的是提供一种IPv4网络与IPv6网络通信的实现方法,从而保证当IPv4网络访问IPv6网络时,可以实现一个IPv4地址应用于多个目的IPv6地址的映射,有效地解决了IPv4地址短缺的问题。The purpose of the present invention is to provide a method for realizing communication between an IPv4 network and an IPv6 network, thereby ensuring that when an IPv4 network accesses an IPv6 network, one IPv4 address can be applied to the mapping of multiple destination IPv6 addresses, effectively solving the shortage of IPv4 addresses The problem.

本发明的目的是通过以下技术方案实现的:The purpose of the present invention is achieved through the following technical solutions:

本发明提供了一种IPv4网络与IPv6网络通信的实现方法,包括:The invention provides a method for realizing communication between an IPv4 network and an IPv6 network, comprising:

A、当IPv4网络中的节点向IPv6网络中的节点发起通信时,为本次通信的目的地址分配一个对应的IPv4地址及相应的端口号;A. When a node in the IPv4 network initiates communication to a node in the IPv6 network, assign a corresponding IPv4 address and a corresponding port number to the destination address of this communication;

B、建立作为目的端的IPv6网络中的节点的IPv6地址及相应的端口号与所述的IPv4地址及相应的端口号的对应关系;B, establish the corresponding relationship between the IPv6 address of the node in the IPv6 network as the destination end and the corresponding port number and the described IPv4 address and the corresponding port number;

C、根据建立的对应关系实现所述的IPv4网络中的节点与IPv6网络中的节点间的通信。C. Realize the communication between the nodes in the IPv4 network and the nodes in the IPv6 network according to the established correspondence.

所述的步骤A包括:Described step A comprises:

当IPv4网络中的节点向IPv6网络中的节点发起通信时,在NAT-PT(网络地址转换协议)网关上的IPv4地址池中为本次通信分配一个对应的Ipv4地址及相应的端口号;When a node in the IPv4 network initiates communication to a node in the IPv6 network, a corresponding IPv4 address and a corresponding port number are allocated for this communication in the IPv4 address pool on the NAT-PT (Network Address Translation Protocol) gateway;

且所述的步骤B包括:And the step B includes:

在NAT-PT网关建立并保存作为目的端的IPv6网络中的节点的IPv6地址及相应的端口号与分配的IPv4地址及相应的端口号的对应关系。The corresponding relationship between the IPv6 address and the corresponding port number of the node in the IPv6 network as the destination end and the allocated IPv4 address and the corresponding port number is established and saved in the NAT-PT gateway.

所述的步骤C包括:Described step C comprises:

C1、IPv4网络中的节点向IPv6网络中的节点发送的报文的目的地址及目的端口号使用步骤A分配的IPv4地址及相应的端口号,并发送;The destination address and the destination port number of the message that the node in the IPv4 network sends to the node in the IPv6 network use the IPv4 address that step A distributes and the corresponding port number, and send;

C2、当所述的报文经过NAT-PT网关时,根据步骤B建立的对应关系将报文的目的地址及目的端口号转换为作为目的端的IPv6网络中的节点的实际IPv6地址及相应的端口号,并发送。C2, when described message passes through NAT-PT gateway, according to the corresponding relationship that step B establishes, the destination address and destination port number of message are converted into the actual IPv6 address and corresponding port of the node in the IPv6 network as destination end number and send it.

所述的步骤C还包括:Described step C also includes:

当所述的作为目的端的IPv6网络中的节点向作为源端的IPv4网络中的节点返回响应报文时,在NAT-PT网关将返回的响应报文的源地址及相应的端口号替换步骤A分配的IPv4地址及相应的端口号,并发送给所述的IPv4网络中的节点。When the node in the IPv6 network as the destination end returns a response message to the node in the IPv4 network as the source end, the NAT-PT gateway will return the source address of the response message and the corresponding port number to replace the step A distribution The IPv4 address and the corresponding port number are sent to the nodes in the IPv4 network.

所述的IPv4网络与IPv6网络通信的实现方法进一步包括:The realization method of described IPv4 network and IPv6 network communication further comprises:

在NAT-PT网关上静态配置作为目的端的IPv6网络中的节点的IPv6地址及相应的端口号与相应的IPv4地址及相应的端口号的对应关系;On the NAT-PT gateway, the IPv6 address and the corresponding port number of the node in the IPv6 network as the destination end are statically configured, and the corresponding relationship between the corresponding IPv4 address and the corresponding port number;

当IPv4网络中的节点向IPv6网络中的节点发起通信时,根据建立的对应关系实现所述的IPv4网络中的节点与IPv6网络中的节点间的通信。When a node in the IPv4 network initiates communication to a node in the IPv6 network, the communication between the node in the IPv4 network and the node in the IPv6 network is realized according to the established corresponding relationship.

由上述本发明提供的技术方案可以看出,本发明是在IPv4网络节点发起向IPv6网络节点访问时,相应的多个作为目的地址的不同的IPv6地址可以基于相应的端口号信息同时映射到一个IPv4地址上,实现了在地址映射过程中,对于IPv4地址资源的最大利用,解决IPv4地址短缺问题,有效地节约了.IPv4地址的使用。As can be seen from the technical solution provided by the present invention above, in the present invention, when an IPv4 network node initiates a visit to an IPv6 network node, corresponding multiple different IPv6 addresses as destination addresses can be simultaneously mapped to a corresponding port number information based on the corresponding port number information. On the IPv4 address, it realizes the maximum utilization of IPv4 address resources during the address mapping process, solves the shortage of IPv4 addresses, and effectively saves the use of IPv4 addresses.

而且,本发明采用了通过基于端口号实现由IPv4网络到IPv6网络的报文的目的地址转换过程的方法,还具有实现地址转换处理过程比较简单的优点。Moreover, the present invention adopts the method of implementing the destination address translation process of the message from the IPv4 network to the IPv6 network based on the port number, and also has the advantage of relatively simple implementation of the address translation process.

附图说明 Description of drawings

图1为IPv4网络与IPv6网络互通的组网示意图;Fig. 1 is the networking schematic diagram of IPv4 network and IPv6 network intercommunication;

图2为基于DNS的IPv4网络与IPv6网络互通的组网示意图;Figure 2 is a schematic diagram of a DNS-based networking between an IPv4 network and an IPv6 network;

图3为现有技术中IPv4网络向IPv6网络发送报文的地址转换示意图;Fig. 3 is the address translation schematic diagram of IPv4 network sending message to IPv6 network in the prior art;

图4为现有技术中IPv6网络向IPv4网络发送报文的地址转换示意图;Fig. 4 is the address translation schematic diagram of IPv6 network sending message to IPv4 network in the prior art;

图5为本发明中IPv4网络向IPv6网络发送报文的地址转换示意图;Fig. 5 is the address translation schematic diagram that IPv4 network sends message to IPv6 network among the present invention;

图6为本发明所述的方法的流程图。Fig. 6 is a flow chart of the method of the present invention.

具体实施方式 Detailed ways

本发明主要是对NAT-PT技术的补充,从而在IPv4网络发起的向IPv6网络访问的过程中,相应的地址转换处理可以有效地利用有限的IPv4地址资源,解决IPv4地址短缺问题。本发明实现的核心思想是:当IPv4网络的节点向IPv6网络的节点发起通信时,根据IPv4地址及相应的端口号进行相应的地址转换处理,并在所述的节点间开展通信业务。如图5所示,也就是说本发明的实质是将任意作为目的端的IPv6网络中的节点的IPv6地址和端口与相应的IPv4地址及相应的端口进行映射转换,从而实现IPv4网络向IPv6网络发起的通信的地址转换处理,充分地利用了有限的IPv4地址资源。The present invention is mainly a supplement to the NAT-PT technology, so that in the process of accessing to the IPv6 network initiated by the IPv4 network, the corresponding address conversion process can effectively use limited IPv4 address resources and solve the problem of shortage of IPv4 addresses. The core idea realized by the present invention is: when a node in the IPv4 network initiates communication to a node in the IPv6 network, corresponding address conversion processing is performed according to the IPv4 address and the corresponding port number, and communication services are carried out between the nodes. As shown in Figure 5, that is to say that the essence of the present invention is to carry out mapping conversion between the IPv6 address and the port of any node in the IPv6 network as the destination end and the corresponding IPv4 address and the corresponding port, thereby realizing that the IPv4 network initiates the IPv6 network The address translation processing of the communications, fully utilizes the limited IPv4 address resources.

本发明是对IPv4网络与IPv6网络互通过程中的地址转换处理过程的改进,具体的讲,本发明为仅针对由IPv4网络中的节点发起与IPv6网络中的节点的通信过程中的地址转换处理提出的技术方案。The present invention is an improvement to the address translation process in the process of interworking between the IPv4 network and the IPv6 network. Specifically, the present invention is only aimed at the address translation process in the communication process initiated by the node in the IPv4 network and the node in the IPv6 network proposed technical solutions.

本发明的具体实现方式如图5和图6所示,包括以下步骤:The specific implementation of the present invention is shown in Fig. 5 and Fig. 6, comprises the following steps:

步骤61:在NAT-PT网关上静态配置IPv4地址和端口号与IPv6地址和端口号的映射关系;Step 61: statically configure the mapping relationship between IPv4 address and port number and IPv6 address and port number on the NAT-PT gateway;

即在NAT-PT网关上,从IPv4地址池中分配空闲的IPv4地址及空闲的IPv4端口,并与IPv6网络中相应节点的IPv6地址和服务端口号建立静态的地址映射关系;That is, on the NAT-PT gateway, allocate free IPv4 addresses and free IPv4 ports from the IPv4 address pool, and establish a static address mapping relationship with the IPv6 addresses and service port numbers of corresponding nodes in the IPv6 network;

当然,也可以在IPv4网络中的节点发起与IPv6网络中的节点的通信时,NAT-PT网关从IPv4地址池中分配一个IPv4地址及相应的端口号,并建立其与作为目的端的IPv6节点的IPv6地址及端口号的对应关系。Of course, when a node in the IPv4 network initiates communication with a node in the IPv6 network, the NAT-PT gateway allocates an IPv4 address and a corresponding port number from the IPv4 address pool, and establishes a connection with the IPv6 node as the destination. Correspondence between IPv6 addresses and port numbers.

步骤62:当IPv4网络中的节点发起与IPv6网络中的节点的通信时,所需要的目的IPv4地址为直接根据步骤61所配置的地址映射关系确定;Step 62: When a node in the IPv4 network initiates communication with a node in the IPv6 network, the required destination IPv4 address is determined directly according to the address mapping relationship configured in step 61;

也就是说,当IPv4网络中的节点发起与IPv6网络中的节点的通信时,所发送的报文的目的地址及目的端口号为在NAT-PT网关上静态配置的IPv6网络中的目的节点的IPv6地址和服务端口号对应的IPv4地址和IPv4端口号。That is to say, when a node in the IPv4 network initiates communication with a node in the IPv6 network, the destination address and destination port number of the sent message are those of the destination node in the IPv6 network statically configured on the NAT-PT gateway. The IPv4 address and IPv4 port number corresponding to the IPv6 address and service port number.

步骤63:NAT-PT网关收到所述的报文后,将其中的目的IPv4地址及端口号根据所述的静态配置的映射关系转换为对应的IPv6地址及端口号;Step 63: After receiving the message, the NAT-PT gateway converts the destination IPv4 address and port number into a corresponding IPv6 address and port number according to the statically configured mapping relationship;

即当IPv4发起的IPv4报文经过NAT-PT网关时,则需要对所述的报文进行地址转换处理,即根据步骤61已经配置的IPv6地址及相应的端口号与IPv4地址及相应端口号的对应关系,将报文的目的地址+端口号替换为目的端的实际IPv6地址及相应的端口号。That is, when the IPv4 message initiated by IPv4 passes through the NAT-PT gateway, it is necessary to perform address translation processing on the message, that is, according to the IPv6 address configured in step 61 and the corresponding port number and the IPv4 address and the corresponding port number Corresponding relationship, replace the destination address + port number of the packet with the actual IPv6 address of the destination end and the corresponding port number.

步骤64:将经过地址转换处理的报文发送给作为目的端的IPv6节点。Step 64: Send the packet processed by the address translation to the IPv6 node as the destination.

本发明还包括:当IPv6节点回应的IPv6报文经过NAT-PT网关时,仍需要进行报文的地址转换处理,即将报文中的IPv6源地址+源端口替换为已保存的与其对应的IPv4源地址+源端口,并将所述的报文发送给IPv4网络中的节点(即发起通信的IPv4节点)。The present invention also includes: when the IPv6 message responded by the IPv6 node passes through the NAT-PT gateway, the address conversion processing of the message is still required, that is, the IPv6 source address + source port in the message is replaced with the saved IPv4 address corresponding to the message. source address+source port, and send the message to the node in the IPv4 network (that is, the IPv4 node that initiates the communication).

步骤61至步骤64对本发明的具体处理过程进行了相应的说明,下而再结合具体的应用实例对本发明作进一步说明:Step 61 to step 64 have carried out corresponding description to the specific processing procedure of the present invention, and then in conjunction with specific application examples, the present invention is further described:

仍以IPv4网络中的节点发起到IPv6网络中的节点的访问为例,参见图1,假设IPv4节点C需要访问IPv6节点A的23端口,则在NAT-PT网关上,从IPv4地址池中分配空闲地址101.1.1.3和空闲端口10001映射节点A的IPv6地址和端口,所述的对应关系为:101.1.1.3+10001<--->2001::2+23。Still taking the node in the IPv4 network to initiate access to the node in the IPv6 network as an example, see Figure 1, assuming that IPv4 node C needs to access port 23 of IPv6 node A, then on the NAT-PT gateway, allocate from the IPv4 address pool The free address 101.1.1.3 and the free port 10001 map the IPv6 address and port of node A, and the corresponding relationship is: 101.1.1.3+10001<--->2001::2+23.

此时,节点C发出的到节点A的IPv4报文的目的地址和端口使用101.1.1.3+10001。当节点C发起的IPv4报文经过NAT-PT网关作报文转换时,将报文目的地址和目的端口由101.1.1.3+10001改为2001::2+23,并发送给节点A。At this time, the destination address and port of the IPv4 packet sent by node C to node A use 101.1.1.3+10001. When the IPv4 message initiated by node C is converted by the NAT-PT gateway, the destination address and destination port of the message are changed from 101.1.1.3+10001 to 2001::2+23, and sent to node A.

当节点A回应的IPv6报文经过NAT-PT网关作报文转换时,将报文源地址和源端口由2001::2+23改为101.1.1.3+10001后,发送给节点C。When the IPv6 message responded by node A passes through the NAT-PT gateway for message conversion, the source address and source port of the message are changed from 2001::2+23 to 101.1.1.3+10001, and then sent to node C.

至此,实现了节点C和节点A的通信。So far, the communication between node C and node A has been realized.

本发明中,每当IPv4网络中的节点向IPv6网络中的节点发起的通信时,均需要在NAT-PT网关建立相应的地址+端口号的对应关系,例如当节点C同时要访问节点B的80端口服务时,NAT-PT网关可以分配同一个IPv4地址和不同的端口来映射节点B的80端口服务,所述的对应关系为:101.1.1.3+10002<---)2001::1+80。In the present invention, whenever a node in the IPv4 network initiates communication to a node in the IPv6 network, it is necessary to establish a corresponding address+port number correspondence at the NAT-PT gateway, for example, when node C wants to access node B at the same time When serving port 80, the NAT-PT gateway can assign the same IPv4 address and different ports to map the port 80 service of node B. The corresponding relationship is: 101.1.1.3+10002<---)2001::1+ 80.

由此可以看出,通过本发明所提供的技术方案,多条不同的由IPv4网络到IPv6网络的通信均可以使用相同的IPv4地址结合不同的端口来映射目的IPv6地址及相应的端口,从而大大节约了IPv4地址的使用。It can be seen that, by the technical scheme provided by the present invention, many different communications from the IPv4 network to the IPv6 network can use the same IPv4 address in combination with different ports to map the destination IPv6 address and corresponding ports, thereby greatly The use of IPv4 addresses is saved.

以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求书的保护范围为准。The above is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present invention can easily think of changes or Replacement should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.

Claims (7)

1, the implementation method of a kind of IPv4 network and IPv6 network service is characterized in that, this method comprises:
A, when the node of the node in the IPv4 network in the IPv6 network initiated communication, for the destination address of this communication distributes the IPv4 address of a correspondence and corresponding ports number;
B, set up corresponding relation as the IPv6 address of the node in the IPv6 network of destination and corresponding ports number and described IPv4 address and corresponding ports number;
C, realize internodal communication in node and the IPv6 network in the described IPv4 network according to the corresponding relation of setting up.
2, the implementation method of IPv4 network according to claim 1 and IPv6 network service is characterized in that described steps A comprises:
When the node of the node in the IPv4 network in the IPv6 network initiated communication, in the IPv4 address pool on NAT-PT (network address translation protocol) gateway the IPv4 address of a correspondence of this allocation of communications and corresponding ports number;
And described step B comprises:
Set up and preserve corresponding relation at the NAT-PT gateway as the IPv4 address of the IPv6 address of the node in the IPv6 network of destination and corresponding ports number and distribution and corresponding ports number.
3, the implementation method of IPv4 network according to claim 2 and IPv6 network service is characterized in that described step C comprises:
The destination address of the message that the node of the node in C1, the IPv4 network in the IPv6 network sends and destination slogan use IPv4 address that steps A distributes and corresponding ports number, and send;
C2, when described message during through the NAT-PT gateway, the corresponding relation of setting up according to step B is converted to the destination address of message and destination slogan as the practical IP v6 address of the node in the IPv6 network of destination and corresponding ports number, and sends.
4, the implementation method of IPv4 network according to claim 3 and Pv6 network service is characterized in that described step C also comprises:
When described as the node in the IPv6 network of destination when returning response message as the node in the IPv4 network of source end, in IPv4 address that the NAT-PT gateway distributes the source address and the corresponding ports replacement step A of the response message that returns and corresponding ports number, and send to node in the described IPv4 network.
5, the implementation method of IPv4 network according to claim 1 and IPv6 network service is characterized in that this method further comprises:
Static configuration is as the corresponding relation of the IPv6 address of the node in the IPv6 network of destination and corresponding ports number and corresponding IPv4 address and corresponding ports number on the NAT-PT gateway;
When the node of the node in the IPv4 network in the IPv6 network initiated communication, realize internodal communication in node and the IPv6 network in the described IPv4 network according to the corresponding relation of setting up.
CNB2004100370128A 2004-04-21 2004-04-21 A method for implementing communication between IPv4 network and IPv6 network Expired - Fee Related CN100525295C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100370128A CN100525295C (en) 2004-04-21 2004-04-21 A method for implementing communication between IPv4 network and IPv6 network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100370128A CN100525295C (en) 2004-04-21 2004-04-21 A method for implementing communication between IPv4 network and IPv6 network

Publications (2)

Publication Number Publication Date
CN1691665A CN1691665A (en) 2005-11-02
CN100525295C true CN100525295C (en) 2009-08-05

Family

ID=35346791

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100370128A Expired - Fee Related CN100525295C (en) 2004-04-21 2004-04-21 A method for implementing communication between IPv4 network and IPv6 network

Country Status (1)

Country Link
CN (1) CN100525295C (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101064718B (en) * 2006-04-25 2011-04-27 Sk电信有限公司 Method and system for registering an IP address in a mobile Internet network
JP4176794B2 (en) * 2006-09-19 2008-11-05 株式会社東芝 Apparatus, method, and program for selecting address used for communication
CN101150566B (en) * 2006-09-19 2011-09-21 中兴通讯股份有限公司 Device and method for realizing network address translation protocol under isomerous network system
ES2387868T3 (en) * 2008-06-30 2012-10-03 France Telecom Procedure for receiving a data packet in an IPv6 domain, associated device and residential gateway
CN101662411B (en) * 2008-08-26 2012-02-08 杭州华三通信技术有限公司 Method and device for IPv4 host computer to access IPv6 network server
CN101431477B (en) * 2008-12-17 2012-05-23 清华大学 P2P operator and campus network router combined IPv4/IPv6 grouping conversion method
CN101616192B (en) * 2009-07-16 2014-01-01 清华大学 A Hierarchical Transformation Method for IPv4 Address and Port Multiplexing
CN102045244A (en) * 2009-10-10 2011-05-04 中兴通讯股份有限公司 IPV4 (Internet Protocol Version 4) network as well as implementation method and system for intercommunicating with new network
CN101808143B (en) * 2010-03-12 2013-06-05 中国电力科学研究院 Method for access of IPv4 power terminal into IPv6 power data communication network
CN101977250B (en) * 2010-10-29 2013-02-27 清华大学 Tunnel selection method in optimization of mutual access between hosts under dual-stack access of edge network
CN102843439B (en) * 2011-06-23 2017-11-10 中兴通讯股份有限公司 Equipment communication method and device
CN102394947B (en) * 2011-10-31 2014-01-22 福建星网锐捷网络有限公司 Translation method, device and system and ALG device for IPv4 and IPv6 addresses
EP2961110A4 (en) * 2014-03-19 2016-05-25 Huawei Device Co Ltd Packet transmission method and apparatus, and server
CN104052830A (en) * 2014-05-29 2014-09-17 汉柏科技有限公司 Network forwarding method and device
CN109756401B (en) * 2019-03-25 2020-11-27 新华三信息安全技术有限公司 Test method, test device, electronic equipment and storage medium
CN110198365B (en) * 2019-05-27 2022-12-23 杭州迪普科技股份有限公司 Address translation detection method and system
CN114268604B (en) * 2021-12-21 2024-03-22 中国电信股份有限公司 Method and system for providing access service

Also Published As

Publication number Publication date
CN1691665A (en) 2005-11-02

Similar Documents

Publication Publication Date Title
CN100525295C (en) A method for implementing communication between IPv4 network and IPv6 network
CN100366033C (en) Apparatus and method for providing direct connection between devices of different private networks
JP3735348B2 (en) Internet protocol address conversion apparatus, communication network system and communication method using the same
JP4234482B2 (en) Dynamic DNS registration method, domain name resolution method, proxy server, and address translation device
US8351430B2 (en) Routing using global address pairs
US7639686B2 (en) Access network clusterhead for providing local mobility management of a roaming IPv4 node
CN102209121A (en) Method and device for intercommunication between Internet protocol version 6 (IPv6) network and Internet protocol version 4 (IPv4) network
CN102984300B (en) Distributed network gate system and access method in a kind of 4-6-4 hybrid protocol network
US20100046517A1 (en) Address translator using address translation information in header area on network layer level and a method therefor
JP2003249942A (en) Internet protocol address translator, home network system using the same, and communication method therefor
WO2011147353A1 (en) Method and apparatus for message transmission
CN101515882B (en) Method, device and system for communication between local area network and public network
WO2010108431A1 (en) Method for realizing ipv6 host visting ipv4 host, method for obtaining ipv6 address prefix and translation device
US20120198025A1 (en) Method and system for implementing interconnection between internet protocol version 4 network and new network
CN102938735A (en) Method utilizing router advertisement carrying options to issue network address translator (NAT) 64 address prefix
CN110691150A (en) SDN-based IPv4 and IPv6 interconnection method and system
CN103118145B (en) Based on the IPv4-over-IPv6 Multiple tunnel auto-creating method of DNS
WO2021136292A1 (en) Method for ip addressing access to nodes in mesh network
CN102546407A (en) Message sending method and device
US9667592B2 (en) Efficient utilization of internet protocol addresses
JP4572938B2 (en) Address translation method
CN102447747A (en) Method, device and system for interacting with private network
Cui et al. State management in IPv4 to IPv6 transition
JP2011061541A (en) Address/protocol translation system, translator device and translator program
KR100652958B1 (en) Data transmission method and system through improvement of network address translation method of home gateway

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090805

Termination date: 20170421

CF01 Termination of patent right due to non-payment of annual fee