課題內容: 雙點雙向重分佈中的一個疑難故障redis
知識點: OSPF轉發地址對自治系統外部路由的影響數據庫
拓撲:負載均衡
按圖配置IP地址 (配置省略)ide
配置動態路由協議oop
其中R3的環回口 10.1.1.3/32宣告進入EIGRP 90spa
R3(config)#router eigrp 90
R3(config-router)#network 0.0.0.0pwa
R1(config)#router eigrp 90
R1(config-router)#network 10.1.134.0 0.0.0.2553d
R4(config)#router eigrp 90
R4(config-router)#network 10.1.134.0 0.0.0.255router
R1(config)#interface s1/0
R1(config-if)#ip ospf 110 area 0blog
R1(config)#interface e0/2 //注意,這裏因爲操做失誤,將自治系統外部的接口宣告進入了OSPF //
R1(config-if)#ip ospf 110 area 0
R4(config)#interface s1/1
R4(config-if)#ip ospf 110 area 0
R2(config)#interface s1/0
R2(config-if)#ip ospf 110 area 0
R2(config-if)#interface s1/1
R2(config-if)#ip ospf 110 area 0
R2(config)#interface loopback 0
R2(config-if)#ip ospf 110 area 0
執行雙點雙向重分佈
R一、R4
router eigrp 90
redistribute ospf 110 metric 1544 2000 255 1 1500
router ospf 110
redistribute eigrp 90 subnets
驗證效果:
R3#show ip route eigrp | begin Gateway
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 6 subnets, 3 masks
D EX 10.1.1.2/32 [170/2195456] via 10.1.134.4, 00:00:25, Ethernet0/2
[170/2195456] via 10.1.134.1, 00:00:25, Ethernet0/2
R2#show ip route ospf | begin Gateway
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 7 subnets, 3 masks
O E2 10.1.1.3/32 [110/20] via 10.1.24.1, 00:00:51, Serial1/1
O 10.1.134.0/24 [110/74] via 10.1.12.1, 00:03:27, Serial1/0
R3上的EIGRP路由表中,往R2環回口的路由出現了負載均衡,顯然是管理員意向中的;
可是R2的OSPF路由表中,去往EIGRP自治系統的路由,卻不是負載均衡的;
一般的故障排查思路以下:
R2#show ip ospf neighbor //檢查鄰居是否正常
Neighbor ID Pri State Dead Time Address Interface
10.1.1.4 0 FULL/ - 00:00:35 10.1.24.1 Serial1/1
10.1.1.1 0 FULL/ - 00:00:37 10.1.12.1 Serial1/0
R2#show ip ospf database //檢查鏈路狀態數據庫
OSPF Router with ID (10.1.1.2) (Process ID 110)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
10.1.1.1 10.1.1.1 312 0x80000004 0x003F60 3
10.1.1.2 10.1.1.2 363 0x80000003 0x007DBB 5
10.1.1.4 10.1.1.4 283 0x80000003 0x00B07D 2
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag
10.1.1.3 10.1.1.1 312 0x80000001 0x003AB5 0
10.1.1.3 10.1.1.4 282 0x80000001 0x00AED2 0
10.1.134.0 10.1.1.4 282 0x80000001 0x0010EE 0
五類LSA的位置出現了蹊蹺,關於 10.1.134.0的外部前綴,本應該由R1和R4都產生,可是如今R1卻沒有產生,去檢查R1的狀況
R1#show ip ospf database external self-originate
OSPF Router with ID (10.1.1.1) (Process ID 110)
Type-5 AS External Link States
LS age: 492
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 10.1.1.3 (External Network Number )
Advertising Router: 10.1.1.1
LS Seq Number: 80000001
Checksum: 0x3AB5
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 10.1.134.3
External Route Tag: 0
//R1僅僅產生了一條五類LSA,而且攜帶了轉發地址 10.1.134.3 //
根據OSPF外部路由轉發地址規則,作以下檢查:
R1#show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Et0/2 110 0 10.1.134.1/24 10 DR 0/0
Se1/0 110 0 10.1.12.1/30 64 P2P 1/1
// 果真,R1的 e0/2 接口被宣告進入了OSPF //
R1#show ip ospf interface e0/2
Ethernet0/2 is up, line protocol is up
Internet Address 10.1.134.1/24, Area 0, Attached via Interface Enable
Process ID 110, Router ID 10.1.1.1, Network Type BROADCAST, Cost: 10
// 檢查顯示,該接口經過接口下命令使能了OSPF (固然,現網中,這種狀況更多的會出如今通配符掩碼計算錯誤的場景中)//
排除故障:
R1(config)#interface e0/2
R1(config-if)#no ip ospf 110 area 0
R2#show ip route ospf | begin Gateway
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 7 subnets, 3 masks
O E2 10.1.1.3/32 [110/20] via 10.1.24.1, 00:17:20, Serial1/1
[110/20] via 10.1.12.1, 00:00:21, Serial1/0
O E2 10.1.134.0/24 [110/20] via 10.1.24.1, 00:00:21, Serial1/1
[110/20] via 10.1.12.1, 00:00:21, Serial1/0
問題解決。
感謝你們,我是達叔。