r1
r2
r3
r4
[R4]interface GigabitEthernet0/0/0
[R4]ip address 34.0.0.2 255.255.255.252
[R4]interface GigabitEthernet0/0/1
[R4]ip address 54.0.0.2 255.255.255.252
[R4]interface GigabitEthernet0/0/2
[R4]ip address 64.0.0.2 255.255.255.252
r5
r6
启用MGRE
配置缺省
[R3]ip route-static 0.0.0.0 0.0.0.0 34.0.0.2
[R5]ip route-static 0.0.0.0 0.0.0.0 54.0.0.2
[R6]ip route-static 0.0.0.0 0.0.0.0 64.0.0.2
R3
[R3]interface Tunnel0/0/0
[R3-Tunnel0/0/0]ip address 172.16.5.1 255.255.255.248
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source 34.0.0.1
[R3-Tunnel0/0/0]ospf network-type broadcast
[R3-Tunnel0/0/0]nhrp entry multicast dynamic
[R3-Tunnel0/0/0]nhrp network-id 100
R5
[R5]interface Tunnel0/0/0
[R5-Tunnel0/0/0]ip address 172.16.5.2 255.255.255.248
[R5-Tunnel0/0/0]tunnel-protocol gre p2mp
[R5-Tunnel0/0/0]source GigabitEthernet0/0/0
[R5-Tunnel0/0/0]ospf network-type broadcast
[R5-Tunnel0/0/0]ospf dr-priority 0
[R5-Tunnel0/0/0]nhrp network-id 100
[R5-Tunnel0/0/0]nhrp entry 172.16.5.1 34.0.0.1 register
R6
[R6]interface Tunnel0/0/0
[R6-Tunnel0/0/0]ip address 172.16.5.3 255.255.255.248
[R6-Tunnel0/0/0]tunnel-protocol gre p2mp
[R6-Tunnel0/0/0]source GigabitEthernet0/0/0
[R6-Tunnel0/0/0]ospf network-type broadcast
[R6-Tunnel0/0/0]ospf dr-priority 0
[R6-Tunnel0/0/0]nhrp network-id 100
[R6-Tunnel0/0/0]nhrp entry 172.16.5.1 34.0.0.1 register
启用OSPF单区域
R1
[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.7.255
R2
[R2]ospf