H3C OSPF 综合排错实验
实验拓扑
实验需求
- 按照图示配置 IP 地址,所有路由器配置环回口 IP 地址为
X.X.X.X/32
作为 Router-id,X 为设备编号(R7 除外) - 按照图示分区域配置 OSPF
- R1 和 R6 上分别配置环回口来模拟业务网段,如拓扑图所示;业务网段中不允许出现协议报文
- 正常情况下,Area 10 和 Area 100 的业务流量经过 R3-R5,当 R3 和 R5 之间的链路故障时,流量自动切换到 R2-R4
- R2 和 R4 之间的链路只对到
192.168.2.0
的流量提供备份 - Area 100 配置为 Stub 区域
- 其他区域不允许出现 Area 10 的业务网段的明细路由
- 适当调整链路 Cost,避免出现等价路由
- 为了保证协议安全,Area 0 配置区域验证,验证密钥为
123456
- R2 作为网络出口,配置默认路由指向 R7,并引入到 OSPF
- R2 上配置 EASY IP,只对
192.168.0.0/24
和192.168.2.0/24
提供访问互联网功能 - 排除全部网络故障,并完成排错报告
实验拓扑下载
通过百度网盘分享的文件:H3C OSPF 综合排错实验
链接:https://pan.baidu.com/s/1yfXILJSfGvWDRGzUg-RxVA?pwd=9016
实验排错
错误点1:R3 OSPF Area10 未宣告地址,与邻居R1相连的网段未在正确区域宣告
错误现象
[R3-ospf-1]dis th
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
authentication-mode simple cipher $c$3$pu2vD6jFzpsbSt1XufJEqaC06CXCdJw+pQ==
network 10.2.2.0 0.0.0.255
network 10.3.3.0 0.0.0.255
network 10.5.5.0 0.0.0.255
area 0.0.0.10
abr-summary 192.168.0.0 255.255.0.0
错误修正
[R3-ospf-1]dis th
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
authentication-mode simple cipher $c$3$pu2vD6jFzpsbSt1XufJEqaC06CXCdJw+pQ==
network 10.3.3.0 0.0.0.255
network 10.5.5.0 0.0.0.255
area 0.0.0.10
abr-summary 192.168.0.0 255.255.0.0
network 10.2.2.0 0.0.0.255
错误点2:R5 OSPF区域认证密码错误
错误现象
R3 发出的Hello报文中,携带的密码为123456,R5发出的Hello报文中,携带的密码为654321,密码不一致,无法建立邻居关系
错误修正
[R5-ospf-1-area-0.0.0.0]authentication-mode simple plain 123456
错误点3:R6未配置Stub 区域
需求要求:Area 100 配置为 Stub 区域
错误现象
[R6-ospf-1]dis th
#
ospf 1 router-id 6.6.6.6
area 0.0.0.100
network 10.7.7.0 0.0.0.255
network 10.8.8.0 0.0.0.255
network 192.168.2.0 0.0.0.255
network 192.186.3.0 0.0.0.255
错误修正
[R6-ospf-1-area-0.0.0.100]stub
错误点4:R6未将业务端口配置为静默端口
需求要求:R1 和 R6 上分别配置环回口来模拟业务网段,如拓扑图所示;业务网段中不允许出现协议报文
错误现象
[R6-ospf-1]dis th
#
ospf 1 router-id 6.6.6.6
area 0.0.0.100
network 10.7.7.0 0.0.0.255
network 10.8.8.0 0.0.0.255
network 192.168.2.0 0.0.0.255
network 192.186.3.0 0.0.0.255
错误修正
[R6-ospf-1]silent-interface LoopBack 1
[R6-ospf-1]silent-interface LoopBack 2
错误点5:R6业务网段192.168.3.0
地址段宣告错误
错误现象
[R6-ospf-1]dis th
#
ospf 1 router-id 6.6.6.6
area 0.0.0.100
network 10.7.7.0 0.0.0.255
network 10.8.8.0 0.0.0.255
network 192.168.2.0 0.0.0.255
network 192.186.3.0 0.0.0.255
错误修正
[R6-ospf-1-area-0.0.0.100]undo network 192.186.3.0 0.0.0.255
[R6-ospf-1-area-0.0.0.100]network 192.168.3.0 0.0.0.255
错误点6:R2未将外部路由引入OSPF
需求要求:R2 作为网络出口,配置默认路由指向 R7,并引入到 OSPF
错误现象
[R2]display route-static routing-table
Total number of routes: 1
Status: * - valid
*Destination: 0.0.0.0/0
NibID: 0x11000000 NextHop: 200.1.1.7
MainNibID: N/A BkNextHop: N/A
BkNibID: N/A Interface: N/A
TableID: 0x2 BkInterface: N/A
Flag: 0x2d01 BfdSrcIp: N/A
DbIndex: 0x1 BfdIfIndex: 0x0
Type: Normal BfdVrfIndex: 0
TrackIndex: 0xffffffff Label: NULL
Preference: 60 vrfIndexDst: 0
BfdMode: N/A vrfIndexNH: 0
Permanent: 0 Tag: 0
[R2-ospf-1]dis th
#
ospf 1 router-id 2.2.2.2
import-route static
area 0.0.0.0
authentication-mode simple cipher $c$3$KitqergDyhl+Dv8wR8LwfHuuYgxbXg/sew==
network 10.3.3.0 0.0.0.255
network 10.4.4.0 0.0.0.255
area 0.0.0.10
abr-summary 192.168.0.0 255.255.254.0
network 10.1.1.0 0.0.0.255
错误修正
[R2-ospf-1]default-route-advertise
错误点7:R3 Area10 聚合业务网段范围错误
错误信息
[R3-ospf-1]dis th
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
authentication-mode simple cipher $c$3$pu2vD6jFzpsbSt1XufJEqaC06CXCdJw+pQ==
network 10.2.2.0 0.0.0.255
network 10.3.3.0 0.0.0.255
network 10.5.5.0 0.0.0.255
area 0.0.0.10
abr-summary 192.168.0.0 255.255.0.0
导致非Area10设备的路由表中存在两条去往192.168.0.0的路由,掩码不同
192.168.0.0/16 O_INTER 10 303 10.7.7.4 GE0/0
192.168.0.0/23 O_INTER 10 302 10.7.7.4 GE0/0
错误修正
[R3-ospf-1-area-0.0.0.10]undo abr-summary 192.168.0.0 255.255.0.0
[R3-ospf-1-area-0.0.0.10]abr-summary 192.168.0.0 255.255.254.0
错误点8:R1路由表存在等价路由,以及Area 10 和 Area 100 的业务流量走向不符合需求要求
需求要求:适当调整链路 Cost,避免出现等价路由,正常情况下,Area 10 和 Area 100 的业务流量经过 R3-R5
错误信息
[R1]display ip routing-table
Destinations : 29 Routes : 31
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 O_ASE2 150 1 10.1.1.2 GE0/0
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
1.1.1.1/32 Direct 0 0 127.0.0.1 InLoop0
10.1.1.0/24 Direct 0 0 10.1.1.1 GE0/0
10.1.1.1/32 Direct 0 0 127.0.0.1 InLoop0
10.1.1.255/32 Direct 0 0 10.1.1.1 GE0/0
10.2.2.0/24 Direct 0 0 10.2.2.1 GE0/1
10.2.2.1/32 Direct 0 0 127.0.0.1 InLoop0
10.2.2.255/32 Direct 0 0 10.2.2.1 GE0/1
10.3.3.0/24 O_INTER 10 2 10.1.1.2 GE0/0
O_INTER 10 2 10.2.2.3 GE0/1
10.4.4.0/24 O_INTER 10 2 10.1.1.2 GE0/0
10.5.5.0/24 O_INTER 10 2 10.2.2.3 GE0/1
10.6.6.0/24 O_INTER 10 402 10.1.1.2 GE0/0
O_INTER 10 402 10.2.2.3 GE0/1
10.7.7.0/24 O_INTER 10 302 10.1.1.2 GE0/0
10.8.8.0/24 O_INTER 10 502 10.2.2.3 GE0/1
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.0/24 Direct 0 0 192.168.0.1 Loop1
192.168.0.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.255/32 Direct 0 0 192.168.0.1 Loop1
192.168.1.0/24 Direct 0 0 192.168.1.1 Loop2
192.168.1.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.1.255/32 Direct 0 0 192.168.1.1 Loop2
192.168.2.1/32 O_INTER 10 302 10.1.1.2 GE0/0
192.168.3.1/32 O_INTER 10 302 10.1.1.2 GE0/0
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
[R6]display ip routing-table
Destinations : 28 Routes : 28
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 O_INTER 10 301 10.7.7.4 GE0/0
192.168.0.0/23 O_INTER 10 302 10.7.7.4 GE0/0
修正错误
[R1-GigabitEthernet0/0]ospf cost 500
[R1-GigabitEthernet0/1]ospf cost 300
[R2-GigabitEthernet0/0]ospf cost 500
[R2-GigabitEthernet0/1]ospf cost 400
[R3-GigabitEthernet0/0]ospf cost 300
[R3-GigabitEthernet0/1]ospf cost 400
[R4-GigabitEthernet0/0]ospf cost 500
[R5-GigabitEthernet0/0]ospf cost 300
[R6-GigabitEthernet0/1]ospf cost 300
[R6-GigabitEthernet0/0]ospf cost 500
错误点9:当R3 和 R5 之间的链路故障时,未按需求实现R2 和 R4 之间的链路只对到192.168.2.0
的流量提供备份
错误现象
[R5-GigabitEthernet0/1]shutdown
[R5-GigabitEthernet0/1]%Mar 4 11:39:21:165 2024 R5 OSPF/5/OSPF_NBR_CHG: OSPF 1 Neighbor 10.5.5.3(GigabitEthernet0/1) changed from FULL to DOWN.
%Mar 4 11:39:21:165 2024 R5 IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet0/1 changed to down.
%Mar 4 11:39:21:166 2024 R5 IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet0/1 changed to down.
[R2]display ip routing-table
Destinations : 30 Routes : 30
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 Static 60 0 200.1.1.7 GE5/0
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
2.2.2.2/32 Direct 0 0 127.0.0.1 InLoop0
10.1.1.0/24 Direct 0 0 10.1.1.2 GE0/0
10.1.1.2/32 Direct 0 0 127.0.0.1 InLoop0
10.1.1.255/32 Direct 0 0 10.1.1.2 GE0/0
10.2.2.0/24 O_INTRA 10 800 10.1.1.1 GE0/0
10.3.3.0/24 Direct 0 0 10.3.3.2 GE0/1
10.3.3.2/32 Direct 0 0 127.0.0.1 InLoop0
10.3.3.255/32 Direct 0 0 10.3.3.2 GE0/1
10.4.4.0/24 Direct 0 0 10.4.4.2 GE0/2
10.4.4.2/32 Direct 0 0 127.0.0.1 InLoop0
10.4.4.255/32 Direct 0 0 10.4.4.2 GE0/2
10.6.6.0/24 O_INTER 10 401 10.4.4.4 GE0/2
10.7.7.0/24 O_INTER 10 501 10.4.4.4 GE0/2
10.8.8.0/24 O_INTER 10 701 10.4.4.4 GE0/2
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.0/23 O_SUM 255 0 0.0.0.0 NULL0
192.168.0.1/32 O_INTRA 10 500 10.1.1.1 GE0/0
192.168.1.1/32 O_INTRA 10 500 10.1.1.1 GE0/0
192.168.2.1/32 O_INTER 10 501 10.4.4.4 GE0/2
192.168.3.1/32 O_INTER 10 501 10.4.4.4 GE0/2
200.1.1.0/24 Direct 0 0 200.1.1.2 GE5/0
200.1.1.2/32 Direct 0 0 127.0.0.1 InLoop0
200.1.1.255/32 Direct 0 0 200.1.1.2 GE5/0
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
错误修正
[R4]
#
acl basic 2000
rule 0 permit source 192.168.2.0 0.0.0.255
#
ospf 1 router-id 4.4.4.4
area 0.0.0.0
filter 2000 import
[R2]display ip routing-table
Destinations : 26 Routes : 26
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/0 Static 60 0 200.1.1.7 GE5/0
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
2.2.2.2/32 Direct 0 0 127.0.0.1 InLoop0
10.1.1.0/24 Direct 0 0 10.1.1.2 GE0/0
10.1.1.2/32 Direct 0 0 127.0.0.1 InLoop0
10.1.1.255/32 Direct 0 0 10.1.1.2 GE0/0
10.2.2.0/24 O_INTRA 10 800 10.1.1.1 GE0/0
10.3.3.0/24 Direct 0 0 10.3.3.2 GE0/1
10.3.3.2/32 Direct 0 0 127.0.0.1 InLoop0
10.3.3.255/32 Direct 0 0 10.3.3.2 GE0/1
10.4.4.0/24 Direct 0 0 10.4.4.2 GE0/2
10.4.4.2/32 Direct 0 0 127.0.0.1 InLoop0
10.4.4.255/32 Direct 0 0 10.4.4.2 GE0/2
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.0/23 O_SUM 255 0 0.0.0.0 NULL0
192.168.0.1/32 O_INTRA 10 500 10.1.1.1 GE0/0
192.168.1.1/32 O_INTRA 10 500 10.1.1.1 GE0/0
192.168.2.1/32 O_INTER 10 501 10.4.4.4 GE0/2
200.1.1.0/24 Direct 0 0 200.1.1.2 GE5/0
200.1.1.2/32 Direct 0 0 127.0.0.1 InLoop0
200.1.1.255/32 Direct 0 0 200.1.1.2 GE5/0
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
实验附件
通过百度网盘分享的文件:H3C OSPF 综合排错实验
链接:https://pan.baidu.com/s/1yfXILJSfGvWDRGzUg-RxVA?pwd=9016