LAM的实现主要是利用了主机路由(host routes)与ARP技术,如图1中所示。This obviously is a technique that doesn't scale well (add an "E" and it becomes LAME?). Contrary to the rumor I'm starting right now, it was not invented by Cabletron. However, from what I've heard, SecureFast "Routing" is based on a somewhat similar idea: tracking IP hosts and doing PRoxy ARP.
interface ethernet0 ip address 192.16.100.1 255.255.255.0 ! router eigrp 100 network 192.16.100.0 redistribute mobile ! ! 注释 启动移动IP 支持 router mobile ! ! 定义一个虚拟网络10.0.0.0 ip mobile network 10.0.0.0 255.0.0.0 ! ! 定义虚拟网络上的主机及转发地址访问控制列表 ip mobile host 10.0.0.1 10.0.0.5 virtual-network 10.0.0.0 255.0.0.0 care-of-access 2 ! ip mobile host 192.16.100.51 192.16.100.55 interface Ethernet0 lifetime 3600 ! ! 虚拟网络10.0.0.0上的安全性设置 ip mobile secure host 10.0.0.1 spi 100 key secret1 ... ip mobile secure host 10.0.0.5 spi 200 key secret5 ! ! Ethernet0 接口上的安全性设置 ip mobile secure host 192.16.100.51 spi a1 key sanfran1 ... ip mobile secure host 192.16.100.55 spi a1 key sanfran5 ! ! 定义访问控制列表 access-list 2 deny 13.0.0.0 access-list 2 permit any router mobile命令用于启动移动IP支持,ip mobile network 定义了一个虚拟网络,而redistribute mobile命令则定义了虚拟网络的重分布。虚拟网络可以允许本地路由器支持一个总是处于外地子网的移动终端。路由重发布将使得通讯主机首先将目的为移动终端的数据包发往本地代理。
接下来,ip mobile host ... virtual network 命令指明了虚拟网络上所包含的移动终端地址。在这里,我们利用care-of-access选项来通过访问控制列表定义移动终端可以利用哪些地址。
外地代理配置
interface Ethernet0 ip address 192.16.150.17 255.255.255.252 ! interface Ethernet1 ip address 192.16.200.1 255.255.255.0 ip irdp ip irdp maxadvertinterval 10 ip irdp minadvertinterval 7 ip mobile foreign-service ip mobile registration-lifetime 3600 ! router mobile ! ip mobile foreign-agent care-of Ethernet0 同样,router mobile 命令用于启动移动IP支持,ip mobile foreign-agent care-of command 指定从哪个接口得到转发地址,ip mobile foreign-service接口命令使得路由器对外宣布自己将作为一个外地代理工作,这是通过CISCO的IRDP (ICMP Router Discovery Protocol)协议完成的。
show ip mobile globals show ip mobile host [addr | interface int | network addr | group] show ip mobile interface [interface] show ip mobile secure {host | visitor | foreign-agent | home-agent} address show ip mobile binding show ip mobile traffic show ip mobile tunnel [interface] show ip mobile violation [address] show ip mobile visitor [pending] [address] show ip route mobile clear ip mobile traffic clear ip mobile binding ! (CAUTION: can break sessions) clear ip mobile secure ! (CAUTION: can break sessions) clear ip mobile visitor ! (CAUTION: can break sessions) debug ip mobile advertise debug ip mobile host 至此,我们介绍了移动IP的基本概念以及两种实现手段。