您好,登錄后才能下訂單哦!
OSPF網(wǎng)絡配置排錯
網(wǎng)絡拓撲如圖10.1所示,配置完成后發(fā)現(xiàn)從R1到R4和R5所帶主機有時通有時不通,網(wǎng)絡通信出現(xiàn)故障。
圖10.1 BENET網(wǎng)絡拓撲圖
各路由器的配置如下所示:
R1配置
interface FastEthernet0/0
ip address 10.0.0.1 255.255.255.252
!
interface FastEthernet1/0
ip address 20.0.0.1 255.255.255.252
!
router ospf 1
network 10.0.0.0 0.0.0.3 area 0
network 20.0.0.0 0.0.0.3 area 0
R2配置
interface FastEthernet0/0
ip address 10.0.0.2 255.255.255.252
!
interface FastEthernet1/0
ip address 30.0.0.1 255.255.255.0
!
router ospf 1
network 10.0.0.0 0.0.0.3 area 0
network 30.0.0.0 0.0.0.255 area 1
R3配置
interface FastEthernet0/0
ip address 30.0.0.5 255.255.255.0
!
interface FastEthernet1/0
ip address 20.0.0.2 255.255.255.252
!
router ospf 1
network 20.0.0.0 0.0.0.3 area 0
network 30.0.0.0 0.0.0.255 area 2
R4配置
interface FastEthernet0/0
ip address 30.0.0.2 255.255.255.0
!
router ospf 1
network 30.0.0.0 0.0.0.255 area 1
R5配置
interface FastEthernet0/0
ip address 30.0.0.6 255.255.255.0
!
router ospf 1
network 30.0.0.0 0.0.0.255 area 2
在處理OSPF故障時,一般首先查看路由表,通過路由表發(fā)現(xiàn)路由異常;然后根據(jù)出現(xiàn)異常的路由條目的目的地址,檢查所屬路由器的配置、鄰接關系等排除故障。
由于R1到R4、R5出現(xiàn)通信問題,所以查看R1的路由表,如下所示:
20.0.0.0/30 is subnetted, 1 subnets
C 20.0.0.0 is directly connected, FastEthernet1/0
10.0.0.0/30 is subnetted, 1 subnets
C 10.0.0.0 is directly connected, FastEthernet0/0
30.0.0.0/24 is subnetted, 1 subnets
O IA 30.0.0.0 [110/2] via 20.0.0.2, 00:32:40, FastEthernet1/0
[110/2] via 10.0.0.2, 00:32:40, FastEthernet0/0
發(fā)現(xiàn)路由表中出現(xiàn)了負載均衡的路由條目,但是在網(wǎng)絡規(guī)劃中沒有負載均衡的要求。
由于30.0.0.0/24網(wǎng)段出現(xiàn)故障,所以檢查配置此網(wǎng)段的路由器。經(jīng)檢查檢查配置發(fā)現(xiàn)接口地址的子網(wǎng)掩碼配置有誤,將/30的掩碼誤配置成/24的掩碼導致的網(wǎng)絡通信故障。
網(wǎng)絡管理員更改配置如下所示:
R2配置:
interface FastEthernet1/0
ip address 30.0.0.1 255.255.255.252
R3配置:
interface FastEthernet0/0
ip address 30.0.0.5 255.255.255.252
R4配置:
interface FastEthernet0/0
ip address 30.0.0.2 255.255.255.252
R5配置:
interface FastEthernet0/0
ip address 30.0.0.6 255.255.255.252
更改配置完成后,再次查看路由表已經(jīng)恢復正常,網(wǎng)絡通信也已正常。
當運行OSPF協(xié)議的網(wǎng)絡出現(xiàn)故障時,查看LSDB也可以快速有效的判斷問題,上述故障案例中也可以通過LSDB發(fā)現(xiàn)故障。
當OSPF網(wǎng)絡出現(xiàn)故障時,可以使用show ip ospf database命令R1查看LSDB,如下:
OSPF Router with ID (10.0.0.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
10.0.0.1 10.0.0.1 953 0x80000005 0x00CAFC 2
30.0.0.1 30.0.0.1 605 0x8000000A 0x0011C2 1
30.0.0.5 30.0.0.5 943 0x80000006 0x009723 1
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
10.0.0.1 10.0.0.1 1448 0x80000002 0x0048B3
20.0.0.2 30.0.0.5 943 0x80000002 0x00C60E
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
30.0.0.0 30.0.0.1 97 0x80000004 0x00F00B
30.0.0.0 30.0.0.5 943 0x80000002 0x00DC1D
R1的LSDB中粗體部分出現(xiàn)不同的路由器發(fā)送了相同的LSA,這時可以使用show ip ospf database summary命令進一步查看R1路由器收到的類型3的LSA信息如下:
OSPF Router with ID (10.0.0.1) (Process ID 1)
Summary Net Link States (Area 0)
Routing Bit Set on this LSA
LS age: 163
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 30.0.0.0 (summary Network Number)
Advertising Router: 30.0.0.1
LS Seq Number: 80000004
Checksum: 0xF00B
Length: 28
Network Mask: /24
TOS: 0 Metric: 1
Routing Bit Set on this LSA
LS age: 1009
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 30.0.0.0 (summary Network Number)
Advertising Router: 30.0.0.5
LS Seq Number: 80000002
Checksum: 0xDC1D
Length: 28
Network Mask: /24
TOS: 0 Metric: 1
兩臺路由器發(fā)布的Summary NET的LSA完全相同,這就造成了路由的負載均衡,查看路由表有網(wǎng)段30.0.0.0/24網(wǎng)段的負載均衡。然而實際網(wǎng)絡并不是負載均衡的網(wǎng)絡,檢查配置發(fā)現(xiàn)子網(wǎng)掩碼配置錯誤導致路由選路問題。
免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內(nèi)容。