- 论坛徽章:
- 0
|
\r\n\r\n(1)接口上没有激活ospf\r\n\r\n就是在network语句的时候没有匹配清楚,比如配置了错误的反掩码不对,在show ip ospf interface的时候不会显示你希望激活的接口\r\n\r\n使用show ip ospf interface来验证\r\n\r\n这时候的邻居表是空的\r\n>R2#show ip ospf neighbor\r\nR2# \r\n\r\n\r\n(2)物理层或者是数据链路层协议down.\r\n \r\n 使用show ip int brief 或者是 show int type nomber\r\n\r\n会导致ospf packet 封装失败。\r\n\r\n(3)建立邻居的接口被passive掉\r\n\r\n\r\nR2#show ip ospf interface Ethernet 0\r\n\r\nEthernet0 is up, line protocol is up\r\nInternet Address 131.108.1.2/24, Area 0\r\nProcess ID 1, Router ID 131.108.1.2, Network Type BROADCAST, Cost: 10\r\nTransmit Delay is 1 sec, State DR, Priority 1\r\nDesignated Router (ID) 131.108.1.2, Interface address 131.108.1.2\r\nNo backup designated router on this network\r\nTimer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5\r\nNo Hellos (Passive interface)\r\nNeighbor Count is 0, Adjacent neighbor count is 0\r\nSuppress hello for 0 neighbor(s)\r\n\r\n(4)OSPF的hello组播地址被ACL Block\r\n\r\n\r\nR1#\r\ninterface Ethernet0\r\nip address 131.108.1.1 255.255.255.0\r\nip access-group 100 in\r\n!\r\naccess-list 100 permit tcp any any\r\naccess-list 100 permit udp any any\r\naccess-list 101 permit ip 131.108.1.0 0.0.0.255 host 224.0.0.5\r\n\r\n\r\nR2#\r\ninterface Ethernet0\r\nip address 131.108.1.2 255.255.255.0\r\nip access-group 100 in\r\n!\r\naccess-list 100 permit tcp any any\r\naccess-list 100 permit udp any any\r\naccess-list 101 permit ip 131.108.1.0 0.0.0.255 host 224.0.0.5\r\n\r\n\r\nR2#debug ip packet 101 detail\r\nIP packet debugging is on (detailed) for access list 101\r\nIP: s=131.108.1.2 (Ethernet0), d=224.0.0.5, len 68, access denied, proto=89\r\n\r\n这时候的邻居关系是INIT\r\n\r\nR2#show ip ospf neighbor\r\nNeighbor ID Pri State Dead Time Address Interface\r\n131.108.2.1 1 INIT/- 00:00:33 131.108.1.1 Ethernet0\r\n\r\nR1#show access-list 101\r\nExtended IP access list 101\r\n permit ip 131.108.1.0 0.0.0.3 host 224.0.0.5 (8 matches)\r\nR1#debug ip packet 101 detail\r\nIP packet debugging is on (detailed) for access list 101\r\nR1#\r\nIP: s=131.108.1.1 (local), d=224.0.0.5 (Ethernet0), len 60, sending broad/multicast,\r\nproto\r\n=89\r\nIP: s=131.108.1.2 (Ethernet0), d=224.0.0.5, len 82, access denied, proto=89\r\nIP: s=131.108.1.1 (local), d=224.0.0.5 (Ethernet0), len 60, sending broad/multicast,\r\nproto\r\n=89\r\n\r\nIP: s=131.108.1.2 (Ethernet0), d=224.0.0.5, len 82,access denied, proto=89\r\n\r\n\r\n(5)在broadcast链路上的子网掩码不匹配\r\n\r\n(6)Hello/dead 间隔不匹配\r\n(7)认证方式或者是认证密码不匹配\r\n\r\n 使用debug ip ospf adj 来查看,可以自己使用不同的情况来验证\r\n\r\n\r\n( 两台路由器处于不同的AREA\r\n\r\nR1#debug ip ospf adj\r\nOSPF adjacency events debugging is on\r\nR1#\r\nOSPF: Rcv pkt from 131.108.1.2, Ethernet0, area 0.0.0.0\r\n mismatch area 0.0.0.1 in the header\r\n\r\nR2#show log\r\n%OSPF-4-ERRRCV: Received invalid packet: mismatch area ID, from backbone area must be\r\n virtual-link but not found from 131.108.1.1, Ethernet0\r\n(9)Stub/transit/NSSA 区域类型不匹配\r\n\r\n\r\n这个是常常不小心会被忘记的。\r\n\r\nR1#debug ip ospf adj\r\nOSPF adjacency events debugging is on\r\nR1#\r\nOSPF: Rcv hello from 131.108.0.1 area 1 from Ethernet0 131.108.1.2\r\nOSPF: Hello from 131.108.1.2 with mismatched Stub/Transit area option bit\r\n\r\nR1#debug ip ospf adj\r\nOSPF adjacency events debugging is on\r\nR1#\r\nOSPF: Rcv hello from 131.108.0.1 area 1 from Ethernet0 131.108.1.2\r\nOSPF: Hello from 131.108.1.2 with mismatched NSSA option bit\r\n\r\n\r\n(10)使用secondary IP来建立OSPF adjacency\r\n\r\nR2#\r\ninterface FastEthernet0/0\r\nip address 131.108.1.2 255.255.255.0 secondary\r\nip address 131.108.4.2 255.255.255.0\r\n\r\n\r\nR1#\r\ninterface Ethernet0\r\nip address 131.108.1.1 255.255.255.0\r\n\r\nR2#debug ip ospf adj\r\nOSPF adjacency events debugging is on\r\nR2#\r\nOSPF: Rcv pkt from 131.108.1.1, FastEthernet0/0, area 0.0.0.1 : src not on the same network\r\n\r\n(11)OSPF网络类型不匹配(P-TO-P 和P-TO-M网络类型在hello时间间隔相同的情况下可以建立full关系,但是会缺少一条路由\r\n\r\n)\r\n 可以做一下相关使用验证\r\n\r\n(12)NBMA (Frame Relay, X.25, SMDS, and so on)网络类型上没有手动指定neighbor ip 地址\r\n\r\n 邻居一直都是ATTEMPT状态\r\n\r\n(13)在Router 两边的frame-relay map/dialer map语句声明中缺少了broadcast参数\r\n\r\n\r\n这个就不要多说了吧。\r\n\r\n(14)接口两边的MTU 不匹配\r\n\r\n在cisco ios 12.0.3中加入了对mtu的检测,而低于这个版本的ios会忽略mtu检测,需要查看router 的ios version,debug ip ospf adj的结\r\n\r\n果是发现有大量的dbd重传,出现loading的原因就是一边的router需要对mtu进行检测,而一边忽略。\r\n\r\nR2#debug ip ospf adj\r\n\r\nOSPF adjacency events debugging is on\r\nR2#\r\nOSPF: Retransmitting request to 131.108.2.1 on Serial0\r\nOSPF: Database request to 131.108.2.1\r\nOSPF: sent LS REQ packet to 131.108.1.1, length 12\r\nOSPF: Retransmitting request to 131.108.2.1 on Serial0\r\n\r\n\r\n解决方法是接口命令:mtu 4470\r\n而不是:ip mtu 4470\r\n\r\n这时候的状态是 loading 。\r\n\r\nR2#show ip ospf neighbor\r\n\r\nNeighbor ID Pri State Dead Time Address Interface\r\n131.108.2.1 1 LOADING/- 00:00:37 131.108.1.1 Serial0\r\n\r\n\r\n还有一种mtu不匹配的情况是邻居关系是EXSTART,因为两边的mtu都需要检测,而mtu大小又不匹配.\r\n\r\nR2#show ip ospf neighbor\r\nNeighbor ID Pri State Dead Time Address Interface\r\n131.108.2.1 1 EXSTART/- 00:00:33 131.108.1.1 Serial0\r\n\r\nR1#debug ip ospf adj\r\nOSPF: Retransmitting DBD to 131.108.1.2 on Serial0.1\r\nOSPF: Send DBD to 131.108.1.2 on Serial0.1 seq 0x1E55 opt 0x2 flag 0x7 len 32\r\nOSPF: Rcv DBD from 131.108.1.2 on Serial0.1 seq 0x22AB opt 0x2 flag 0x7 len 32 mtu 1500\r\nstate EXSTART\r\nOSPF: Nbr 131.108.1.2 has larger interface MTU\r\n\r\n\r\n\r\n(15)在broadcast网络上需要选举dr,而这时候两边的优先级又都是0\r\n\r\n(16)在Asynchronous Interfaces上的OSPF邻居关系\r\n\r\nR1#\r\ninterface Async1\r\n description ASYNC LINE TO R2\r\n ip address 131.108.1.1 255.255.255.0\r\n encapsulation ppp\r\n async mode dedicated\r\n dialer in-band\r\n dialer map ip 131.108.1.2 name Router2 broadcast\r\n dialer-group 1\r\n ppp authentication chap\r\n\r\n\r\nR2#\r\ninterface Async1\r\n description ASYNC LINE TO R1\r\n ip address 131.108.1.2 255.255.255.0\r\n encapsulation ppp\r\n async mode dedicated\r\n dialer in-band\r\n dialer map ip 131.108.1.1 name Router2 broadcast\r\n dialer-group 1\r\n ppp authentication chap\r\n\r\n\r\n解决方法是在两个使用async default routing 或者asyn dynamic routing 接口命令\r\n\r\n\r\n\r\n(15)两个路由器的Router id相同,ospf的master和slave关系不能确定\r\n\r\nR2#debug ip ospf adj\r\nOSPF: Retransmitting DBD to 131.108.2.1 on Serial0\r\nOSPF: Send DBD to 131.108.2.1 on Serial0 seq 0x793 opt 0x2 flag 0x7 len 32\r\nOSPF: Rcv DBD from 131.108.2.1 on Serial0 seq 0x25F7 opt 0x2 flag 0x7 len 32 mtu 0 state\r\nEXSTART\r\nOSPF: First DBD and we are not SLAVE\r\n\r\n\r\n(16)因为router接口的物理问题而导致的 ospf packet checksum错误,接着就重传的问题。\r\n\r\nR2#show log\r\n%OSPF-4-ERRRCV: Received invalid packet: Bad Checksum from 131.108.1.1, Serial0\r\n%OSPF-4-ERRRCV: Received invalid packet: Bad Checksum from 131.108.1.1, Serial0\r\n\r\n\r\nR2#debug ip ospf adj\r\nOSPF adjacency events debugging is on\r\nR2#\r\n\r\nOSPF: Retransmitting request to 131.108.2.1 on Serial0\r\nOSPF: Database request to 131.108.2.1\r\nOSPF: sent LS REQ packet to 131.108.1.1, length 12\r\nOSPF: Retransmitting request to 131.108.2.1 on Serial0 |
|