[go: up one dir, main page]

CN100512228C - Method for realizing communication between IPv4 communication node and mobile node of crossing heterogeneous network - Google Patents

Method for realizing communication between IPv4 communication node and mobile node of crossing heterogeneous network Download PDF

Info

Publication number
CN100512228C
CN100512228C CNB2007100277457A CN200710027745A CN100512228C CN 100512228 C CN100512228 C CN 100512228C CN B2007100277457 A CNB2007100277457 A CN B2007100277457A CN 200710027745 A CN200710027745 A CN 200710027745A CN 100512228 C CN100512228 C CN 100512228C
Authority
CN
China
Prior art keywords
address
ipv4
mobile node
network
mobile
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
CNB2007100277457A
Other languages
Chinese (zh)
Other versions
CN101039266A (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.)
Sun Yat Sen University
Original Assignee
Sun Yat Sen University
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 Sun Yat Sen University filed Critical Sun Yat Sen University
Priority to CNB2007100277457A priority Critical patent/CN100512228C/en
Publication of CN101039266A publication Critical patent/CN101039266A/en
Application granted granted Critical
Publication of CN100512228C publication Critical patent/CN100512228C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明涉及一种实现IPv4通信节点与跨异构网络的移动节点通信的方法,具体地,本发明要解决的问题是:家乡代理处于IPv6网络,通信节点处于IPv4网络,移动节点从IPv6网络移动到IPv4网络后,如何保证原有通信的连续性。本发明在现有Mobile IPv4技术(RFC3344)和Mobile IPv6技术(RFC3775)的基础上,通过在异构网络之间设置带有MobileIP-ALG的NAT-PT网关,并围绕Mobile IP-ALG对注册、通信过程进行精心设计,从而实现了移动节点从IPv6网络切换到IPv4网络后仍能保持与处于IPv4网络的通信节点的通信,而且移动节点切换到IPv4网络后,它与通信节点相互发送的数据报文无需再经过IPv6网络,提高了路由效率,此外,移动节点的移动对于通信节点来说是完全透明的。

Figure 200710027745

The present invention relates to a method for realizing communication between an IPv4 communication node and a mobile node across a heterogeneous network. Specifically, the problem to be solved by the present invention is: the home agent is in the IPv6 network, the communication node is in the IPv4 network, and the mobile node moves from the IPv6 network After reaching the IPv4 network, how to ensure the continuity of the original communication. The present invention is on the basis of existing Mobile IPv4 technology (RFC3344) and Mobile IPv6 technology (RFC3775), by arranging the NAT-PT gateway with MobileIP-ALG between the heterogeneous networks, and surrounding Mobile IP-ALG pair registration, The communication process is carefully designed so that the mobile node can still maintain communication with the communication node in the IPv4 network after switching from the IPv6 network to the IPv4 network, and after the mobile node switches to the IPv4 network, the datagrams sent between it and the communication node The text does not need to go through the IPv6 network, which improves the routing efficiency. In addition, the movement of the mobile node is completely transparent to the communication node.

Figure 200710027745

Description

一种实现IPv4通信节点与跨异构网络的移动节点通信的方法 A method for realizing communication between IPv4 communication nodes and mobile nodes across heterogeneous networks

技术领域 technical field

本发明涉及通信领域,具体涉及一种实现IPv4通信节点与跨异构网络的移动节点通信的方法。The invention relates to the communication field, in particular to a method for realizing communication between an IPv4 communication node and a mobile node across a heterogeneous network.

背景技术 Background technique

随着网络技术的发展和网络规模的扩大,IPv4(Internet Protocol version 4)已经不能满足网络发展的要求。IPv6(Internet Protocol version 6)作为IPv4的替代版本,能够提供巨大的地址空间,并具有许多IPv4所不具备的新特性,受到了越来越多的重视。由于我国拥有的IPv4地址数量很少,地址枯竭的问题尤为突出,我国正大力推进IPv6的研究和发展。另一方面,随着人们对移动通信需求的日益增加,对移动通信的研究也达到了前所未有的高度。With the development of network technology and the expansion of network scale, IPv4 (Internet Protocol version 4) can no longer meet the requirements of network development. As an alternative version of IPv4, IPv6 (Internet Protocol version 6) can provide a huge address space and has many new features that IPv4 does not have, and has received more and more attention. Due to the small number of IPv4 addresses in our country, the problem of address exhaustion is particularly prominent, and our country is vigorously promoting the research and development of IPv6. On the other hand, as people's demand for mobile communication increases day by day, the research on mobile communication has also reached an unprecedented height.

为了解决移动通信的问题,人们引入了Mobile IP(移动IP)技术。Mobile IP技术的一个显著特点是移动节点的移动对于网络层上所承载的应用具有透明性。简单地说,就是移动节点在不同的网络之间移动,传输层及传输层以上的应用都不必改变通信的源地址和目的地址,从而保持通信的连续性。In order to solve the problem of mobile communication, people have introduced Mobile IP (Mobile IP) technology. A notable feature of Mobile IP technology is that the movement of mobile nodes is transparent to the applications carried on the network layer. To put it simply, the mobile node moves between different networks, and the applications above the transport layer and above the transport layer do not need to change the source address and destination address of the communication, so as to maintain the continuity of communication.

目前,对Mobile IP技术的研究已经取得一定成效。IETF在2002年和2004年分别提出了Mobile IPv4(在RFC3344中定义)协议和Mobile IPv6(在RFC3775中定义)协议,有效地解决了在纯IPv4网络和纯IPv6网络的移动通信问题。然而,IPv6取代IPv4不是一朝一夕的事情,IPv4和IPv6将长期共存。因此,解决异构网络(这里指IPv4和IPv6网络)之间的移动通信问题,具有十分重要的意义。At present, research on Mobile IP technology has achieved certain results. IETF proposed the Mobile IPv4 (defined in RFC3344) protocol and Mobile IPv6 (defined in RFC3775) protocol in 2002 and 2004 respectively, effectively solving the mobile communication problems in pure IPv4 network and pure IPv6 network. However, IPv6 will not replace IPv4 overnight, and IPv4 and IPv6 will coexist for a long time. Therefore, it is of great significance to solve the problem of mobile communication between heterogeneous networks (referred to here as IPv4 and IPv6 networks).

异构网络的移动通信问题,大致有下面六种情况:Mobile communication problems in heterogeneous networks generally fall into the following six situations:

1、移动节点及其家乡代理处于IPv6网络,通信节点处于IPv4网络;1. The mobile node and its home agent are in the IPv6 network, and the communication node is in the IPv4 network;

2、移动节点及其家乡代理处于IPv4网络,通信节点处于IPv6网络;2. The mobile node and its home agent are in the IPv4 network, and the communication node is in the IPv6 network;

3、移动节点的家乡代理处于IPv6网络,通信节点处于IPv4网络,移动节点从IPv6网络切换到IPv4网络;3. The home agent of the mobile node is in the IPv6 network, the communication node is in the IPv4 network, and the mobile node switches from the IPv6 network to the IPv4 network;

4、移动节点的家乡代理处于IPv6网络,通信节点处于IPv6网络,移动节点从IPv6网络切换到IPv4网络;4. The home agent of the mobile node is in the IPv6 network, the communication node is in the IPv6 network, and the mobile node switches from the IPv6 network to the IPv4 network;

5、移动节点的家乡代理处于IPv4网络,通信节点处于IPv4网络,移动节点从IPv4网络切换到IPv6网络;5. The home agent of the mobile node is in the IPv4 network, the communication node is in the IPv4 network, and the mobile node switches from the IPv4 network to the IPv6 network;

6、移动节点的家乡代理处于IPv4网络,通信节点处于IPv6网络,移动节点从IPv4网络切换到IPv6网络。6. The home agent of the mobile node is in the IPv4 network, the communication node is in the IPv6 network, and the mobile node switches from the IPv4 network to the IPv6 network.

目前,IETF还没有提出上述问题的解决方案。公开的资料表明,国内已有单位针对上面的第一种情况提出了一种解决方案,并提交了专利申请(专利公开号为CN1870583A),针对上面的第二、第四和第五种情况,我们分别提出了解决方案,并提交了专利申请(专利申请号分别为200710026298.3、200710027050.9和200710027404.x),但这四种解决方案并不适用于上述的另外两种情况。本发明的目的就是针对上述的第三种情况提出一种解决方案。Currently, the IETF has not proposed a solution to the above-mentioned problems. Publicly available information shows that domestic units have proposed a solution to the first situation above, and submitted a patent application (the patent publication number is CN1870583A), and for the second, fourth and fifth situations above, We proposed solutions respectively and submitted patent applications (patent application numbers are 200710026298.3, 200710027050.9 and 200710027404.x respectively), but these four solutions are not applicable to the other two situations mentioned above. The object of the present invention is to propose a solution to the above third situation.

如前所述,IPv6将与IPv4长期共存。目前,主要有三种技术支持处于IPv6网络的节点和处于IPv4网络的节点之间的通信,即双栈技术、隧道技术以及NAT-PT技术。As mentioned earlier, IPv6 will coexist with IPv4 for a long time. At present, there are mainly three technologies to support the communication between the nodes in the IPv6 network and the nodes in the IPv4 network, that is, dual-stack technology, tunnel technology and NAT-PT technology.

