Cisco IOS OSPF鄰居關係不能正常建立的原因和解決方法(轉)
(1)介面上沒有啟用ospf
就是在network語句的時候沒有匹配清楚,比如配置了錯誤的反掩碼不對,在show ip ospf interface的時候不會顯示你希望啟用的介面。使用show ip ospf interface來驗證。
這時候的鄰居表是空的
>R2#show ip ospf neighbor
R2#
(2)物理層或者是資料鏈路層協議down.
使用show ip int brief 或者是 show int type nomber會導致ospf packet 封裝失敗。
(3)建立鄰居的介面被passive掉
R2#show ip ospf interface Ethernet 0
Ethernet0 is up, line protocol is up
Internet Address 131.108.1.2/24, Area 0
Process ID 1, Router ID 131.108.1.2, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 131.108.1.2, Interface address 131.108.1.2
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
No Hellos (Passive interface)
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)
(4)OSPF的hello組播地址被ACL Block
R1#
interface Ethernet0
ip address 131.108.1.1 255.255.255.0
ip access-group 100 in
!
access-list 100 permit tcp any any
access-list 100 permit udp any any
access-list 101 permit ip 131.108.1.0 0.0.0.255 host 224.0.0.5
R2#
interface Ethernet0
ip address 131.108.1.2 255.255.255.0
ip access-group 100 in
!
access-list 100 permit tcp any any
access-list 100 permit udp any any
access-list 101 permit ip 131.108.1.0 0.0.0.255 host 224.0.0.5
R2#debug ip packet 101 detail
IP packet debugging is on (detailed) for access list 101
IP: s=131.108.1.2 (Ethernet0), d=224.0.0.5, len 68, access denied, proto=89
這時候的鄰居關係是INIT
R2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
131.108.2.1 1 INIT/- 00:00:33 131.108.1.1 Ethernet0
R1#show access-list 101
Extended IP access list 101
permit ip 131.108.1.0 0.0.0.3 host 224.0.0.5 (8 matches)
R1#debug ip packet 101 detail
IP packet debugging is on (detailed) for access list 101
R1#
IP: s=131.108.1.1 (local), d=224.0.0.5 (Ethernet0), len 60, sending broad/multicast,
proto
=89
IP: s=131.108.1.2 (Ethernet0), d=224.0.0.5, len 82, access denied, proto=89
IP: s=131.108.1.1 (local), d=224.0.0.5 (Ethernet0), len 60, sending broad/multicast,
proto
=89
IP: s=131.108.1.2 (Ethernet0), d=224.0.0.5, len 82,access denied, proto=89
(5)在broadcast鏈路上的子網掩碼不匹配
(6)Hello/dead 間隔不匹配
(7)認證方式或者是認證密碼不匹配
使用debug ip ospf adj 來檢視,可以自己使用不同的情況來驗證
(8)兩臺路由器處於不同的AREA
R1#debug ip ospf adj
OSPF adjacency events debugging is on
R1#
OSPF: Rcv pkt from 131.108.1.2, Ethernet0, area 0.0.0.0
mismatch area 0.0.0.1 in the header
R2#show log
%OSPF-4-ERRRCV: Received invalid packet: mismatch area ID, from backbone area must be virtual-link but not found from 131.108.1.1, Ethernet0
(9)Stub/transit/NSSA 區域型別不匹配
這個是常常不小心會被忘記的。
R1#debug ip ospf adj
OSPF adjacency events debugging is on
R1#
OSPF: Rcv hello from 131.108.0.1 area 1 from Ethernet0 131.108.1.2
OSPF: Hello from 131.108.1.2 with mismatched Stub/Transit area option bit
R1#debug ip ospf adj
OSPF adjacency events debugging is on
R1#
OSPF: Rcv hello from 131.108.0.1 area 1 from Ethernet0 131.108.1.2
OSPF: Hello from 131.108.1.2 with mismatched NSSA option bit
(10)使用secondary IP來建立OSPF adjacencyR2#
interface FastEthernet0/0
ip address 131.108.1.2 255.255.255.0 secondary
ip address 131.108.4.2 255.255.255.0
R1#
interface Ethernet0
ip address 131.108.1.1 255.255.255.0
R2#debug ip ospf adj
OSPF adjacency events debugging is on
R2#
OSPF: Rcv pkt from 131.108.1.1, FastEthernet0/0, area 0.0.0.1 : src not on the same network
(11)OSPF網路型別不匹配(P-TO-P 和P-TO-M網路型別在hello時間間隔相同的情況下可以建立full關係,但是會缺少一條路由可以做一下相關使用驗證
(12)NBMA (Frame Relay, X.25, SMDS, and so on)網路型別上沒有手動指定neighbor ip 地址 鄰居一直都是ATTEMPT狀態
(13)在Router 兩邊的frame-relay map/dialer map語句宣告中缺少了broadcast引數
(14)介面兩邊的MTU 不匹配
在cisco ios 12.0.3中加入了對mtu的檢測,而低於這個版本的ios會忽略mtu檢測,需要檢視router 的ios version,debug ip ospf adj的結果是發現有大量的dbd重傳,出現loading的原因就是一邊的router需要對mtu進行檢測,而一邊忽略。
R2#debug ip ospf adj
OSPF adjacency events debugging is on
R2#
OSPF: Retransmitting request to 131.108.2.1 on Serial0
OSPF: Database request to 131.108.2.1
OSPF: sent LS REQ packet to 131.108.1.1, length 12
OSPF: Retransmitting request to 131.108.2.1 on Serial0
解決方法是介面命令:mtu 4470
而不是:ip mtu 4470
這時候的狀態是 loading 。
R2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
131.108.2.1 1 LOADING/- 00:00:37 131.108.1.1 Serial0
還有一種mtu不匹配的情況是鄰居關係是EXSTART,因為兩邊的mtu都需要檢測,而mtu大小又不匹配.
R2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
131.108.2.1 1 EXSTART/- 00:00:33 131.108.1.1 Serial0
R1#debug ip ospf adj
OSPF: Retransmitting DBD to 131.108.1.2 on Serial0.1
OSPF: Send DBD to 131.108.1.2 on Serial0.1 seq 0x1E55 opt 0x2 flag 0x7 len 32
OSPF: Rcv DBD from 131.108.1.2 on Serial0.1 seq 0x22AB opt 0x2 flag 0x7 len 32 mtu 1500
state EXSTART
OSPF: Nbr 131.108.1.2 has larger interface MTU
(15)在broadcast網路上需要選舉dr,而這時候兩邊的優先順序又都是0
(16)在Asynchronous Interfaces上的OSPF鄰居關係
R1#
interface Async1
description ASYNC LINE TO R2
ip address 131.108.1.1 255.255.255.0
encapsulation ppp
async mode dedicated
dialer in-band
dialer map ip 131.108.1.2 name Router2 broadcast
dialer-group 1
ppp authentication chap
R2#
interface Async1
description ASYNC LINE TO R1
ip address 131.108.1.2 255.255.255.0
encapsulation ppp
async mode dedicated
dialer in-band
dialer map ip 131.108.1.1 name Router2 broadcast
dialer-group 1
ppp authentication chap
解決方法是在兩個使用async default routing 或者asyn dynamic routing 介面命令
(15)兩個路由器的Router id相同,ospf的master和slave關係不能確定
R2#debug ip ospf adj
OSPF: Retransmitting DBD to 131.108.2.1 on Serial0
OSPF: Send DBD to 131.108.2.1 on Serial0 seq 0x793 opt 0x2 flag 0x7 len 32
OSPF: Rcv DBD from 131.108.2.1 on Serial0 seq 0x25F7 opt 0x2 flag 0x7 len 32 mtu 0 state
EXSTART
OSPF: First DBD and we are not SLAVE
(16)因為router介面的物理問題而導致的 ospf packet checksum錯誤,接著就重傳的問題。
R2#show log
%OSPF-4-ERRRCV: Received invalid packet: Bad Checksum from 131.108.1.1, Serial0
%OSPF-4-ERRRCV: Received invalid packet: Bad Checksum from 131.108.1.1, Serial0
R2#debug ip ospf adj
OSPF adjacency events debugging is on
R2#
OSPF: Retransmitting request to 131.108.2.1 on Serial0
OSPF: Database request to 131.108.2.1
OSPF: sent LS REQ packet to 131.108.1.1, length 12
OSPF: Retransmitting request to 131.108.2.1 on Serial0
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10752019/viewspace-955273/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Windows XP 不能夠正常關機的解決方法(轉)Windows
- IE不能上網瀏覽的常見原因和解決方法
- 造成跨域的原因和解決方法跨域
- 引起索引失效的原因和解決方法索引
- 關於$ is not defined的原因和解決辦法
- Flv檔案上傳到空間後不能播放的原因和解決方法
- 粘包問題原因和解決方法
- len(),lift(),right()不能正常識別中文的解決方法 (轉)
- 路由不定時丟包原因和解決方法路由
- CentOS 7 "線纜被拔出"的原因和解決方法CentOS
- ora-371錯誤的原因和解決方法
- HCNA Routing&Switching之動態路由協議OSPF建立鄰居的條件路由協議
- Win10系統下無法開啟攝像頭不能使用的原因和解決方法Win10
- 【MySQL】Got fatal error 1236原因和解決方法MySqlGoError
- Win10系統下無線網路卡不能用的原因和解決方案Win10
- 解決關於IIS gzip不能正常啟用的問題
- Nginx502錯誤原因和解決方法總結Nginx
- 華納雲 :網站頁面訪問不了的原因和解決方法網站
- 【知識分享】伺服器ping不通的原因和解決方法伺服器
- 深度學習中“過擬合”的產生原因和解決方法深度學習
- Node子程式async/await方法不正常執行的思考和解決AI
- Mac OS X 下檔名亂碼出現的原因和解決方法Mac
- Win10系統使用chrome經常卡死的原因和解決方法Win10Chrome
- FreeBSD的磁碟和BIOS的關係(轉)iOS
- 伺服器卡的原因和解決辦法伺服器
- 報錯No bean named ' is defined的原因和解決方案Bean
- 膝上型電腦無線網路掉線的原因和解決方法
- 華納雲內部伺服器500錯誤原因和解決方法伺服器
- 硬碟資料丟失原因和解決方案/資料恢復方法硬碟資料恢復
- PRKC-1002錯誤問題原因和解決方法
- 安裝zblog提示“建立c_option.php失敗”的原因和解決辦法PHP
- cisco 和華為路由IOS升級方法路由iOS
- 香港雲伺服器不能正常關機/重啟,恆訊科技分享6點原因伺服器
- Cisco IOS 基本命令集(轉)iOS
- Win7 32位系統下看視訊花屏的原因和解決方法Win7
- Win7 32位系統下看影片破圖的原因和解決方法Win7
- Win10系統寬頻連線錯誤676的原因和解決方法Win10
- 探討寶塔切換php版本切換失敗的原因和解決方法PHP