DMVPN
DMVPN
u 实验拓扑:
u 拓扑说明:
外网接口都为f0/0,中间路由器模拟Internet 。 |
u 实验配置:注意顺序和粗体字
HUB配置:①②③ crypto isakmp policy 10 authentication pre-share crypto isakmp key 6 cisco address 0.0.0.0 0.0.0.0 //此处对端peer为缺省地址 ! crypto ipsec transform-set VPNSET esp-des esp-md5-hmac mode transport //transport模式可以节省24个字节 ! crypto ipsec profile cisco //MGRE用profile配置 set transform-set VPNSET ! interface Loopback0 ip address 192.168.3.1 255.255.255.0 ! interface Tunnel0 ip address 172.16.1.3 255.255.255.0 //①配置tunnel的地址 no ip redirects no ip next-hop-self eigrp 100 //为解决spoke可以更近的到达对端,而不是指向自己 ip nhrp map multicast dynamic //HUB 端做nhrp动态映射,spoke都做好后 ip nhrp network-id 100 //⑤需要相同的网络ID 先关闭所有tunnel口,由HUB先开启 ip nhrp cache non-authoritative no ip split-horizon eigrp 100 //不要在eigrp100水平分割为解决spoke不能相互学习路由 tunnel source FastEthernet0/0 //②配置tunnel源 tunnel mode gre multipoint //③不需要配置tunnel目的,修改tunnel模式为gre Multi tunnel key 12345 //④MGRE必须要tunnel key tunnel protection ipsec profile cisco //引用profile cisco保护接口 ! router eigrp 100 //①配置eigrp路由协议,但是由于是NBMA网络,没能建邻居 network 172.16.1.0 0.0.0.255 network 192.168.3.0 no auto-summary ! ip route 0.0.0.0 0.0.0.0 30.1.1.2 |
R1和R2配置: crypto isakmp policy 10 authentication pre-share crypto isakmp key 6 cisco address 0.0.0.0 0.0.0.0 ! crypto ipsec transform-set VPNSET esp-des esp-md5-hmac mode transport ! crypto ipsec profile cisco set transform-set VPNSET ! interface Loopback0 ip address 192.168.1.1 255.255.255.0 ! interface Tunnel0 ip address 172.16.1.1 255.255.255.0 //①配置tunnel地址 no ip redirects ip mtu 1436 ip nhrp map 172.16.1.3 30.1.1.1 //⑥spoke端需要tunnel与物理口映射 ip nhrp map multicast 30.1.1.1 //spoke 端做nhrp静态映射,可以向定点发送eigrp信息 ip nhrp network-id 100 //⑤配置相同的网络ID ip nhrp nhs 172.16.1.3 //⑦指定下一跳nhs spoke都做好后先关闭所有tunnel口,由HUB先//开启 ip nhrp cache non-authoritative tunnel source FastEthernet0/0 //②配置tunnel源 tunnel mode gre multipoint //③不需要配置tunnel目的,修改tunnel模式为gre Multi tunnel key 12345 //④MGRE必须要tunnel key tunnel protection ipsec profile cisco ! router eigrp 100 //①配置eigrp路由协议,但是由于是NBMA网络 network 172.16.1.0 0.0.0.255 network 192.168.1.0 no auto-summary ! ip route 0.0.0.0 0.0.0.0 10.1.1.2 |
u 实验说明:
在配置eigrp后,不能建立邻居,因为eigrp不能再NBMA网络中传播,所以需要配置后面黄色字体,之后HUB能学学习两个路由,但是SPOKE只能学习到HUB路由,所以需要之后的HUB不要水平分割和不要下一跳指向自己 没有配置eigrp路由前的配置 |
|
HUB |
spoke端配置 |
interface Tunnel0 ip address 172.16.1.2 255.255.255.0 ip nhrp map 172.16.1.3 30.1.1.1 ip nhrp network-id 100 ip nhrp nhs 172.16.1.3 tunnel source FastEthernet0/0 tunnel mode gre multipoint tunnel key 1234
|
interface Tunnel0 ip address 172.16.1.3 255.255.255.0 no ip redirects ip nhrp network-id 100 ip nhrp cache non-authoritative tunnel source FastEthernet0/0 tunnel mode gre multipoint tunnel key 1234 |
当配置eigrp路由协议后,不能学习到路由只能有邻居,spoke所以要指定多播 |
|
ip nhrp map multicast 30.1.1.1
|
ip nhrp map multicast dynamic
|
但是spoke只能学习到一条路由信息,路由器不会把一个接口上学到的路由重新发布出去,所以需要在hub上面关闭水平分割 |
|
hub(config-if)#no ip split-horizon eigrp 100 |
|
u 显示信息: