1,R6为IsP只能配置Ip地址,R1-R5的环回为私有网段
[r1-GigabitEthernet0/0/0]ip address 16.0.0.1 24
[r1-GigabitEthernet0/0/1]ip address 61.0.0.1 24
[r1-LoopBack0]ip address 192.168.1.1 24(其它路由器同理)
[r1]ip route-static 0.0.0.0 0 16.0.0.2
2,R1/4/5为全连的MGRE结构:
[r1-Tunnel0/0/1]ip address 192.168.7.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp
[r1-Tunnel0/0/1]source 16.0.0.1
[r1-Tunnel0/0/1]nhrp network-id 100
[r1-Tunnel0/0/1]nhrp entry multicast dynamic
[r1-Tunnel0/0/1]nhrp entry 192.168.7.2 46.0.0.1 register
[r1-Tunnel0/0/1]nhrp entry 192.168.7.3 56.0.0.1 register (r4,r5同理)
R1/2/3为星型的拓扑结构,R1为中心站点
[r1-Tunnel0/0/0]ip address 192.168.6.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]source 61.0.0.1
[r1-Tunnel0/0/0]nhrp network-id 100
[r2-Tunnel0/0/0]ip address 192.168.6.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]source GigabitEthernet 0/0/0
[r2-Tunnel0/0/0]nhrp network-id 100
[r2-Tunnel0/0/0]nhrp entry 192.168.6.1 61.0.0.1 register
[r3-Tunnel0/0/0]ip address 192.168.6.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 100
[r3-Tunnel0/0/0]nhrp entry 192.168.6.1 61.0.0.1 register
3,所有私有网段可以互相通讯,私有网段使用osPF完成。
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]net 192.168.1.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]net 192.168.6.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]network 192.168.7.0 0.0.0.255(r2-r5同理)
[r1-Tunnel0/0/0]ospf network-type p2mp(r2,r3同理)
[r1-Tunnel0/0/1]ospf network-type broadcast(r4,r5同理)