NAT-PT(即网络地址转换—协议转换)技术的基本原理是,在IPv4网络和IPv6网络之间设置网关(称为NAT-PT网关),对不同协议版本的数据报文进行地址转换和协议转换,即从IPv4网络发往IPv6网络的数据报文要转换成IPv6格式的报文;从IPv6网络发往IPv4网络的数据报文要转换成IPv4格式的报文。NAT-PT网关负责维护一个IPv4地址池和一张IPv4地址和IPv6地址的映射表。对于IPv6到IPv4的地址转换,NAT-PT网关从地址池中分配一个可用的IPv4地址映射IPv6地址,并记录这个射关系,以供NAT-PT网关在随后的通信过程中查询;对于IPv4到IPv6的地址转换,NAT-PT网关则在IPv4地址前面加上一个96位的NAT-PT网关前缀。The basic principle of NAT-PT (Network Address Translation-Protocol Translation) technology is to set up a gateway (called NAT-PT gateway) between the IPv4 network and the IPv6 network to perform address translation and protocol translation on data packets of different protocol versions. Conversion, that is, data packets sent from the IPv4 network to the IPv6 network must be converted into packets in IPv6 format; data packets sent from the IPv6 network to the IPv4 network must be converted into packets in IPv4 format. The NAT-PT gateway is responsible for maintaining an IPv4 address pool and a mapping table of IPv4 addresses and IPv6 addresses. For address translation from IPv6 to IPv4, the NAT-PT gateway allocates an available IPv4 address from the address pool to map the IPv6 address, and records the mapping relationship for the NAT-PT gateway to query in the subsequent communication process; for IPv4 to IPv6 The NAT-PT gateway adds a 96-bit NAT-PT gateway prefix in front of the IPv4 address.

另外,因为NAT-PT网关属于网络层的设备,一般只在网络层对数据报文进行转换,因此DNS、FTP等在应用层涉及到地址转换的应用不能穿越NAT-PT网关。为了解决这个问题,人们在NAT-PT网关加上ALG(应用层网关),针对不同的应用,就有DNS-ALG,FTP-ALG等。把NAT-PT网关的网络层转换功能和ALG的应用层处理功能结合起来,就能够解决DNS、FTP等穿越NAT-PT网关的问题。In addition, because the NAT-PT gateway is a device at the network layer, it generally only converts data packets at the network layer, so DNS, FTP and other applications that involve address translation at the application layer cannot pass through the NAT-PT gateway. In order to solve this problem, people add ALG (Application Layer Gateway) to the NAT-PT gateway. For different applications, there are DNS-ALG, FTP-ALG, etc. Combining the network layer conversion function of the NAT-PT gateway with the application layer processing function of the ALG can solve the problem of DNS, FTP, etc. traversing the NAT-PT gateway.

下面结合图1用实例说明用NAT-PT网关加上DNS-ALG实现异构网络之间的DNS查询的工作原理。The working principle of implementing DNS query between heterogeneous networks by using a NAT-PT gateway plus DNS-ALG will be described below with an example in conjunction with FIG. 1 .

如图1所示,处于IPv4网络的节点A要与处于IPv6网络的节点B通信,节点A需要首先用节点B的域名查询到节点B的IP地址(IPv4格式),这个过程要借助DNS服务器来完成。As shown in Figure 1, node A on the IPv4 network needs to communicate with node B on the IPv6 network. Node A needs to first use the domain name of node B to query the IP address of node B (in IPv4 format). This process requires the help of a DNS server. Finish.

为方便说明,假设IPv4网络和IPv6网络均只有一台DNS服务器,分别是DNS服务器A和DNS服务器B。节点B的域名为www.abc.com,其IPv6地址为2001::1。For convenience of description, it is assumed that both the IPv4 network and the IPv6 network have only one DNS server, which are DNS server A and DNS server B respectively. The domain name of node B is www.abc.com, and its IPv6 address is 2001::1.

节点A要查询节点B的IP地址,首先向DNS服务器A发送DNS查询请求,DNS服务器A发现没有上述域名的记录,于是向DNS服务器B查询。DNS服务器B找到上述域名的记录,把其解释为IPv6地址2001::1,并向DNS服务器A发送应答消息。该应答消息经过NAT-PT网关时,NAT-PT网关从其维护的地址池中找出一个可用的IPv4地址(假设为202.116.78.10)作为节点B的IPv4地址,并创建一条映射记录。经过修改后的应答消息经原路返回到节点A,于是节点A就可以通过202.116.78.10与节点B进行通信。Node A wants to query the IP address of node B. First, it sends a DNS query request to DNS server A. DNS server A finds that there is no record of the above domain name, so it queries DNS server B. DNS server B finds the record of the above domain name, interprets it as IPv6 address 2001::1, and sends a reply message to DNS server A. When the response message passes through the NAT-PT gateway, the NAT-PT gateway finds an available IPv4 address (assumed to be 202.116.78.10) from its maintained address pool as the IPv4 address of node B, and creates a mapping record. The modified reply message is returned to node A through the original route, so node A can communicate with node B through 202.116.78.10.

节点B如果要查询节点A的IP地址,其过程大致相同。应答消息返回的时候,NAT-PT网关会在节点A的IPv4地址前面加上96位的NAT-PT网关前缀作为节点A的IPv6地址。If node B wants to query the IP address of node A, the process is roughly the same. When the response message is returned, the NAT-PT gateway will add a 96-bit NAT-PT gateway prefix in front of the IPv4 address of node A as the IPv6 address of node A.

本发明涉及Mobile IPv4技术。下面结合图2和RFC3344说明Mobile IPv4的基本原理:The present invention relates to Mobile IPv4 technology. The following describes the basic principles of Mobile IPv4 in combination with Figure 2 and RFC3344:

1、移动代理通过代理广告消息表明它们的存在。移动节点也可以选择性地通过代理请求消息请求所在链路的移动代理向其发送代理广告消息。1. Mobile agents indicate their existence through agent advertisement messages. The mobile node can also optionally request the mobile agent on the link to send it an agent advertisement message through an agent request message.

2、移动节点接收移动代理广告消息,并根据此消息判断自己处于家乡网络还是外地网络。2. The mobile node receives the mobile agent advertisement message, and judges whether it is in the home network or a foreign network according to the message.

3、如果移动节点发现自己处于家乡网络,则采用与普通的固定节点一样的方式工作;如果移动节点发现自己从外地网络返回家乡网络,则向家乡代理注销。3. If the mobile node finds itself in the home network, it will work in the same way as a common fixed node; if the mobile node finds itself returning to the home network from a foreign network, it will log out to the home agent.

4、如果移动节点发现自己移动到外地网络,则从外地网络获得一个转交地址。转交地址可以由外地代理指派,也可以通过DHCP等方式获取。4. If the mobile node finds itself moving to a foreign network, it obtains a care-of address from the foreign network. The care-of address can be assigned by the foreign agent, or can be obtained through DHCP and other methods.

5、移动节点向其家乡代理注册新的转交地址。注册请求消息和注册应答消息一般要经过外地代理。5. The mobile node registers the new care-of address with its home agent. Registration request messages and registration response messages generally go through foreign agents.

6、移动节点往通信节点发送数据报文时,一般通过标准的IP路由机制,直接把数据报文发送给其通信节点,当移动节点所在的外地网络的路由器有“入口过滤”(Ingress Filtering)功能时,移动节点也可以首先通过反向隧道把数据报文发送到家乡代理,然后再由家乡代理转交到通信节点。6. When the mobile node sends a data message to the communication node, it generally sends the data message directly to its communication node through the standard IP routing mechanism. When the router of the foreign network where the mobile node is located has "Ingress Filtering" (Ingress Filtering) When functioning, the mobile node can also first send the data message to the home agent through the reverse tunnel, and then the home agent forwards it to the correspondent node.

本发明还涉及Mobile IPv6技术。下面结合图3和RFC 3775说明Mobile IPv6的基本原理:The present invention also relates to Mobile IPv6 technology. The following describes the basic principles of Mobile IPv6 in combination with Figure 3 and RFC 3775:

1、无论是在家乡网络还是外地网络,移动节点的家乡地址都不会改变。当移动节点处于家乡网络时,移动节点通过常规的IP路由机制收发数据报文;1. The home address of the mobile node will not change whether it is in the home network or a foreign network. When the mobile node is in the home network, the mobile node sends and receives data packets through the conventional IP routing mechanism;

2、移动节点移动到外地网络后,获得转交地址。发往此转交地址的数据报文会被发送到移动节点。移动节点可以同时拥有多个转交地址;2. After the mobile node moves to a foreign network, it obtains a care-of address. Data packets sent to this care-of address will be sent to the mobile node. A mobile node can have multiple care-of addresses at the same time;

3、移动到外地网络后,移动节点会向家乡代理发送绑定更新消息以注册其获得的主转交地址;3. After moving to a foreign network, the mobile node will send a binding update message to the home agent to register the primary care-of address it has obtained;

4、通信节点可以是固定的或者是移动的。移动节点可以通过注册的方式向其通信节点提供其当前的位置信息;4. Communication nodes can be fixed or mobile. The mobile node can provide its current location information to its correspondent node through registration;

