Mobile IPv6 简介

《前言》 应用层以及TCPTransmission Control Protocol)在建立联机后,必须始终使用原有的IP来源地址才可以保持既有的联机。只要nodeIP地址发生变更,则必须重新建立联机。由于行动装置具有自由移动的特性,导致其IP地址在移动中可能跟着发生变化。为了让移动装置即使其IP发生变化,也能够保持既有的联机,RFC 6275Mobility Support in IPv6”定义新的通信协议以及一些新的options来达到此目标。凡支援Mobile IPv6node称为Mobile Node

Mobile IPv6 protocol允许Mobile Node(简称MN)在internet上移动时仍保持既有的通信联机以及MN的可达性(MN可随时与其它node建立新联机,反之亦然。)。 不论MN因移动而切换连接到其它任何link MN总是以它的home address为识别的unicast地址。当MN远离home link时,新连接的link所配置到的IPv6地址称为care-of address(转交地址)。藉由care-of address来转交封包,MN能始终以home address的身份维持通信。当MNhome link切换到别的link或从别的link切换到另一个link时, 就会将目前连接的link所配置到的care-of address以及其home addresshome agent登记,此登记动作称为home registration。此时,Home agent将代理MNhome address角色,同时与MN登记的care-of address互相建立tunnel。此后,任何目的地址为MNhome address的封包将被home agent拦截,且透过tunneling机制转送到MNcare-of address。同样地,透过tunneling机制,MN发送的封包皆藉由home agent来转送。当MN从别的link切换到home link时,也会向home agent注销登记,此后回归一般IPv6 node的封包传送方式。











相关的专有术语

在介绍Mobile IPv6通信协议前,让我们先了解一些基本的专有术语如下:
mobile node  简称MN 。凡支援实现Mobile IPv6node皆称为mobile node
correspondent node  简称CN。正与mobile node通信的node称为CN。可为一般IPv6 node或支持mobile IPv6 node
home link  每个MN皆指定一个永久性的link称为home link。当MN目前连接到home link时,称为“is on home”或“在home link”。 否则称为“is away from home”或“不在home link”。
home agent  简称HA。在home link上支持Mobile IPv6routerMN会指定其中一个为自己的home agent
home address  每个MN在自己的home link上皆配置一个永久性的unicast address称为home address,且MN始终以home address与其它nodes通信。MNhome link可自动配置1到多个home addresses
foreign link  不是home link的其它link皆称为foreign link
home subnet prefix  home addressprefix
foreign subnet prefix  home subnet prefix者皆称为foreign subnet prefix
care-of address(转交地址)  foreign link配置到的IPv6 address称为care-of address。可配置1到多个,其中1个用来跟home agent登记的称为“primary care-of address”。 本章节将把primary care-of address简称为care-of address
binding  MNhome address以及目前配置到的care-of address,两者的结合称为binding
registration  MN发送Binding Update messagehome agentCN的动作,称为bindingregistration 其程序为: MN发送Binding Updatehome agentCN,接收方则回应Binding Acknowledgement
correspondent registration  MNCN发送Binding Update的登记程序,称为correspondent registration。同时CN会添加一笔MNbindingBinding Cache列表中,MN则添加一笔bindingBinding Update List
home registration  MNhome agent发送Binding Update的登记程序,称为home registration 同时home agent会添加一笔MNbindingBinding Cache列表中,MN则添加一笔bindingBinding Update List
mobility message  凡包含Mobility扩充表头的IPv6封包,称为mobility message
binding authorization  MN申请Corespondent Registration前需要经过授权,以允许接收方相信发件者有权限登记一个新的binding。此授权是透过return routability procedure来完成。

return routability procedure  一组信息交换并且使用密码标志来授权correspondent registration程序。

Mobile IPv6概述

n   无论MN目前连接在home link或连接在foreign link 始终以home address为通信联机的IPv6地址。请注意,当MN is at home,使用IPv6传统的封包传送机制即可维持通信,不需要用到与mobile IPv6 protocol相关的机制。
n   MN切换到foreign link时,将透过传统IPv6autoconfiguration机制自动配置1到多个Global IPv6地址,此地址称为care-of addressMN切换link时,如果尚未脱离先前link的有效连接范围,可能会同时接收目的地址为先前link所配置到的care-of address的封包,如此可降低封包的流失。
n   MNhome addresscare-of address的结合称为binding。当MN连接到foreign link时, 首先透过发送Binding Update message将目前的binding向它的home agent登记,然后home agent响应Binding Acknowledgement message 此讯息交换称为home registration。紧接着再尝试Correspondent Registation
n   CN可为传统的IPv6 node或者是mobile node。透过执行所谓的return routability test可检测CN是否为mobile node 如果CNmobile node,收到MN发送的Binding Update message后,CN将响应Binding Acknowledgement message,此讯息交换称为correspondent registration 如果CN不是mobile node 将不认得return routability test相关的mobility messages,并且发送ICMPv6 Bad Parameter-Unrecognized Next Header Type Encountered (ICMPv6 Type 4, Code 1) message MN在执行return routability test时,藉由接收到ICMPv6 Bad Parameter message而得知CM不支持Mobile IPv6,将停止return routability test,并且不执行Correspondent Registration
n   MN不在home link时,有2种模式可保持MNCN之间的通信联机:

