一、划分ip
1.首先划分IP
2.在设备接口上配置IP
二,R3-R5/6/7为MGRE环境,R3为中心站点;
r3 [r3]int t0/0/0 [r3-Tunnel0/0/0]ip add 172.16.4.1 24 [r3-Tunnel0/0/0]tunnel-protocol gre p2mp [r3-Tunnel0/0/0]source 34.0.0.1 [r3-Tunnel0/0/0]nhrp network-id 100 [r3-Tunnel0/0/0]nhrp entry multicast dynamic #需开启伪广播 r5 [r5]int t0/0/0 [r5-Tunnel0/0/0]ip add 172.16.4.2 24 [r5-Tunnel0/0/0]tunnel-protocol gre p2mp [r5-Tunnel0/0/0]source s4/0/0 [r5-Tunnel0/0/0]nhrp entry 172.16.4.1 34.0.0.1 register [r5-Tunnel0/0/0]nhrp entry multicast dynamic #需开启伪广播 r6 [r6]int t0/0/0 [r6-Tunnel0/0/0]ip add 172.16.4.3 24 [r6-Tunnel0/0/0]tunnel-protocol gre p2mp [r6-Tunnel0/0/0]source s4/0/0 [r6-Tunnel0/0/0]nhrp entry 172.16.4.1 34.0.0.1 register [r6-Tunnel0/0/0]nhrp entry multicast dynamic #需开启伪广播 r7 [r7]int t0/0/0 [r7-Tunnel0/0/0]ip add 172.16.4.4 24 [r7-Tunnel0/0/0]tunnel-protocol gre p2mp [r7-Tunnel0/0/0]source g0/0/0 [r7-Tunnel0/0/0]nhrp entry 172.16.4.1 34.0.0.1 register
三.配置完ospf后由于通道p2p为点到点所以改为 broadcast 。
[r3-Tunnel0/0/0]ospf network-type broadcast [r5-Tunnel0/0/0]ospf network-type broadcast [r6-Tunnel0/0/0]ospf network-type broadcast [r7-Tunnel0/0/0]ospf network-type broadcast
四、设备均可访问R4的环回
1.在所有路由器上配置好ospf
2.在r9和r7上设置虚链路
[r9-ospf-1-area-0.0.0.3]vlink-peer 7.7.7.7 [r7-ospf-1-area-0.0.0.3]vlink-peer 9.9.9.9
3.ABR设备上做nat网络地址转换
[r9-ospf-1-area-0.0.0.3]vlink-peer 7.7.7.7 [r7-ospf-1-area-0.0.0.3]vlink-peer 9.9.9.9
4.在ABR设备上做区域汇总
[r3]ospf [r3-ospf-1]a 1 [r3-ospf-1-area-0.0.0.1]abr-summary 172.16.32.0 255.255.224.0
5.在r12上做双向重发布
[r12-ospf-1]import-route rip 1 [r12-rip-1]import-route ospf 1
6.所有设备此时均可访问ISP的环回
五、减少LSA的更新量,加快收敛,保障更新安全;
1.减少LSA更新量(特殊区域)
a 1区域(末梢区域)
[r1-ospf-1-area-0.0.0.1]stub [r2-ospf-1-area-0.0.0.1]stub [r3-ospf-1-area-0.0.0.1]stub no-summary
a 2区域(非完全末梢区域)
[r6-ospf-1-area-0.0.0.2]nssa no-summary [r11-ospf-1-area-0.0.0.2]nssa [r12-ospf-1-area-0.0.0.2]nssa
2.加速收敛(修改hello时间)
[r1-GigabitEthernet0/0/0]ospf timer hello 5