5、移动节点向通信节点发送绑定更新消息之前,首先执行Return Routability Procedure,Return Routability Procedure的目的是要确认移动节点的家乡地址及其转交地址是可到达的。5. Before the mobile node sends a binding update message to the correspondent node, it first executes the Return Routability Procedure. The purpose of the Return Routability Procedure is to confirm that the home address of the mobile node and its care-of address are reachable.

Return Routability Procedure包含4条消息:Home Test Init、Care-of Test Init、Home Test以及Care-of Test。其中,Home Test Init和Care-of Test Init消息是同时从移动节点发往通信节点的:Care-of Test Init消息直接从移动节点发往通信节点,而Home Test Init消息则首先通过反向隧道发送到家乡网络,然后再从家乡网络发送到通信节点。通信节点收到并处理上述两条消息后就分别向移动节点发回Home Test消息和Care-ofTest消息,这两条消息将按原路返回移动节点。The Return Routability Procedure contains 4 messages: Home Test Init, Care-of Test Init, Home Test, and Care-of Test. Among them, the Home Test Init and Care-of Test Init messages are sent from the mobile node to the correspondent node at the same time: the Care-of Test Init message is directly sent from the mobile node to the correspondent node, while the Home Test Init message is first sent through the reverse tunnel to the home network, and then from the home network to the correspondent node. After the communication node receives and processes the above two messages, it sends back the Home Test message and the Care-ofTest message to the mobile node respectively, and these two messages will return to the mobile node by the original route.

6、移动节点与其通信节点的通信有两种方式。6. There are two ways for the mobile node to communicate with its correspondent node.

第一种是“双向隧道”方式。通信节点发出的数据报文被路由到家乡网络,家乡代理截获此数据报文并通过隧道把此数据报文发送到移动节点的转交地址;而移动节点发出的数据报文通过反向隧道发送到家乡网络,然后再从家乡网络发送到通信节点。采用这种方式时,通信节点无需知道移动节点当前的位置信息。The first is the "two-way tunnel" approach. The data message sent by the communication node is routed to the home network, and the home agent intercepts the data message and sends the data message to the care-of address of the mobile node through the tunnel; while the data message sent by the mobile node is sent to the home network through the reverse tunnel. home network, and then sent from the home network to the correspondent node. In this way, the communication node does not need to know the current location information of the mobile node.

第二种是“路由优化”方式。这种通信方式允许通信节点把数据报文直接发送到移动节点的转交地址,其前提条件是,移动节点必须向通信节点注册以使通信节点知道其家乡地址与转交地址的绑定关系。The second is the "route optimization" approach. This communication method allows the correspondent node to send data packets directly to the care-of address of the mobile node. The prerequisite is that the mobile node must register with the correspondent node so that the correspondent node knows the binding relationship between its home address and the care-of address.

7、当通信节点向移动节点发送数据报文时,目的地址为移动节点的转交地址,并且在数据报文里携带移动节点的家乡地址信息。相似地,移动节点向通信节点发送数据报文时,源地址为转交地址,并且在数据报文里携带家乡地址信息。携带家乡地址的目的是为了保证转交地址对于网络层以上的应用透明。7. When the communication node sends a data message to the mobile node, the destination address is the care-of address of the mobile node, and the data message carries the home address information of the mobile node. Similarly, when the mobile node sends a data message to the correspondent node, the source address is the care-of address, and the data message carries home address information. The purpose of carrying the home address is to ensure that the care-of address is transparent to applications above the network layer.

但是,Mobile IPv4协议和Mobile IPv6协议都不能直接应用于上述第三种情况,其主要问题是:移动节点从IPv6网络移动到IPv4网络后,必须向处于IPv6网络的家乡代理注册,而这个过程是跨异构网络的;移动节点在切换到IPv4网络之前,它与通信节点的通信是跨异构网络的,而切换之后,它与通信节点的通信只需在IPv4网络中进行,这里就涉及到如何尽可能地保证移动节点的移动对已有通信过程的透明性以及如何提高路由效率的问题。However, neither the Mobile IPv4 protocol nor the Mobile IPv6 protocol can be directly applied to the third case above. The main problem is: after the mobile node moves from the IPv6 network to the IPv4 network, it must register with the home agent in the IPv6 network, and this process is Cross-heterogeneous network; before the mobile node switches to the IPv4 network, its communication with the communication node is across the heterogeneous network, and after the handover, its communication with the communication node only needs to be carried out in the IPv4 network, which involves How to ensure the transparency of the mobile node's movement to the existing communication process as much as possible and how to improve the routing efficiency.

发明内容 Contents of the invention

本发明的目的就是针对上述问题,提供一种实现IPv4通信节点与跨异构网络的移动节点通信的方法。通过该方法,使移动节点从IPv6网络移动到IPv4网络后仍然能够维持原有的通信,并且保证了移动节点的移动对于通信节点的透明。本发明的目的是这样实现的:The purpose of the present invention is to address the above problems and provide a method for realizing communication between an IPv4 communication node and a mobile node across a heterogeneous network. Through this method, the original communication can still be maintained after the mobile node moves from the IPv6 network to the IPv4 network, and the transparency of the movement of the mobile node to the communication node is guaranteed. The purpose of the present invention is achieved like this:

1、向家乡代理注册1. Register with Home Agent

移动节点从IPv6网络切换到IPv4网络后,通过接收IPv4网络里的代理路由广告消息获知自己已经进入IPv4网络,随后移动节点在所在IPv4网络获得一个转交地址。移动节点要马上向家乡代理注册以便把自己最新的位置信息通知家乡代理。After the mobile node switches from the IPv6 network to the IPv4 network, it knows that it has entered the IPv4 network by receiving the proxy routing advertisement message in the IPv4 network, and then the mobile node obtains a care-of address in the IPv4 network where it is located. The mobile node should immediately register with the home agent in order to notify the home agent of its latest location information.

(1)家乡代理地址的获取(1) Obtaining the address of the home agent

移动节点切换到IPv4网络后,需要知道家乡代理的IPv4形式的地址才能向家乡代理注册。本发明通过在IPv4网络和IPv6网络之间设置带有DNS-ALG的NAT-PT网关来达到上述目的。移动节点从IPv6网络切换到IPv4网络后,获得一个新的转交地址。移动节点在向家乡代理注册这个新的转交地址之前,首先发出关于家乡代理的域名解释请求。如背景技术部分所述,移动节点最终会在带有DNS-ALG的NAT-PT网关和域名服务器的帮助下获得家乡代理IPv4格式的地址。After the mobile node switches to the IPv4 network, it needs to know the IPv4 address of the home agent to register with the home agent. The present invention achieves the above object by setting a NAT-PT gateway with DNS-ALG between the IPv4 network and the IPv6 network. After the mobile node switches from the IPv6 network to the IPv4 network, it obtains a new care-of address. Before the mobile node registers the new care-of address with the home agent, it first sends out a domain name interpretation request about the home agent. As mentioned in the background technology section, the mobile node will finally obtain the address of the home agent in IPv4 format with the help of the NAT-PT gateway with DNS-ALG and the domain name server.

应用本发明的上述方法还需要满足下面的条件:Application of the above method of the present invention also needs to meet the following conditions:

A、移动节点同时支持IPv4和IPv6两种协议,以便能够在IPv4网络和IPv6网络之间自由地切换;A. The mobile node supports both IPv4 and IPv6 protocols, so that it can freely switch between the IPv4 network and the IPv6 network;

B、在IPv4网络和IPv6网络之间设置带有DNS-ALG的NAT-PT网关;B. Set up a NAT-PT gateway with DNS-ALG between the IPv4 network and the IPv6 network;

C、为每个家乡代理配置一个域名;C. Configure a domain name for each home agent;

D、移动节点记住家乡代理的域名;D. The mobile node remembers the domain name of the home agent;

(2)注册请求消息的格式及处理(2) Format and processing of registration request message

在RFC3344和RFC3775中,由移动节点向家乡代理注册其转交地址而发送的消息的有所不同:RFC3344描述的是IPv4网络的情况,里面采用的是注册请求消息(Registration RequestMessage);RFC3775描述的是IPv6网络的情况,里面采用的是绑定更新消息(Binding UpdateMessage)。本发明中,移动节点向家乡代理发送注册请求消息,该消息经过带有Mobile IP-ALG的NAT-PT网关时,Mobile IP-ALG把它转换成绑定更新消息后再发送到家乡代理。在相反方向上,家乡代理向移动节点发送绑定确认消息,Mobile IP-ALG把该消息转换成注册应答消息后再发送到移动节点。In RFC3344 and RFC3775, the messages sent by the mobile node to register its care-of address with the home agent are different: RFC3344 describes the situation of an IPv4 network, which uses a registration request message (Registration RequestMessage); RFC3775 describes In the case of an IPv6 network, the Binding Update Message (Binding UpdateMessage) is used. In the present invention, the mobile node sends a registration request message to the home agent, and when the message passes through the NAT-PT gateway with the Mobile IP-ALG, the Mobile IP-ALG converts it into a binding update message and then sends it to the home agent. In the opposite direction, the home agent sends a binding confirmation message to the mobile node, and Mobile IP-ALG converts the message into a registration response message and then sends it to the mobile node.

A、由于NAT-PT网关一般只对数据报文进行IP版本的转换,而本发明中,NAT-PT还要对注册消息以及通信节点发送的数据报文进行应用层上的处理,因此,本发明在NAT-PT网关上设置Mobile IP-ALG以完成这些工作。Mobile IP-ALG的功能将在下面详细介绍。A, because NAT-PT gateway generally only carries out the conversion of IP version to data message, and in the present invention, NAT-PT also will carry out the processing on the application layer to registration message and the data message that communication node sends, therefore, this Invented to set Mobile IP-ALG on NAT-PT gateway to complete these tasks. The functions of Mobile IP-ALG will be introduced in detail below.

B、在Mobile IPv4中,注册请求消息的格式如图4所示。在本发明中,由于家乡代理处于IPv6网络,所以家乡代理最终收到的注册请求消息里面的家乡地址以及转交地址都应该是IPv6格式的。NAT-PT网关可以把IPv4格式的转交地址转换成IPv6格式(在前面加上NAT-PT网关前缀),但是NAT-PT并不能用常规的方法获得移动节点IPv6格式的家乡地址。因此,本发明对注册请求消息作如下修改:把原来的家乡地址域置零,并在消息尾部的扩展部分携带移动节点IPv6格式的家乡地址。修改后的注册请求消息如图5所示,其中,消息后面的扩展部分包含该消息的认证数据。注册请求消息是用UDP封装的,且目的端口为434,源地址为IPv4格式的转交地址,目的地址为上述通过DNS查询获得的IPv4格式的家乡代理地址。B. In Mobile IPv4, the format of the registration request message is shown in Figure 4. In the present invention, since the home agent is in the IPv6 network, the home address and the care-of address in the registration request message finally received by the home agent should be in IPv6 format. The NAT-PT gateway can convert the care-of address in IPv4 format into IPv6 format (adding the NAT-PT gateway prefix in front), but the NAT-PT cannot obtain the home address of the mobile node in IPv6 format by conventional methods. Therefore, the present invention modifies the registration request message as follows: zero the original home address field, and carry the home address of the mobile node in IPv6 format in the extended part at the end of the message. The modified registration request message is shown in Fig. 5, wherein the extension part after the message contains the authentication data of the message. The registration request message is encapsulated with UDP, the destination port is 434, the source address is the care-of address in IPv4 format, and the destination address is the home agent address in IPv4 format obtained through DNS query.

C、上述注册请求消息经过NAT-PT网关时,NAT-PT网关根据UDP目的端口为434这个特征截获该消息,并把该消息送到Mobile IP-ALG上处理。Mobile IP-ALG首先根据该消息里的认证数据对消息进行认证,如果认证通过,则把它转换成绑定更新消息,其中家乡地址是直接从上述经过修改的注册请求消息的扩展头中取得的。绑定更新消息的源地址为IPv6格式的转交地址(由NAT-PT在原来的注册请求消息的源地址前面加上96位的NAT-PT网关前缀而获得的),目的地址为家乡代理地址(由NAT-PT网关通过根据原来的注册请求消息的目的地址查询映射表而获得的)。C. When the above-mentioned registration request message passes through the NAT-PT gateway, the NAT-PT gateway intercepts the message according to the feature that the UDP destination port is 434, and sends the message to the Mobile IP-ALG for processing. Mobile IP-ALG first authenticates the message according to the authentication data in the message, and if the authentication passes, it converts it into a binding update message, in which the home address is obtained directly from the extension header of the above-mentioned modified registration request message . The source address of the binding update message is the care-of address in IPv6 format (obtained by NAT-PT adding a 96-bit NAT-PT gateway prefix to the source address of the original registration request message), and the destination address is the home agent address ( It is obtained by the NAT-PT gateway by querying the mapping table according to the destination address of the original registration request message).

D、完成步骤C所述处理后,Mobile IP-ALG还会记下绑定更新消息的源地址和目的地址,以作为稍后截获家乡代理发回来的绑定确认消息的条件。此外,Mobile IP-ALG还会记住转换前的注册请求消息的源端口,以便后面处理绑定确认消息的时候使用。D. After completing the processing described in step C, Mobile IP-ALG will also record the source address and destination address of the binding update message as a condition for later intercepting the binding confirmation message sent back by the home agent. In addition, Mobile IP-ALG will also remember the source port of the registration request message before conversion, so that it can be used later when processing the binding confirmation message.

E、家乡代理收到上述绑定更新消息后,首先对该消息进行认证,如果认证通过,则进一步决定是否接受该绑定更新。如果家乡代理同意接受绑定更新,则创建或更新关于该移动节点的绑定缓存,并向移动节点的转交地址发送绑定确认消息表示绑定更新已被接受;否则,向移动节点的转交地址发送绑定确认消息表示拒绝。其中,上述转交地址实际上是绑定更新消息的源地址,它是由移动节点在IPv4网络获得的转交地址加上96位的NAT-PT网关前缀构成的。绑定确认消息的源地址为家乡代理地址,目的地址为转交地址的IPv6形式。E. After receiving the binding update message, the home agent first authenticates the message, and if the authentication passes, it further decides whether to accept the binding update. If the home agent agrees to accept the binding update, then create or update the binding cache about the mobile node, and send a binding confirmation message to the care-of address of the mobile node to indicate that the binding update has been accepted; otherwise, send a binding confirmation message to the care-of address of the mobile node Send a binding confirmation message to indicate rejection. Wherein, the above-mentioned care-of address is actually the source address of the binding update message, which is composed of the care-of address obtained by the mobile node in the IPv4 network plus a 96-bit NAT-PT gateway prefix. The source address of the binding confirmation message is the home agent address, and the destination address is the IPv6 form of the care-of address.

(3)绑定确认消息的处理(3) Processing of binding confirmation message

由于上述绑定确认消息的目的地址的前缀是NAT-PT网关前缀,因此该消息会经过NAT-PT网关。Since the prefix of the destination address of the binding confirmation message is the prefix of the NAT-PT gateway, the message will pass through the NAT-PT gateway.

A、绑定确认消息经过NAT-PT网关时,NAT-PT网关检查其源地址和目的地址,如果NAT-PT网关发现先前对这两个地址有记录,则把该消息送到Mobile IP-ALG上处理。处理的过程如下:Mobile IP-ALG首先对该消息进行认证,如果认证通过,则把该绑定确认消息转换成注册应答消息,Mobile IP-ALG还会在注册应答消息的扩展部分携带移动节点的IPv4家乡地址,这个地址会在后面的通信中用到。在RFC3344中,注册应答消息的格式如图6所示,本发明的注册应答消息如图7所示,它是用UDP封装的,源端口为434,目的端口为原来的注册请求消息的源端口(Mobile IP-ALG已做记录)。该消息的源地址为家乡代理的IPv4地址,目的地址为IPv4转交地址。A. When the binding confirmation message passes through the NAT-PT gateway, the NAT-PT gateway checks its source address and destination address. If the NAT-PT gateway finds that these two addresses have been recorded before, it sends the message to Mobile IP-ALG on processing. The processing process is as follows: Mobile IP-ALG first authenticates the message, and if the authentication is passed, converts the binding confirmation message into a registration response message, and the Mobile IP-ALG will also carry the mobile node's ID in the extension part of the registration response message. IPv4 home address, this address will be used in subsequent communications. In RFC3344, the format of the registration response message is as shown in Figure 6, and the registration response message of the present invention is as shown in Figure 7, it is encapsulated with UDP, the source port is 434, and the destination port is the source port of the original registration request message (Mobile IP-ALG has been recorded). The source address of the message is the IPv4 address of the home agent, and the destination address is the IPv4 care-of address.

B、Mobile IP-ALG创建或更新移动节点的IPv4地址与IPv4转交地址的绑定缓存。这个绑定缓存在后面的通信中会用到。B. The Mobile IP-ALG creates or updates the binding cache between the IPv4 address of the mobile node and the IPv4 care-of address. This binding cache will be used later in the communication.

C、移动节点收到上述注册应答消息后,就可以知道注册的结果,并且知道自己的IPv4形式的家乡地址(这个地址实际上是NAT-PT网关地址池中的地址,通信节点向移动节点发送数据报文时一直以这个地址为目的地址)。After C, mobile node receives above-mentioned registration response message, just can know the result of registration, and know the hometown address of own IPv4 form (this address is the address in the NAT-PT gateway address pool actually, communication node sends to mobile node Data packets always use this address as the destination address).

(4)移动节点收到上述注册应答消息后,知道它的注册请求已经被允许,并且也从该注册应答消息中知道自己的IPv4格式的家乡地址。(4) After receiving the above-mentioned registration response message, the mobile node knows that its registration request has been allowed, and also knows its own home address in IPv4 format from the registration response message.

至此,转交地址的注册就完成了。由上述说明可以看出,移动节点的注册使家乡代理获得移动节点位置的最新信息,而且也让带Mobile IP-ALG的NAT-PT网关知道移动节点已经从IPv6网络切换到IPv4网络,从而能够在后续的通信中起到类似家乡代理的作用。At this point, the registration of the care-of address is completed. It can be seen from the above description that the registration of the mobile node enables the home agent to obtain the latest information on the location of the mobile node, and also lets the NAT-PT gateway with Mobile IP-ALG know that the mobile node has switched from the IPv6 network to the IPv4 network, so that it can be in the IPv4 network In the subsequent communication, it plays a role similar to the home agent.

2、移动节点和通信节点之间的通信2. Communication between mobile nodes and communication nodes

移动节点完成注册过程后,就可以继续和通信节点通信了。移动节点切换到IPv4网络后,其家乡代理处于IPv6网络,而移动节点和通信节点均处于IPv4网络。由于异构网络之间的通信开销较大,因此本发明在设计方案时的原则是让移动节点和通信节点的通信无需跨越异构网络(即不经过IPv6网络里的家乡代理),同时尽可能保持移动节点的移动对于通信双方特别是通信节点的透明。After the mobile node completes the registration process, it can continue to communicate with the correspondent node. After the mobile node switches to the IPv4 network, its home agent is in the IPv6 network, while both the mobile node and the correspondent node are in the IPv4 network. Because the communication overhead between heterogeneous networks is relatively large, the principle of the present invention when designing the scheme is to allow the communication between the mobile node and the communication node without crossing the heterogeneous network (that is, without passing through the home agent in the IPv6 network), and simultaneously Keep the movement of the mobile node transparent to the two communicating parties, especially the communicating node.

(1)通信节点向移动节点发送数据报文(1) The communication node sends a data message to the mobile node

通信节点向移动节点发送的数据报文的格式跟移动节点移动之前是一样的,其源地址为自己的地址,目的地址为移动节点的IPv4家乡地址(这个地址实际上是NAT-PT网关地址池里的一个地址)。The format of the data message sent by the communication node to the mobile node is the same as that before the mobile node moves, the source address is its own address, and the destination address is the IPv4 home address of the mobile node (this address is actually the NAT-PT gateway address pool an address in ).

上述数据报文会被路由到NAT-PT网关,NAT-PT网关截获该数据报文后,Mobile IP-ALG根据其目的地址(即IPv4格式的家乡地址)查找其绑定缓存,找到与之对应的IPv4转交地址。然后通过隧道把该数据报文发送到移动节点的IPv4转交地址。具体地,Mobile IP-ALG在原来的数据报文前面加上一个新的IP头,其源地址为NAT-PT网关的IPv4地址,目的地址为IPv4转交地址。The above data message will be routed to the NAT-PT gateway. After the NAT-PT gateway intercepts the data message, Mobile IP-ALG searches its binding cache according to its destination address (ie, the home address in IPv4 format), and finds the corresponding The IPv4 care-of address. Then send the data message to the IPv4 care-of address of the mobile node through the tunnel. Specifically, Mobile IP-ALG adds a new IP header in front of the original data message, its source address is the IPv4 address of the NAT-PT gateway, and its destination address is the IPv4 care-of address.

移动节点收到数据报文后,把外层的IP头去掉,就可以得到通信节点发给它的数据报文了。After the mobile node receives the data message, it removes the outer IP header to obtain the data message sent to it by the communication node.

(2)移动节点向通信节点发送数据报文(2) The mobile node sends a data message to the correspondent node

移动节点向通信节点发送的数据报文也是IPv4格式的,其源地址为IPv4格式的家乡地址,目的地址为通信节点的地址,也就是说该数据报文是直接从移动节点当前所在网络直接发送到通信节点的。The data message sent by the mobile node to the correspondent node is also in IPv4 format. The source address is the home address in IPv4 format, and the destination address is the address of the correspondent node. That is to say, the data message is sent directly from the network where the mobile node is currently located. to the communication node.

从上面的描述可以看出,带有DNS-ALG和Mobile IP-ALG的NAT-PT网关在整个注册、通信过程中都扮演着重要角色:首先是协助完成移动节点对家乡代理地址的DNS查询,然后是处理注册请求消息以及绑定确认消息,而注册完成后NAT-PT网关则充当类似于在MobileIPv4中的家乡代理的角色。通过充分利用现有的Mobile IPv4协议和Mobile IPv6协议以及在NAT-PT网关上设置DNS-ALG和Mobile IP-ALG,本发明不但实现了移动节点切换到异构网络后的通信,而且移动节点和通信节点通信的数据报文无需跨异构网络,大大提高了效率;此外,移动节点的移动对于通信节点来说是完全透明的:在整个通信过程中,通信节点实际上都是在往同一个地址(即移动节点的IPv4家乡地址)发送和接收数据报文。It can be seen from the above description that the NAT-PT gateway with DNS-ALG and Mobile IP-ALG plays an important role in the whole registration and communication process: firstly, it assists in completing the DNS query of the mobile node to the home agent address, Then it processes the registration request message and the binding confirmation message, and after the registration is completed, the NAT-PT gateway acts as a role similar to the home agent in MobileIPv4. By making full use of the existing Mobile IPv4 protocol and Mobile IPv6 protocol and setting DNS-ALG and Mobile IP-ALG on the NAT-PT gateway, the present invention not only realizes the communication after the mobile node is switched to a heterogeneous network, but also the mobile node and The data packets communicated by the communication nodes do not need to cross heterogeneous networks, which greatly improves the efficiency; in addition, the movement of the mobile node is completely transparent to the communication nodes: in the whole communication process, the communication nodes are actually going to the same address (that is, the IPv4 home address of the mobile node) to send and receive data packets.

附图说明 Description of drawings

图1为在异构网络之间进行DNS查询的基本原理示意图;FIG. 1 is a schematic diagram of the basic principle of DNS query between heterogeneous networks;

图2为Mobile IPv4技术的基本原理示意图;Figure 2 is a schematic diagram of the basic principle of the Mobile IPv4 technology;

图3为Mobile IPv6技术的基本原理示意图;Figure 3 is a schematic diagram of the basic principles of the Mobile IPv6 technology;

图4为Mobile IPv4(RFC3344)里的注册请求消息示意图;Fig. 4 is a schematic diagram of a registration request message in Mobile IPv4 (RFC3344);

图5为经过修改后的注册请求消息示意图;FIG. 5 is a schematic diagram of a modified registration request message;

图6为Mobile IPv4(RFC3344)里的注册应答消息示意图;Fig. 6 is a schematic diagram of a registration response message in Mobile IPv4 (RFC3344);

图7为经过修改后的注册应答消息示意图;FIG. 7 is a schematic diagram of a modified registration response message;

图8为本发明示意图。Fig. 8 is a schematic diagram of the present invention.

具体实施方式 Detailed ways

本发明提供了一种实现IPv4通信节点与跨异构网络的移动节点通信的方法,其基本思想是:在NAT-PT网关上设置Mobile IP-ALG和DNS-ALG,结合Mobile IPv4协议(RFC3344)和Mobile IPv6协议(RFC3775),针对上述第三种情况提出一种解决方案,从而使移动节点从IPv6网络切换到IPv4网络后能够顺利完成向家乡代理的注册并与通信节点维持原有的通信,并且移动节点的移动对于始终处于IPv4网络的通信节点来说是完全透明的。The present invention provides a kind of method that realizes IPv4 communication node and mobile node communication across heterogeneous network, its basic idea is: set Mobile IP-ALG and DNS-ALG on NAT-PT gateway, combine Mobile IPv4 agreement (RFC3344) and Mobile IPv6 protocol (RFC3775), propose a solution for the third situation above, so that the mobile node can successfully complete the registration with the home agent and maintain the original communication with the communication node after switching from the IPv6 network to the IPv4 network. And the movement of the mobile node is completely transparent to the communication node always in the IPv4 network.

下面给出本发明的一个实例,并结合图8详细说明本发明的具体实施方式。An example of the present invention is given below, and the specific implementation manner of the present invention will be described in detail with reference to FIG. 8 .

1、移动节点在从IPv6网络切换到IPv4网络前,已经建立了与处于IPv4网络的通信节点的通信。1. Before the mobile node switches from the IPv6 network to the IPv4 network, the communication with the communication node in the IPv4 network has been established.

当移动节点处于IPv6网络时,它与通信节点的通信是跨异构网络的,通信过程中不同版本和格式的数据报文通过NAT-PT网关来转换。移动节点在IPv6网络内从一个网络移动到另一个网络时,它会获得一个新的转交地址,然后移动节点会分别向其家乡代理和通信节点注册其新获得的转交地址。当移动节点向其家乡代理注册时,采用Mobile IPv6(RFC3775)里的方案;移动节点完成向家乡代理的注册后,便发起向通信节点注册的过程。出于安全性和可靠性方面的考虑,移动节点在正式向通信节点发送绑定更新消息之前,需要发起RRP(Return Routability Procedure)过程,如背景技术部分所述。无论是RRP过程还是随后向通信节点的绑定更新,通信节点的工作都由NAT-PT网关代理。When the mobile node is in the IPv6 network, its communication with the communication node is across the heterogeneous network, and the data packets of different versions and formats are converted through the NAT-PT gateway during the communication process. When a mobile node moves from one network to another in an IPv6 network, it will obtain a new care-of address, and then the mobile node will register its newly obtained care-of address with its home agent and correspondent node respectively. When the mobile node registers with its home agent, the scheme in Mobile IPv6 (RFC3775) is adopted; after the mobile node completes the registration with the home agent, it initiates the process of registering with the correspondent node. For security and reliability considerations, before the mobile node formally sends a binding update message to the correspondent node, it needs to initiate the RRP (Return Routability Procedure) process, as described in the background technology section. Whether it is the RRP process or the subsequent binding update to the correspondent node, the work of the correspondent node is proxied by the NAT-PT gateway.

