IP配置
R1
R2
R3
R4
R5
MGRE配置
中心:
1,创建隧道接口
[R1]interface Tunnel 0/0/?
<0-511> Tunnel interface interface number
[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]
2,隧道接口配置IP地址
[R1-Tunnel0/0/0]ip address 192.168.3.1 24
3,定义封装方式
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
4,定义封装的源IP
[r1-Tunnel0/0/0]source 15.0.0.1
5,创建NHRP域
[r1-Tunnel0/0/0]nhrp network-id 100
分支
1,创建隧道接口
[R1]interface Tunnel 0/0/?
<0-511> Tunnel interface interface number
[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]
2,隧道接口配置IP地址
[R1-Tunnel0/0/0]ip address 192.168.3.1 24
3,定义封装方式
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
4,定义封装源IP
[r2-Tunnel0/0/0]source GigabitEthernet 0/0/1 --- 通过出接口来定义
5,加入中心创建的NHRP域
[r2-Tunnel0/0/0]nhrp network-id 100
6,找中心上报映射信息
[r2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
中心隧道接口IP地址 中心物理接口的IP地址
[r1]display nhrp peer all --- 可以查看隧道接口和物理接口映射关系表
在MGRE环境下使用RIP获取未知网段的路由信息:
1,只有中心获取分支的路由,但是,分支获取不到路由信息
原因 --- MGRE环境是一种类似于NBMA的环境,不支持组播
解决方案 --- 在中心上开启伪广播。
[r1-Tunnel0/0/0]nhrp entry multicast dynamic
2,分支在中心开启伪广播后,只能学习到中心的网段信息,不能学习到其他分支的路
由信息。
原因 --- RIP的水平分割
解决方案 --- [r1-Tunnel0/0/0]undo rip split-horizon
结果