1.R6为ISP只能配置IP地址,R1-R5环回私有网段
2.R1/4/5为全连 的MGRE结构,R1/2/3为星形拓扑,R1为中心
3.所有私网网段可以互相通讯,基于OSPF完成
1.各个接口配置
2.所有路由器写缺省指向R6
[r1]ip route-static 0.0.0.0 0 11.0.0.2
[r1]ip route-static 0.0.0.0 0 12.0.0.2
[r3]ip route-static 0.0.0.0 0 13.0.0.2
[r3]ip route-static 0.0.0.0 0 14.0.0.2
[r4]ip route-static 0.0.0.0 0 15.0.0.2
[r5]ip route-static 0.0.0.0 0 16.0.0.2
3.创建MGRE隧道,但是要关闭接口,否则无法进行站点相互寻找
[r1-Tunnel0/0/1]shutdown
[r1-Tunnel0/0/1]ip address 192.168.6.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp
[r1-Tunnel0/0/1]source 11.0.0.1
[r1-Tunnel0/0/1]nhrp network-id 100
[r1-Tunnel0/0/1]nhrp entry 192.168.6.2 15.0.0.1 register
[r1-Tunnel0/0/1]nhrp entry 192.168.6.3 16.0.0.1 register
[r4-Tunnel0/0/1]shutdown
[r4-Tunnel0/0/1]ip address 192.168.6.2 24
[r4-Tunnel0/0/1]tunnel-protocol gre p2mp
[r4-Tunnel0/0/1]source 15.0.0.1
[r4-Tunnel0/0/1]nhrp network-id 100
[r4-Tunnel0/0/1]nhrp entry 192.168.6.1 11.0.0.1 register
[r4-Tunnel0/0/1]nhrp entry 192.168.6.3 16.0.0.1 register
[r5-Tunnel0/0/1]shutdown
[r5-Tunnel0/0/1]ip address 192.168.6.3 24
[r5-Tunnel0/0/1]tunnel-protocol gre p2mp
[r5-Tunnel0/0/1]shutdown
[r5-Tunnel0/0/1]source 16.0.0.1
[r5-Tunnel0/0/1]nhrp entry 192.168.6.1 11.0.0.1 register
[r5-Tunnel0/0/1]nhrp entry 192.168.6.2 15.0.0.1 register
打开T接口
[r1]display nhrp peer interface tunnel 0/0/1
[r4]display nhrp peer interface tunnel 0/0/1
[r5]display nhrp peer interface tunnel 0/0/1
4.R1为中心,R2/R3作支点
[r1-Tunnel0/0/0]ip address 192.168.7.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]nhrp network-id 101
[r1-Tunnel0/0/0]nhrp entry multicast dynamic
[r1-Tunnel0/0/0]source 12.0.0.1
[r3-Tunnel0/0/0]ip address 192.168.7.2 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]nhr
[r3-Tunnel0/0/0]nhrp nr
[r3-Tunnel0/0/0]nhrp ne
[r3-Tunnel0/0/0]nhrp network-id 101
[r3-Tunnel0/0/0]nhrp entry 192.168.7.1 12.0.0.1 register
[r3-Tunnel0/0/0]ospf dr-priority 0
[r3-Tunnel0/0/0]source g0/0/0
[r3-Tunnel0/0/0]ip address 192.168.7.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source g0/0/0
[r3-Tunnel0/0/0]nhrp network-id 101
[r3-Tunnel0/0/0]nhrp entry 192.168.7.1 12.0.0.1 register
[r3-Tunnel0/0/0]ospf dr-priority 0
各个路由器使用OSPF进行宣告
[r1-ospf-1-area-0.0.0.0]network 11.0.0.1 0.0.0.255
[r1-ospf-1-area-0.0.0.0]network 12.0.0.1 0.0.0.255
[r1-ospf-1-area-0.0.0.0]network 192.168.1.1 0.0.0.255
[r1-ospf-1-area-0.0.0.0]network 192.168.6.1 0.0.0.255
[r1-ospf-1-area-0.0.0.0]network 192.168.7.1 0.0.0.255