注册完成后,移动节点与通信节点的通信过程是这样的:移动节点向通信节点发送数据报文时,其源地址为转交地址,目的地址为通信节点的IPv6地址(这个地址由通信节点的IPv4地址家乡一个96位的NAT-PT网关前缀构成),同时,在数据报文里插入一个目的选项扩展头(Destination Option extension header)用于携带移动节点的家乡地址,该数据报文到达NAT-PT网关时被NAT-PT网关截获并转换成IPv4格式的数据报文后发送给通信节点,转换后的数据报文的源地址为移动节点的IPv4家乡地址(实际上是NAT-PT网关地址池里的一个IPv4地址),目的地址为通信节点的IPv4地址。通信节点向移动节点发送数据报文时,源地址为通信节点的IPv4地址,目的地址为上述移动节点的IPv4家乡地址。该数据报文经过NAT-PT网关时,由NAT-PT网关转换成IPv6格式,转换后的数据报文的源地址为通信节点的IPv6地址,目的地址为IPv6转交地址,同时,在转换后的数据报文里插入一个称为第二类路由报头(Type 2 Routing Header)用于携带移动节点的IPv6家乡地址。After the registration is completed, the communication process between the mobile node and the correspondent node is as follows: when the mobile node sends a data message to the correspondent node, its source address is the care-of address, and the destination address is the IPv6 address of the correspondent node (this address is determined by the IPv4 address of the correspondent node). The home address is composed of a 96-bit NAT-PT gateway prefix), and at the same time, a destination option extension header (Destination Option extension header) is inserted in the data message to carry the home address of the mobile node, and the data message arrives at the NAT-PT When the gateway is intercepted by the NAT-PT gateway and converted into a data message in IPv4 format, it is sent to the communication node. The source address of the converted data message is the IPv4 home address of the mobile node (actually the address in the NAT-PT gateway address pool). An IPv4 address), the destination address is the IPv4 address of the communication node. When the communication node sends a data message to the mobile node, the source address is the IPv4 address of the communication node, and the destination address is the IPv4 home address of the mobile node. When the data message passes through the NAT-PT gateway, it is converted into IPv6 format by the NAT-PT gateway. The source address of the converted data message is the IPv6 address of the communication node, and the destination address is the IPv6 care-of address. At the same time, after the conversion A Type 2 Routing Header (Type 2 Routing Header) is inserted into the data message to carry the IPv6 home address of the mobile node.

2、移动节点获知自己已从IPv6网络切换到IPv4网络,并在IPv4网络获得一个新的转交地址。2. The mobile node learns that it has switched from the IPv6 network to the IPv4 network, and obtains a new care-of address in the IPv4 network.

IPv4网络中的移动代理会伪周期性地在所在网络发送代理广告消息以表明它们的存在。移动节点根据所收到的代理广告消息就可以判断自己是否已经从IPv6网络进入IPv4网络。移动节点也可以通过向移动代理发送代理请求消息请求移动代理向自己发送代理广告。Mobile agents in an IPv4 network will pseudo-periodically send agent advertisement messages in their network to indicate their existence. The mobile node can judge whether it has entered the IPv4 network from the IPv6 network according to the received agent advertisement message. The mobile node can also request the mobile agent to send an agent advertisement to itself by sending an agent request message to the mobile agent.

移动节点切换到IPv4网络后,获得一个新的转交地址,转交地址可以通过DHCP方式获取,也可以通过其他方式获取。After the mobile node switches to the IPv4 network, it obtains a new care-of address. The care-of address can be obtained through DHCP or other methods.

转交地址实际上反映额移动节点的位置信息。获得新的转交地址后,移动节点需要通过向家乡代理注册的方式把自己最新的位置信息告诉家乡代理。The care-of address actually reflects the location information of the mobile node. After obtaining the new care-of address, the mobile node needs to tell the home agent its latest location information by registering with the home agent.

3、移动节点通过家乡代理的域名查询到家乡代理的IPv4地址。3. The mobile node queries the IPv4 address of the home agent through the domain name of the home agent.

移动节点获得转交地址后要向家乡代理注册,而注册前移动节点必须知道家乡代理的IP地址才能发送注册消息。在本发明中,移动节点是通过DNS查询获得家乡代理的IP的地址的。After the mobile node obtains the care-of address, it needs to register with the home agent. Before the registration, the mobile node must know the IP address of the home agent to send a registration message. In the present invention, the mobile node obtains the IP address of the home agent through DNS query.

移动节点向IPv4网络里的DNS服务器发送DNS查询请求以查询家乡代理的IP地址,IPv4网络里的DNS服务器查找不到相关记录就会向IPv6网络里的DNS服务器查询。IPv6网络里的DNS服务器找到上述域名的相关记录,并返回一条应答消息,该应答消息包含与上述域名对应的IPv6格式的IP地址。上述应答消息经过带有DNS-ALG的NAT-PT网关时,NAT-PT网关会在地址池里取出一个IPv4地址以映射该IPv6地址,从而得到家乡代理的IPv6地址。经过修改后的应答消息返回给移动节点。移动节点收到上述应答消息,就知道家乡代理的IPv4地址了。The mobile node sends a DNS query request to the DNS server in the IPv4 network to query the IP address of the home agent. If the DNS server in the IPv4 network cannot find relevant records, it will query the DNS server in the IPv6 network. The DNS server in the IPv6 network finds the relevant record of the above domain name, and returns a response message, which contains the IP address in IPv6 format corresponding to the above domain name. When the above response message passes through the NAT-PT gateway with DNS-ALG, the NAT-PT gateway will take out an IPv4 address from the address pool to map the IPv6 address, thereby obtaining the IPv6 address of the home agent. The modified reply message is returned to the mobile node. After receiving the above-mentioned response message, the mobile node knows the IPv4 address of the home agent.

4、移动节点通过注册请求消息向其家乡代理注册新的转交地址。4. The mobile node registers a new care-of address with its home agent through a registration request message.

在RFC3344和RFC3775中,由移动节点向家乡代理注册其转交地址而发送的消息的有所不同:RFC3344描述的是IPv4网络的情况,里面采用的是注册请求消息(Registration RequestMessage);RFC3775描述的是IPv6网络的情况,里面采用的是绑定更新消息(Binding UpdateMessage)。In RFC3344 and RFC3775, the messages sent by the mobile node to register its care-of address with the home agent are different: RFC3344 describes the situation of an IPv4 network, which uses a registration request message (Registration RequestMessage); RFC3775 describes In the case of an IPv6 network, the Binding Update Message (Binding UpdateMessage) is used.

由于移动节点已经切换到IPv4网络,所以移动节点将向其家乡代理发送注册请求消息。在RFC3344中,注册请求消息的格式如图4所示,其源地址为转交地址,目的地址为家乡代理地址。在本发明中,由于家乡代理处于IPv6网络,所以家乡代理最终收到的注册请求消息里面的家乡地址以及转交地址都应该是IPv6格式的。NAT-PT网关可以把IPv4格式的转交地址转换成IPv6格式(在前面加上NAT-PT网关前缀),但是NAT-PT并不能用常规的方法获得移动节点的IPv6地址。因此,本发明对注册请求消息作了修改:把原来的家乡地址域置零,并在消息尾部的扩展部分附带移动节点IPv6格式的IP地址。修改后的注册请求消息如图5所示。Since the mobile node has switched to the IPv4 network, the mobile node will send a registration request message to its home agent. In RFC3344, the format of the registration request message is shown in Figure 4, the source address is the care-of address, and the destination address is the home agent address. In the present invention, since the home agent is in the IPv6 network, the home address and the care-of address in the registration request message finally received by the home agent should be in IPv6 format. The NAT-PT gateway can convert the care-of address in IPv4 format into IPv6 format (add the NAT-PT gateway prefix in front), but the NAT-PT cannot obtain the IPv6 address of the mobile node in a conventional way. Therefore, the present invention modifies the registration request message: the original home address field is set to zero, and the IP address of the mobile node in IPv6 format is attached to the extension part at the end of the message. The modified registration request message is shown in FIG. 5 .

注册请求消息采用UDP封装,目的端口为434,NAT-PT网关根据这个特征截获该注册请求消息,并把它送到Mobile IP-ALG上处理。在处理注册请求消息的时候,Mobile IP-ALG首先根据注册请求消息尾部的认证信息检查该消息的可靠性(根据RFC3344里的处理方法处理),如果认证通过,则Mobile IP-ALG会做下面两个工作:把注册请求消息转换成绑定更新消息,以及记录相关信息作为稍后截获由家乡代理发回的绑定确认消息的依据。下面说明其过程:The registration request message is encapsulated by UDP, and the destination port is 434. According to this feature, the NAT-PT gateway intercepts the registration request message and sends it to the Mobile IP-ALG for processing. When processing the registration request message, Mobile IP-ALG first checks the reliability of the message according to the authentication information at the end of the registration request message (according to the processing method in RFC3344), if the authentication is passed, then Mobile IP-ALG will do the following two The first job is to convert the registration request message into a binding update message, and record relevant information as the basis for later intercepting the binding confirmation message sent back by the home agent. The process is described below:

(1)Mobile IP-ALG根据其截获的注册请求消息所提供的信息按照RFC3775里的规则生成一个绑定更新消息,其中,移动节点的家乡地址(IPv6格式)是从注册请求消息里获取的,其他各个字段的意义与RFC3775里的规定一致。绑定更新消息的源地址由注册请求消息的源地址加上一个96位的NAT-PT网关前缀构成,它实际上就是要向家乡代理注册的转交地址;而绑定更新消息的目的地址则由Mobile IP-ALG根据注册请求消息的目的地址查询其映射关系获得的,它实际上是家乡代理的地址。(1) Mobile IP-ALG generates a binding update message according to the rules in RFC3775 according to the information provided by the registration request message intercepted by it, wherein the home address (IPv6 format) of the mobile node is obtained from the registration request message, The meanings of other fields are consistent with those specified in RFC3775. The source address of the binding update message is composed of the source address of the registration request message plus a 96-bit NAT-PT gateway prefix, which is actually the care-of address to be registered with the home agent; while the destination address of the binding update message is composed of The Mobile IP-ALG obtains it by querying its mapping relationship according to the destination address of the registration request message, which is actually the address of the home agent.

(2)Mobile IP-ALG除了要处理注册请求消息外,还要处理家乡代理稍后发回的绑定确认消息,因此Mobile IP-ALG需要某种机制截获绑定确认消息。本发明是这样处理的:在完成步骤(1)所述的处理后,Mobile IP-ALG记下绑定更新消息的源地址和目的地址,NAT-PT网关检查由IPv6网络发往IPv4网络的数据报文,查看它们的源地址和目的地址,就可以确定该数据报文是不是与刚才的绑定更新消息对应的绑定确认消息了。此外,截获绑定确认消息后,Mobile IP-ALG要把它转换成注册应答消息,而注册应答消息也是用UDP封装的,因此Mobile IP-ALG还要记住原来的注册请求消息的源端口。(2) In addition to processing the registration request message, the Mobile IP-ALG also needs to process the binding confirmation message sent back by the home agent later, so the Mobile IP-ALG needs some mechanism to intercept the binding confirmation message. The present invention handles like this: after finishing the described processing of step (1), Mobile IP-ALG writes down the source address and destination address of binding update message, and NAT-PT gateway checks the data sent to IPv4 network by IPv6 network By checking their source address and destination address, it can be determined whether the data packet is the binding confirmation message corresponding to the binding update message just now. In addition, after intercepting the binding confirmation message, Mobile IP-ALG needs to convert it into a registration response message, and the registration response message is also encapsulated with UDP, so Mobile IP-ALG also needs to remember the source port of the original registration request message.

5、家乡代理向移动节点发送绑定确认消息。5. The home agent sends a binding confirmation message to the mobile node.

家乡代理收到上述绑定更新消息后,首先根据该消息里的安全认证信息检查该消息的可靠性(根据RFC3775的方法进行处理),如果认证通过,则进一步处理绑定更新请求。如果家乡代理接受该绑定更新,则会创建或更新其绑定缓存,即把移动节点的家乡地址、转交地址的绑定关系以及绑定的有效时间记录下来,并向移动节点的转交地址发送绑定确认消息表示绑定更新成功;如果家乡代理拒绝该请求,则向移动节点的转交地址发送绑定确认消息表示绑定更新失败,并说明原因。绑定确认消息的源地址为家乡代理地址,目的地址为移动节点的转交地址。After the home agent receives the above-mentioned binding update message, it first checks the reliability of the message according to the security authentication information in the message (processed according to the method of RFC3775), and if the authentication passes, then further processes the binding update request. If the home agent accepts the binding update, it will create or update its binding cache, that is, record the binding relationship between the home address of the mobile node, the care-of address, and the valid time of the binding, and send it to the care-of address of the mobile node. The binding confirmation message indicates that the binding update is successful; if the home agent rejects the request, it sends a binding confirmation message to the care-of address of the mobile node, indicating that the binding update fails and explains why. The source address of the binding confirmation message is the home agent address, and the destination address is the care-of address of the mobile node.

由于上述绑定确认消息的目的地址实际上是IPv4格式的转交地址加上96位的NAT-PT网关前缀,因此该消息会经过NAT-PT网关。NAT-PT网关检查该消息的源地址和目的地址,如果它们与先前的记录相符(源地址、目的地址的位置互换),则把该消息送到上层的MobileIP-ALG作进一步处理。Mobile IP-ALG首先根据绑定确认消息的认证信息对该消息的可靠性进行验证,如果认证通过,则进一步做下面两件事情:把绑定确认消息转换成注册应答消息并发送给移动节点的转交地址,以及建立的绑定缓存。具体说明如下:Since the destination address of the above binding confirmation message is actually the care-of address in IPv4 format plus a 96-bit NAT-PT gateway prefix, the message will pass through the NAT-PT gateway. The NAT-PT gateway checks the source address and the destination address of the message, and if they match the previous records (the positions of the source address and the destination address are exchanged), the message is sent to the MobileIP-ALG on the upper layer for further processing. Mobile IP-ALG first verifies the reliability of the message according to the authentication information of the binding confirmation message. If the authentication is passed, the following two things are further done: convert the binding confirmation message into a registration response message and send it to the mobile node's The care-of address, and the established binding cache. The specific instructions are as follows:

(1)Mobile IP-ALG根据绑定确认消息提供的信息生成一个注册应答消息,并在该注册应答消息的扩展部分携带移动节点的IPv4格式的家乡地址(这个地址实际上是NAT-PT网关地址池里的一个地址,移动节点会在与通信节点通信时用到)。该消息是用UDP封装的,其源端口为434,目的端口为前面处理注册请求消息时记录的源端口。该消息的源地址为家乡代理的IPv4地址,这个地址可以从映射表中找到;目的地址为IPv4转交地址。(1) Mobile IP-ALG generates a registration response message according to the information provided by the binding confirmation message, and carries the home address of the mobile node in IPv4 format in the extension part of the registration response message (this address is actually the NAT-PT gateway address An address in the pool, which the mobile node will use when communicating with the correspondent node). The message is encapsulated with UDP, its source port is 434, and its destination port is the source port recorded when processing the registration request message. The source address of the message is the IPv4 address of the home agent, which can be found from the mapping table; the destination address is the IPv4 care-of address.

(2)Mobile IP-ALG还会记录移动节点IPv4家乡地址与IPv4转交地址的绑定关系,这种绑定关系将在随后的通信中用到,后面会具体说明。(2) Mobile IP-ALG will also record the binding relationship between the mobile node's IPv4 home address and the IPv4 care-of address. This binding relationship will be used in subsequent communications, which will be described in detail later.

移动节点收到上述注册应答消息,就可以知道注册是否已被家乡代理接受,而且还知道了自己的家乡地址的IPv4形式(即通信节点发送数据报文的目的地址)。如果注册被接受,那么移动节点就可以继续和通信节点进行通信了。After the mobile node receives the above registration response message, it can know whether the registration has been accepted by the home agent, and also know the IPv4 form of its home address (that is, the destination address of the data message sent by the communication node). If the registration is accepted, the mobile node can continue to communicate with the correspondent node.

6、通信节点向移动节点发送数据报文。6. The communication node sends the data message to the mobile node.

通信节点向移动节点发送数据报文时,数据报文经过NAT-PT网关后由NAT-PT网关通过隧道发送到移动节点的转交地址。When the communication node sends a data message to the mobile node, the data message passes through the NAT-PT gateway and is sent by the NAT-PT gateway to the care-of address of the mobile node through the tunnel.

通信节点实际上并不知道移动节点已经移动,它只是简单地向移动节点的IPv4家乡地址(实际是NAT-PT网关地址池里的地址)发送数据报文,也就是说,通信节点向移动节点发送的数据报文,源地址都是自己的IPv4地址,目的地址都是移动节点的IPv4家乡地址。The correspondent node does not actually know that the mobile node has moved, it simply sends a data message to the IPv4 home address of the mobile node (actually the address in the NAT-PT gateway address pool), that is, the correspondent node sends a message to the mobile node For the data message sent, the source address is its own IPv4 address, and the destination address is the IPv4 home address of the mobile node.

上述数据报文经过NAT-PT网关的时候,被NAT-PT网关截获。NAT-PT网关上的MobileIP-ALG通过隧道把该报文发送到移动节点的转交地址。具体地,Mobile IP-ALG在原来的数据报文前面加上一个新的IP头,新的IP头源地址为NAT-PT网关地址,目的地址为移动节点的转交地址。When the above data message passes through the NAT-PT gateway, it is intercepted by the NAT-PT gateway. The MobileIP-ALG on the NAT-PT gateway sends the message to the care-of address of the mobile node through the tunnel. Specifically, the Mobile IP-ALG adds a new IP header in front of the original data message, the source address of the new IP header is the NAT-PT gateway address, and the destination address is the care-of address of the mobile node.

在移动节点的转交地址处,移动节点对其收到的数据报文进行解封装,就可以得到里面的数据报文了。At the care-of address of the mobile node, the mobile node decapsulates the received data message to obtain the data message inside.

7、移动节点向通信节点发送数据报文。7. The mobile node sends the data message to the correspondent node.

