第一步:配IP
[R1-GigabitEthernet0/0/0]ip address 12.0.0.1 24
[R1-GigabitEthernet0/0/1]ip address 21.0.0.1 24
[R1-LoopBack0]ip address 192.168.1.1 24
[ISP-GigabitEthernet0/0/0]ip address 12.0.0.2 24
[ISP-GigabitEthernet0/0/1]ip address 21.0.0.2 24
[ISP-GigabitEthernet0/0/2]ip address 23.0.0.2 24
[ISP-GigabitEthernet4/0/0]ip address 24.0.0.2 24
[ISP-GigabitEthernet3/0/0]ip address 25.0.0.2 24
[ISP-GigabitEthernet2/0/0]ip address 26.0.0.2 24
[R3-GigabitEthernet0/0/0]ip address 23.0.0.1 24
[R3-LoopBack0]ip address 192.168.3.1 24
[R4-GigabitEthernet0/0/0]ip address 24.0.0.1 24
[R4-LoopBack0]ip address 192.168.4.1 24
[R5-GigabitEthernet0/0/0]ip address 25.0.0.1 24
[R5-LoopBack0]ip address 192.168.5.1 24
[R6-GigabitEthernet0/0/0]ip address 26.0.0.1 24
[R6-LoopBack0]ip address 192.168.6.1 24
第二步:配置缺省实现全网通
[R1]ip route-static 0.0.0.0 0 12.0.0.2
[R1]ip route-static 0.0.0.0 0 21.0.0.2
[R3]ip route-static 0.0.0.0 0 23.0.0.2
[R4]ip route-static 0.0.0.0 0 24.0.0.2
[R5]ip route-static 0.0.0.0 0 25.0.0.2
[R6]ip route-static 0.0.0.0 0 26.0.0.2
第三步:建立隧道
[R1]int t0/0/0
[R1-Tunnel0/0/0]ip address 192.168.10.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp[R1-Tunnel0/0/0]shutdown
[R1-Tunnel0/0/0]source 21.0.0.1
[R1-Tunnel0/0/0]nhrp network-id 100[R1-Tunnel0/0/0]nhrp entry 192.168.10.3 23.0.0.1 register
[R1-Tunnel0/0/0]nhrp entry 192.168.10.4 24.0.0.1 register
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
[R1-Tunnel0/0/0]ospf network-type broadcast
[R3]int t0/0/0
[R3-Tunnel0/0/0]ip address 192.168.10.3 24
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]shutdown
[R3-Tunnel0/0/0]source 23.0.0.1
[R3-Tunnel0/0/0]nhrp network-id 100[R3-Tunnel0/0/0]nhrp entry 192.168.10.4 24.0.0.1 register
[R3-Tunnel0/0/0]nhrp entry multicast dynamic
[R3-Tunnel0/0/0]ospf network-type broadcast
[R4]int t0/0/0
[R4-Tunnel0/0/0]ip address 192.168.10.4 24
[R4-Tunnel0/0/0]tunnel-protocol gre p2mp
[R4-Tunnel0/0/0]shutdown
[R4-Tunnel0/0/0]source 24.0.0.1
[R4-Tunnel0/0/0]nhrp network-id 100[R4-Tunnel0/0/0]nhrp entry multicast dynamic
[R4-Tunnel0/0/0]ospf network-type broadcast
[R4- Tunnel0/0/0]nhrp entry 192.168.10.1 21.0.0.1 register
[R1]int t0/0/1
[R1-Tunnel0/0/1]ip address 192.168.100.1 24
[R1-Tunnel0/0/1]tunnel-protocol gre p2mp
[R1-Tunnel0/0/1]shutdown
[R1-Tunnel0/0/1]source 12.0.0.1
[R1-Tunnel0/0/1]nhrp network-id 200[R1-Tunnel0/0/1]nhrp entry multicast dynamic
[R1-Tunnel0/0/1]ospf network-type p2mp
[R5]int t0/0/0
[R5-Tunnel0/0/0]ip address 192.168.100.5 24
[R5-Tunnel0/0/0]tunnel-protocol gre p2mp
[R5-Tunnel0/0/0]shutdown
[R5-Tunnel0/0/0]source 25.0.0.1
[R5-Tunnel0/0/0]nhrp network-id 200[R5- Tunnel0/0/0]nhrp entry 192.168.100.1 12.0.0.1 register
[R5-Tunnel0/0/0]ospf network-type p2mp
[R6]int t0/0/0
[R6-Tunnel0/0/0]ip address 192.168.100.6 24
[R6-Tunnel0/0/0]tunnel-protocol gre p2mp
[R6-Tunnel0/0/0]shutdown
[R6-Tunnel0/0/0]source g0/0/0
[R6-Tunnel0/0/0]nhrp network-id 200[R6- Tunnel0/0/0]nhrp entry 192.168.100.1 12.0.0.1 register
[R6-Tunnel0/0/0]ospf network-type p2mp
第四步:启用ospf
[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 192.168.10.0 0.0.0.255
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 192.168.3.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network 192.168.10.0 0.0.0.255
[R4]ospf 1 router-id 4.4.4.4
[R4-ospf-1]area 0
[R4-ospf-1-area-0.0.0.0]network 192.168.4.0 0.0.0.255
[R4-ospf-1-area-0.0.0.0]network 192.168.10.0 0.0.0.255
[R5]ospf
[R5-ospf-1]area 0
[R5-ospf-1-area-0.0.0.0]network 192.168.100.0 0.0.0.255
[R5-ospf-1-area-0.0.0.0]network 192.168.5.0 0.0.0.255
[R6]ospf
[R6-ospf-1]area 0
[R6-ospf-1-area-0.0.0.0]network 192.168.100.0 0.0.0.255
[R6-ospf-1-area-0.0.0.0]network 192.168.6.0 0.0.0.255