一、实验拓扑:
二、网络IP规划:
172.16.0.0/16
172.16.0.0/19-----a0
172.16.0.0/24----p2p
172.16.0.0/30
172.16.0.4/30
172.16.0.8/30
172.16.1.0/24----MA
172.16.1.0/29
172.16.1.4/29
172.16.1.8/29
172.16.2.0/24
.........
172.16.32.0/19----a1
172.16.32.0/24---p2p
172.16.32.0/30
172.16.32.4/30
172.16.33.0/24----MA
172.16.34.0/24
........
172.16.64.0/19-----a2
172.16.96.0/19-----a3
172.16.128.0/19------a4
172.16.160.0/19------rip
三、配置:
[r3]int s4/0/0
[r3-Serial4/0/0]ip add 34.0.0.1 24
[r5]int s 4/0/00
[r5-Serial4/0/0]ip ad 45.0.0.1 24
[r5-Serial4/0/0]int l 0
[r5-LoopBack0]ip ad 172.16.2.1 24
[r6]int s4/0/0
[r6-Serial4/0/0]ip add 46.0.0.1 24
[r6-Serial4/0/0]int l0
[r6-LoopBack0]ip ad 172.16.3.1 24
[r6-LoopBack0]q
[r7]in g 0/0/0
[r7-GigabitEthernet0/0/0]ip add 47.0.0.1 24
[r7-GigabitEthernet0/0/0]int l0
[r7-LoopBack0]ip ad 172.16.4.1 24
[r7-LoopBack0]q
[isp]int l0
[isp-LoopBack0]ip ad 4.4.4.4 24
[isp-LoopBack0]int s4/0/0
[isp-Serial4/0/0]ip add 34.0.0.2 24
[isp-Serial4/0/0]int s4/0/1
[isp-Serial4/0/1]ip add 45.0.0.2 24
[isp-Serial4/0/1]int s3/0/0
[isp-Serial3/0/0]ip ad 46.0.0.2 24
[isp-Serial3/0/0]in g 0/0/0
[isp-GigabitEthernet0/0/0]ip add 47.0.0.2 24
MGRE:
[r3]int t0/00/0
[r3-Tunnel0/0/0]ip add 172.16.1.1 29
[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]INT T0/0/0
[r5-Tunnel0/0/0]IP ADD 172.16.1.2 29
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]source s4/0/0
Mar 28 2023 10:57:44-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]nhrp network-id 100
[r5-Tunnel0/0/0]nhrp entry 172.16.1.1 34.0.0.1 register
[r6]int t0/0/0
[r6-Tunnel0/0/0]ip add 172.16.1.3 29
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp
[r6-Tunnel0/0/0]source s4/0/0
[r6-Tunnel0/0/0]nhrp network-id 100
[r6-Tunnel0/0/0]nhrp entry 172.16.1.1 34.0.0.1 register
[r7]int t 0/0/0
[r7-Tunnel0/0/0]ip add 172.16.0.4 29
[r7-Tunnel0/0/0]tunnel-protocol gre p2mp
[r7-Tunnel0/0/0]source g0/0/0
Mar 28 2023 12:17:34-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]
[r7-Tunnel0/0/0]nhrp network-id 100
[r7-Tunnel0/0/0]nhrp entry 172.168.1.1 34.0.0.1 register
ospf、rip:
[r1-ospf-1]a 1
[r1-ospf-1-area-0.0.0.1]network 172.16.0.0 0.0.255.255
[r2-ospf-1]a 1
[r2-ospf-1-area-0.0.0.1]network 172.16.0.0 0.0.255.255
[r3-ospf-1]ar 1
[r3-ospf-1-area-0.0.0.1]network 172.16.32.0 0.0.7.255
[r3-ospf-1-area-0.0.0.1]a 0
[r3-ospf-1-area-0.0.0.0]network 172.16.1.1 0.0.0.0
[r5-ospf-1]a 0
[r5-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255
[r6-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.3.255[r6-ospf-1-area-0.0.0.0]a 2
[r6-ospf-1-area-0.0.0.2]network 172.16.65.1 0.0.0.0
[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]a 0
[r7-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.7.255
[r7-ospf-1-area-0.0.0.0]a 3
[r7-ospf-1-area-0.0.0.3]network 172.16.97.1 0.0.0.0
[r8]ospf 1 router-id 8.8.8.8
[r8-ospf-1]a 3
[r8-ospf-1-area-0.0.0.3]network 172.16.0.0 0.0.255.255
[r9]ospf 1 router-id 9.9.9.9
[r9-ospf-1]a 2
[r9-ospf-1-area-0.0.0.2]network 172.16.97.10 0.0.0.0
[r10]ospf 1 r 10.10.10.10
[r10-ospf-1]a 4
[r10-ospf-1-area-0.0.0.4]network 172.16.0.0 0.0.255.255
[r11]ospf 1 router-id 11.11.11.11
[r11-ospf-1]a 2
[r11-ospf-1-area-0.0.0.2]network 172.16.0.0 0.0.255.255
[r12-ospf-1-area-0.0.0.2]network 172.16.65.10 0.0.00.0
[r12]rip
[r12-rip-1]v 2
[r12-rip-1]ne
[r12-rip-1]network 172.16.0.0
修改网络类型
[r3]int t0/0/0
[r3-Tunnel0/0/0]ospf network-type broadcast
[r5]int t0/0/0
[r5-Tunnel0/0/0]ospf network-type broadcast
[r6]int t0/0/0
[r6-Tunnel0/0/0]ospf network-type broadcast
[r7]int t0/0/0
[r7-Tunnel0/0/0]ospf network-type broadcast
重发布,导入rip
[r12]ospf 1
[r12-ospf-1]import-route rip 1
[r12-rip]import-route ospf 1
多进程双向重发布(R9为边界路由器)
[r9]ospf 1
[r9-ospf-1]q
[r9]ospf 2 router-id 9.9.9.9
[r9-ospf-2]a 4
[r9-ospf-2-area-0.0.0.4]network 172.16.128.0 0.0.3.255
[r9-ospf-1]import-route ospf 2
[r9-ospf-2]import-route ospf 1
优化:
修改ospf区域的hello时间加快收敛
......
ospf路由汇总(主要减少骨干区域LSA更新量):
R3、R6、R7做域间路由汇总。
R9、R12做成域外路由汇总。
[r3]ospf 1
[r3-ospf-1]a 1
[r3-ospf-1-area-0.0.0.1]abr-summary 172.16.32.0 255.255.224.0
......
特殊区域(主要减少非骨干区域LSA更新量):
area1做成完全末梢区域。
area2、3做成完全的非完全末梢区域。
......
注意:这个实验除了需要在R9上给are4下发一条缺省,就不需要再下发缺省了,因为做了特殊区域会自动为该区下发一条指向area0的缺省。