实验要求:
1.r4为isp,其上只能配置ip地址,r4与其他直连设备间使用公有IP
2.解决ospf不规则区域的3种方式都使用
3.整个ospf环境ip地址为172.16.0.0/16进程100使用192.168.1.0/24
4.所有设备均可以访问r4上的两个环回
5.减少lsa的更新量,加快收敛,保障更新安全
6.全网可达
实验步骤:
第一步:
在上图网络划分中,我们将每个区域分配一个大段,再将大段分配到各接口。随后,进行IP地址和环回配置,确保网络顺畅运行。这种层次化的划分和配置方式有助于提高网络管理的效率和灵活性。
第二步:
在r5、r7、r10、r13创建tunnel口
我们以r5为hub
[r5]int Tunnel 0/0/0
[r5-Tunnel0/0/0]ip address 20.1.1.1 24
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]nhrp network-id 100
[r5-Tunnel0/0/0]nhrp entry multicast dynamic
[r5-Tunnel0/0/0]source g0/0/01
Dec 28 2022 22:47:48-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r5-Tunnel0/0/0]ospf network-type broadcast
r7、r10、13为sopken去找r5登记
[r7]int Tunnel 0/0/0
[r7-Tunnel0/0/0]tunnel-protocol gre p2mp
[r7-Tunnel0/0/0]ip ad 20.1.1.2 24
[r7-Tunnel0/0/0]nhrp entry 20.1.1.1 172.16.64.2 register
[r7-Tunnel0/0/0]nhrp network-id 100
[r7-Tunnel0/0/0]source g0/0/0
Jan 2 2023 16:32:29-08:00 r7 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r7-Tunnel0/0/0]ospf network-type broadcast
第三步
在r5、r7、r10、r13配置互指的下一跳静态路由引流,打通隧道
第四步
在路由器上启用ospf协议,根据图示对接口进行宣告
第五步
以r9为asbr做双向重发布,使ospf100与ospf200互通
[r9]ospf 100
[r9-ospf-100]import-route ospf 200
[r9-ospf-100]q
[r9]ospf 200
[r9-ospf-200]import-route ospf 100
运用虚链路将area4与area0相连
[r13]ospf 100
[r13-ospf-100]area 2
[r13-ospf-100-area-0.0.0.2]vlink-peer 14.14.14.14
[r14]ospf 100
[r14-ospf-100]area 2
[r14-ospf-100-area-0.0.0.2]vlink-peer 13.13.13.13
第六步
在r3、r5上创建tunnel口,打通彼此,类型为点到点
[r3]int Tunnel 0/0/1
[r3-Tunnel0/0/1]tunnel-protocol gre
[r3-Tunnel0/0/1]ip address 10.1.1.1 24
[r3-Tunnel0/0/1]source g0/0/1
[r3-Tunnel0/0/1]destination 172.16.160.2
Jan 2 2023 18:21:34-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/1 has entered the UP state.
[r3-Tunnel0/0/1]ospf network-type broadcast
第七步
将r3-r5的tunnel接口宣告到ospf协议中就能实现全网可达了。接下来就可以进行网络优化了。
第八步
减少lsa更新量,在abr路由器上进行路由汇总
例r10
[r10]ospf 100
[r10-ospf-100]area 3
[r10-ospf-100-area-0.0.0.3]abr-summary 172.16.0.0 255.255.224.0
[r10-ospf-100-area-0.0.0.3]
我们可以通过修改ospf的hello时间加快收敛速度
[r10]int g0/0/0
[r10-GigabitEthernet0/0/0]ospf timer hello 5
[r10-GigabitEthernet0/0/0]ospf timer dead 20
为了保障更新安全,我们可以配置ospf接口认证
[r10]int g0/0/0
[r10-GigabitEthernet0/0/0]ospf authentication-mode simple cipher 123
[r10-GigabitEthernet0/0/0]ospf authentication-mode md5