移动节点向通信节点发送数据报文时,采用直接发送的方法。考虑到通信节点端的透明性问题(即移动节点的移动对通信节点应该保持透明),移动节点发送的数据报文的源地址为其IPv4家乡地址,目的地址为通信节点的地址。When the mobile node sends the data message to the correspondent node, it adopts the method of direct sending. Considering the transparency problem of the communication node side (that is, the movement of the mobile node should remain transparent to the communication node), the source address of the data message sent by the mobile node is its IPv4 home address, and the destination address is the address of the communication node.

从上述具体实施实例可以看出,本发明在现有Mobile IPv4技术(RFC3344)和Mobile IP6技术(RFC3775)的基础上,通过在异构网络之间设置带有DNS-ALG和Mobile IP-ALG的NAT-PT网关,并围绕Mobile IP-ALG对注册、通信过程进行设计,从而实现了移动节点从IPv6网络切换到IPv4网络后仍能保持与处于IPv4网络的通信节点的通信。此外,移动节点切换到IPv4网络后,它与通信节点相互发送的数据报文无需再经过IPv6网络,并且移动节点的移动对于通信节点来说是完全透明的。As can be seen from the above specific implementation examples, the present invention is based on the existing Mobile IPv4 technology (RFC3344) and Mobile IP6 technology (RFC3775), by setting the DNS-ALG and Mobile IP-ALG between heterogeneous networks The NAT-PT gateway, and design the registration and communication process around the Mobile IP-ALG, so that the mobile node can still maintain communication with the communication node in the IPv4 network after switching from the IPv6 network to the IPv4 network. In addition, after the mobile node switches to the IPv4 network, the data packets sent between it and the correspondent node do not need to pass through the IPv6 network, and the movement of the mobile node is completely transparent to the correspondent node.

Claims (3)

1, a kind of mobile node method for communicating that realizes IPv4 communication node and cross-heterogeneous-network is characterized in that:
A, between IPv4 network and IPv6 network, be provided with the NAT-PT gateway of DNS-ALG and Mobile IP-ALG;
B, mobile node are supported IPv4 agreement and IPv6 agreement simultaneously, and mobile node is before switching to the IPv4 network from the IPv6 network, have set up and the communicating by letter of the communication node that is in the IPv4 network;
C, be domain name of each home agent configuration, mobile node is remembered the domain name of home agent; Mobile node moves behind the IPv4 network from the IPv6 network, and mobile node knows that self switches to the IPv4 network from the IPv6 network, and obtains a new Care-of Address at the IPv4 network, obtains the address of home agent IPv4 form by the inquiry of the domain name mode;
D, mobile node to the new Care-of Address of its home agent registration, the home address territory zero setting in the login request message, and carry the IPv6 home address of mobile node by login request message at the expansion of login request message;
Mobile IP-ALG on E, the NAT-PT gateway makes version conversion to register requirement, response message, and the data message of by the tunnel communication node being issued mobile node after registration is finished is sent to the Care-of Address of mobile node, thereby realizes the high usage route of data message.
2, the mobile node method for communicating of realization IPv4 communication node according to claim 1 and cross-heterogeneous-network is characterized in that " obtaining the address of home agent IPv4 form by the inquiry of the domain name mode " among the described step C specifically comprises:
(1) dns server of mobile node in the IPv4 network sends the DNS query requests about home agent;
(2) dns server in the IPv4 network can not find relative recording, then this query requests is forwarded to dns server in the IPv6 network, will be in the way through having the NAT-PT gateway of DNS-ALG;
(3) dns server in the IPv6 network is successfully resolved the domain name of the home agent of this mobile node, and sends a response message, and the IPv6 address of home agent is contained in this response message the inside;
When (4) above-mentioned response message was through the above-mentioned NAT-PT gateway that has a DNS-ALG, the NAT-PT gateway was found out the IPv6 address that an IPv4 address is used to shine upon above-mentioned home agent in its address pool, and above-mentioned response message is made suitable modification;
(5) mobile node is received above-mentioned response message through revising, thereby obtains the IPv4 address of home agent.
3, the mobile node method for communicating of realization IPv4 communication node according to claim 1 and cross-heterogeneous-network is characterized in that " mobile node is registered new Care-of Address by login request message to its home agent " specifically comprises among the described step D:
(1) mobile node sends login request message to home agent, and the NAT-PT gateway is that 434 these features are intercepted and captured this login request message according to login request message with UDP encapsulation and destination interface, and gives Mobile IP-ALG it and handle;
(2) Mobile IP-ALG sends to home agent after login request message is converted to binding update messages again;
(3) home agent is handled above-mentioned binding update messages and is sent the binding response message to the IPv6 of mobile node Care-of Address, whether the NAT-PT gateway is corresponding with previous binding update messages to determine this binding response message with destination address by the source address of checking the binding response message, if then give Mobile IP-ALG it and handle;
(4) this binding response message is converted to the Care-of Address that sends to mobile node behind the registration reply message again by Mobile IP-ALG.
CNB2007100277457A 2007-04-28 2007-04-28 Method for realizing communication between IPv4 communication node and mobile node of crossing heterogeneous network Expired - Fee Related CN100512228C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007100277457A CN100512228C (en) 2007-04-28 2007-04-28 Method for realizing communication between IPv4 communication node and mobile node of crossing heterogeneous network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007100277457A CN100512228C (en) 2007-04-28 2007-04-28 Method for realizing communication between IPv4 communication node and mobile node of crossing heterogeneous network

Publications (2)

Publication Number Publication Date
CN101039266A CN101039266A (en) 2007-09-19
CN100512228C true CN100512228C (en) 2009-07-08

Family

ID=38889911

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007100277457A Expired - Fee Related CN100512228C (en) 2007-04-28 2007-04-28 Method for realizing communication between IPv4 communication node and mobile node of crossing heterogeneous network

Country Status (1)

Country Link
CN (1) CN100512228C (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101237410B (en) * 2008-03-04 2011-08-24 中山大学 A Communication Method for Realizing Mobile Nodes in IPv4/v6 Mixed Network
CN101572665B (en) * 2009-06-01 2011-04-20 杭州华三通信技术有限公司 IPv6 over IPv4 tunnel switching method and device
CN101702800B (en) * 2009-11-19 2012-08-22 中国科学院计算技术研究所 Agent mobile communication system and method
CN102158564B (en) * 2011-01-21 2013-06-12 中山大学 Optimized communication method of mobile node in proxy mobile IPv6 (Internet Protocol Version 6) domain and communication node in mobile IPv6 domain
TWI439088B (en) * 2011-06-01 2014-05-21 Accton Technology Corp Domain gateway control system and method thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
IPv6对域名系统的需求及其解决方法的研究. 张鸿,钱华林.微电子学与计算机,第1期. 2003 *
Mobile IP Application Level Gateway. Shiao-Li Tsao,Jen-Chi Liu,Wolfgang Boehm,1-7,IETF NGTRANS Working Group. 2000 *

Also Published As

Publication number Publication date
CN101039266A (en) 2007-09-19

Similar Documents

Publication Publication Date Title
AU2004244296B2 (en) Arrangement for traversing an IPv4 network by IPv6 mobile nodes
CN100518378C (en) A communication method for realizing mobile node handover from IPv6 network to IPv4 network
US7269173B2 (en) Roaming in a communications network
CN100534218C (en) A method for realizing communication between mobile IPv4 node and IPv6 communication node
US6862274B1 (en) Method and system capable of providing mobility support for IPv4/IPv6 inter-networking
JP5506934B2 (en) Network and backbone network and network components based on ID / locator separation architecture
EP2540064B1 (en) Enabling ipv6 mobility with nat64
Gladisch et al. Survey on mobility and multihoming in future internet
JP4769669B2 (en) Mobile communication system, home agent, mobile node and method compliant with mobile IP
US20040179508A1 (en) Arrangement for traversing an IPv4 network by IPv6 mobile nodes via a mobility anchor point
KR101124081B1 (en) Method for operating a moving network based on temporary name identifiers, and the moving network configuration
CN100518147C (en) A method for realizing mobile communication across heterogeneous networks based on bidirectional tunnel
US20060062248A1 (en) Providing connection between networks using different protocols
CN101160842A (en) Method for realizing communication between mobile IPv6 node and IPv4 communication partner
CN100512228C (en) Method for realizing communication between IPv4 communication node and mobile node of crossing heterogeneous network
Novaczki et al. Micromobility support in HIP: survey and extension of host identity protocol
CN101237410B (en) A Communication Method for Realizing Mobile Nodes in IPv4/v6 Mixed Network
CN101160927B (en) Method for communication between IPv6 communication partner and mobile IPv6 node and communication partner proxy gateway
CN100571214C (en) Dual-stack Support Extension Method of Hierarchical Mobile IPv6 Protocol
CN101902725B (en) Mobile communication system and mobility management method
CN1870633B (en) Method for supporting mobile IPv4 through dual-stack mobile IPv6 nodes
Bokor et al. A Complete HIP Based Framework for Secure Micromobility.
CN102647708A (en) A Distributed Mobile IPv6 Method Based on Network Mobility Management and Route Optimization
Wang et al. Mobility support in the internet using identifiers
Best et al. Enhanced mobility protocol for wireless networks

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
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090708

Termination date: 20100428