(1) Bidirectional tunneling(双向隧道)  当完成home registration程序后, 即形成bidirectional tunneling模式。在此模式下,MNhome agent之间互相建立tunnel,同时home agent代理MNhome address地址身份。CN送往MN home address的封包将被home agent拦截(由于home agent已经代理MNhome address身份, 所以封包将被传送到home agent。有关于代理的细节,稍后会介绍。),然后透过tunnel将封包转送到MN MN送往CM的封包将先透过tunnel传送到home agent,再由home agent转送到CN















不论CN是否为mobile node,当MN不在home link时,必须立即尝试完成home registration,以确保在切换link时能保持与CN的既有联机。然而,在bidirectional tunneling模式下,封包的传送路径必须经过home agent转送,缺乏效率。不过,此模式是必要不可或缺的。
(2) Route Optimization  当完成correspondent registration程序,即形成route optimization模式 ,且与bidirectional tunneling并存。一旦形成route optimization模式,不用透过home agentMNCN之间可直接发送数据封包到对方,此模式下传送封包的路径达到优化,故称为route optimization模式。如果在某些情况下,造成route optimization模式不复存在,则MNCN之间的数据封包仍可透过bidirectional tunneling模式传送。

MN欲发送数据封包到CN时,会检查Binding Update List是否有符合封包的IPv6表头目的地址的数据。如果有符合的项目,则将care-of address填进IPv6 header的来源地址栏 ,同时加入Destination Options扩展表头,并将Destination Options扩展表头的Home Address option设为MNhome address。当CN接收到封包时,如果检查到有Destination Options扩展表头且包含Home Address option,则先将Home Address option值替换掉IP headersource address域值,然后再做进一步的处理。
同样地,当CN欲发送封包到MN时,会检查Binding Cache是否有符合封包目的地址的数据。如果有符合的项目,则将cached binding中对应的care-of address填进IPv6 headerdestination address字段,同时加入Type2 Routing扩展表头,并设定Type2 Routing扩展表头的Home Address 字段为MN home address。当MN接收到封包时,如果检查到有Type2 Routing扩展表头,则先将Type2 Routing扩展表头的Home Address值替换掉IP表头的destination address域值,然后再做进一步的处理。








如果CN也是mobile node且不在它的home link,并且已经对MN完成correspondent registrationCNMN之间发送的封包将如下:
n   Mobile IPv6还支持多个home agents,并且在某些限制条件下支持重新配置home network。在一些情况下,MN可能还不知道home agentIPv6地址,甚至home subnet prefix也可能已经改变。有个机制称为“dynamic home agent address discovery”允许MN即使在 foreign link也能从它的home link动态寻找home agentIPv6地址。透过 mobile prefix discovery”机制,MN也能学习到新的home subnet prefix讯息。
请注意,RFC 6275 Mobility Support in IPv6 乃基于假设已经配置到home prefix的前提下,才能寻找home agentIPv6地址。这可能限制了MN动态获得home agent IPv6地址、home addresshome prefix的需求。这些自动配置home prefix的相关机制,不在本书的讨论范围内,请参考“Mobile IPv6 Bootstrapping in Split Scenario”及“MIP6-bootstrapping for the Integrated Scenario”。


概念性数据结构

n  Binding Cache  Home agentsCM各自维护Binding Cache MNBinding Update message时,接收端会记录每个MNBinding相关讯息。当binding的有效寿命到期时,就从Binding Cache中删除。
n  Binding Update List  MN发送 Binding Update message,就会维护Binding Update List,包括home registrationcorrespondent registration。当binding的有效寿命到期时,就从列表中删除。

n  Home Agent List  每个home agent需要知道link上其它home agents的相关讯息,并存放在Home Agent List中。当default home agent不可达时,MN可以从Home Agent List中寻找下一个可用的home agent


评论

此博客中的热门博文

IPv6 簡介以及地址介紹

DHCPv6 简介

Neighbor Discovery 简介

Multicast Listener Discovery (MLD) 简介

MLDv2 简介

ICMPv6

IP Security 簡介