[r3]ip rou 0.0.0.0 0 34.1.1.2
[r3]ospf 100
[r3-ospf-100]default-route-advertise
[r3]acl 2000
[r3-acl-basic-2000]ru
[r3-acl-basic-2000]rule p so an
[r3-acl-basic-2000]rule p so any
[r3]int g0/0/1
[r3-GigabitEthernet0/0/1]nat outbound 2000
[r6]int tu 0/0/0
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp
[r6-Tunnel0/0/0]so 172.16.1.1
[r6-Tunnel0/0/0]nhrp entry multicast dynamic
[r6-Tunnel0/0/0]nhrp network-id 100
[r6-Tunnel0/0/0]ip ad 10.1.1.1 24
[r8]int tu 0/0/0
[r8-Tunnel0/0/0]tunnel-protocol gre p2mp
[r8-Tunnel0/0/0]so 172.16.8.1
[r8-Tunnel0/0/0]nhrp entry multicast dynamic
[r8-Tunnel0/0/0]nhrp network-id 100
[r8-Tunnel0/0/0]ip ad 10.1.1.2 24
[r10]int tu 0/0/0
[r10-Tunnel0/0/0]tunnel-protocol gre p2mp
[r10-Tunnel0/0/0]so 172.16.16.1
[r10-Tunnel0/0/0]nhrp entry multicast dynamic
[r10-Tunnel0/0/0]nhrp network-id 100
[r10-Tunnel0/0/0]ip ad 10.1.1.3 24
[r12]int tu 0/0/0
[r12-Tunnel0/0/0]tunnel-protocol gre p2mp
[r12-Tunnel0/0/0]so 172.16.24.1
[r12-Tunnel0/0/0]nhrp entry multicast dynamic
[r12-Tunnel0/0/0]nhrp network-id 100
[r12-Tunnel0/0/0]ip ad 10.1.1.4 24
(配置Tunnel口然后配置ip
[r6-ospf-1-area-0.0.0.0]network 10.1.1.1 0.0.0.0
[r8-ospf-1-area-0.0.0.0]network 10.1.1.2 0.0.0.0
[r10-ospf-1-area-0.0.0.0]network 10.1.1.3 0.0.0.0
[r12-ospf-1-area-0.0.0.0]network 10.1.1.4 0.0.0.0
(在各自的ospf中宣告Tunne的IP地址
[r6]ip route-static 172.16.16.0 21 172.16.1.2
[r6]ip route-static 172.16.8.0 21 172.16.1.2
[r6]ip route-static 172.16.24.0 21 172.16.1.2
[r8]ip route-static 172.16.16.0 21 172.16.8.2
[r8]ip route-static 172.16.1.0 21 172.16.8.2
[r8]ip route-static 172.16.24.0 21 172.16.8.2
[r10]ip route-static 172.16.1.0 21 172.16.16.2
[r10]ip route-static 172.16.8.0 21 172.16.16.2
[r10]ip route-static 172.16.24.0 21 172.16.16.2
[r12]ip route-static 172.16.1.0 21 172.16.24.2
[r12]ip route-static 172.16.8.0 21 172.16.24.2
[r12]ip route-static 172.16.16.0 21 172.16.24.2
(在r6/r8r/10/r12写上去往其他三条路的静态
[r15-ospf-120]import-route ospf 110
[r15-ospf-120]q
[r15]ospf 110
[r15-ospf-110]import-route ospf 120
双相重发布解决不连续子网
[r10]ospf 110
[r10-ospf-110]ar 2
[r10-ospf-110-area-0.0.0.2]vlink-peer 11.11.11.11
[r11-ospf-110-area-0.0.0.2]vlink-peer 10.10.10.10
使用vlink解决远离骨干的非骨干区域
[r6]ip route-stati 0.0.0.0 0 46.1.1.1
[r6]ospf 110
[r6-ospf-110]default-route-advertise
[r6]acl 2000
[r6-acl-basic-2000]ru pe source any
[r6-GigabitEthernet0/0/0]nat outbound 2000
[r6]int tu 0/0/1
[r6-Tunnel0/0/1]tunnel-protocol gre
[r6-Tunnel0/0/1]source 46.1.1.2
[r6-Tunnel0/0/1]description 34.1.1.1
[r6-Tunnel0/0/1]ip ad 11.1.1.2 24
[r6]ip rou 34.1.1.0 24 46.1.1.1
[r3]int tu0/0/1
[r3-Tunnel0/0/1]ip ad 11.1.1.1 24
[r3-Tunnel0/0/1]tunnel-protocol gre
[r3-Tunnel0/0/1]source 34.1.1.1
[r3-Tunnel0/0/1]description 46.1.1.2
内网访问外网操作如上,然后宣告在各自的ospf的区域里面即可通讯