OSPF加深測試

 測試編號:OSPF-4網絡

測試項目:OSPF的鄰居創建ide

測試子項目:影響OSPF鄰居創建的因素測試

測試拓撲:spa


測試過程;開啓OSPForm

測試方法1router

R5(config)#router ospf 1blog

R5(config-router)#network 172.16.5.0 0.0.0.3 ar 0 ip

R2(config)#router ospf 1backbone

R2(config-router)#network 172.16.5.0 0.0.0.3 ar 1 ci

測試1的結果:

R2#show ip ospf neighbor

 

R2#

*Mar  1 00:15:37.335: %OSPF-4-ERRRCV: Received invalid packet: mismatch area ID, from backbone area must be virtual-link but not found from 172.16.5.1, FastEthernet0/1

Area ID不一致,不能創建鄰居

 

測試方法2

R5(config)#router ospf 1

R5(config-router)#router-id 172.16.0.5

R2(config)#router ospf 1

R2(config-router)#router-id 172.16.0.5

測試2的結果:

R2#show ip ospf neighbor

 

R2#

*Mar  1 00:21:37.075: %OSPF-4-DUP_RTRID_NBR: OSPF detected duplicate router-id 172.16.0.5 from 172.16.5.1 on interface FastEthernet0/1

Router-id 重複,不能創建鄰居

 

測試方法3

R5(config)#router ospf 1

R5(config-router)#router-id 172.16.0.5

R5(config-router)#network 172.16.5.0 0.0.0.3 ar 1

R5(config-router)#area 1 stub

R2(config)#router ospf 1

R2(config-router)#router-id 172.16.0.2

R2(config-router)#network 172.16.2.0 0.0.0.3 ar 0

R2(config-router)#network 172.16.5.0 0.0.0.3 ar 1

R2(config-router)#area 2 stub

測試3的結果:

R2#show ip ospf nei

 

Neighbor ID     Pri   State           Dead Time   Address         Interface

172.16.0.1        1   FULL/DR         00:00:34    172.16.2.2      FastEthernet0/0

172.16.0.5       1   DOWN/DROTHER       -      172.16.5.1      FastEthernet0/1

R2#

*Mar  1 00:48:20.731: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.0.5 on FastEthernet0/1 from FULL to DOWN, Neighbor Down: Adjacency forced to reset

 

測試方法4

R5(config)#router ospf 1

R5(config-router)#router-id 172.16.0.5

R5(config-router)#network 172.16.5.0 0.0.0.3 ar 1

R5(config-router)#area 1 nssa

R2(config)#router ospf 1

R2(config-router)#router-id 172.16.0.2

R2(config-router)#network 172.16.2.0 0.0.0.3 ar 0

R2(config-router)#network 172.16.5.0 0.0.0.3 ar 1

R2(config-router)#area 2 nssa

測試4的結果:

R2#show ip ospf nei

 

Neighbor ID     Pri   State           Dead Time   Address         Interface

172.16.0.1        1   FULL/DR         00:00:33    172.16.2.2      FastEthernet0/0

172.16.0.5       1   DOWN/DROTHER       -      172.16.5.1      FastEthernet0/1

 

*Mar  1 00:48:20.731: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.0.5 on FastEthernet0/1 from FULL to DOWN, Neighbor Down: Adjacency forced to reset

StubNSSA配置不一致,不能創建鄰居

 

 

測試方法5

R5(config)#inter f0/0

R5(config-if)#ip add 172.16.5.1 255.255.255.240

R5(config-if)#exit

R5(config)#router ospf 1

R5(config-router)#router-id 172.16.0.5

R5(config-router)#network 172.16.5.0 0.0.0.15 ar 1

R2(config)#router ospf 1

R2(config-router)#router-id 172.16.0.2

R2(config-router)#network 172.16.5.0 0.0.0.3 ar 1

測試5的結果:

R5#show ip ospf neighbor

 

*Mar  1 01:08:35.427: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.0.2 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached

子網掩碼不一致,不能創建鄰居

 

測試方法6

R5(config)#inter f0/0

R5(config-if)#ip add 172.16.5.1 255.255.255.252

R5(config-if)#ip ospf network point-to-point

R5(config-if)#exit

R5(config)#router ospf 1

R5(config-router)#router-id 172.16.0.5

R5(config-router)#network 172.16.5.0 0.0.0.3ar 1

R2(config)#interface FastEthernet0/1

R2(config-if)#ip address 172.16.5.2 255.255.255.252

R2(config-if)#ip ospf network broadcast

R2(config-if)#exit

R2(config)#router ospf 1

R2(config-router)#router-id 172.16.0.2

R2(config-router)#network 172.16.5.0 0.0.0.3 ar 1

測試6的結果:

R5#show ip ospf neighbor

 

Neighbor ID     Pri   State           Dead Time   Address         Interface

172.16.0.2        0   FULL/  -        00:00:34    172.16.5.2      FastEthernet0/0

 

R2# show ip ospf neighbor

 

Neighbor ID     Pri   State           Dead Time   Address         Interface

172.16.0.1        1   FULL/DR         00:00:34    172.16.2.2      FastEthernet0/0

172.16.0.5        1   FULL/DR         00:00:30    172.16.5.1      FastEthernet0/1

 

點對點類型與廣播類型,能夠創建鄰居

 

測試方法7

R5(config)#inter f0/0

R5(config-if)#ip add 172.16.5.1 255.255.255.252

R5(config-if)#ip ospf network point-to-point

R5(config-if)#exit

R5(config)#router ospf 1

R5(config-router)#router-id 172.16.0.5

R5(config-router)#network 172.16.5.0 0.0.0.3ar 1

R2(config)#interface FastEthernet0/1

R2(config-if)#ip address 172.16.5.2 255.255.255.252

R2(config-if)#ip ospf network non-broadcast

R2(config-if)#exit

測試7的結果:

R2#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface

172.16.0.1        1   FULL/DR         00:00:35    172.16.2.2      FastEthernet0/0

 

點對點類型與非廣播類型,不能夠創建鄰居

 

測試方法8

R5(config)#inter f0/0

R5(config-if)#ip add 172.16.5.1 255.255.255.252

R5(config-if)#ip ospf network point-to-point

R5(config-if)#exit

R5(config)#router ospf 1

R5(config-router)#router-id 172.16.0.5

R5(config-router)#network 172.16.5.0 0.0.0.3ar 1

R2(config)#interface FastEthernet0/1

R2(config-if)#ip address 172.16.5.2 255.255.255.252

R2(config-if)# ip ospf network point-to-multipoint

R2(config-if)#exit

測試8的結果:

 

 

*Mar  1 01:42:18.663: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.0.5 on FastEthernet0/1 from FULL to DOWN, Neighbor Down: Interface down or detached

 

點對點類型與點對多點類型,不能夠創建鄰居

測試方法9

R5(config)#inter f0/0

R5(config-if)#ip add 172.16.5.1 255.255.255.252

R5(config-if)#ip ospf network broadcast

R5(config-if)#exit

R5(config)#router ospf 1

R5(config-router)#router-id 172.16.0.5

R5(config-router)#network 172.16.5.0 0.0.0.3ar 1

R2(config)#interface FastEthernet0/1

R2(config-if)#ip address 172.16.5.2 255.255.255.252

R2(config-if)#ip ospf network point-to-multipoint

R2(config-if)#exit

測試9的結果:

R5#show ip ospf nei

 

Neighbor ID     Pri   State           Dead Time   Address         Interface

172.16.0.2        1   FULL/BDR        00:00:03    172.16.5.2      FastEthernet0/0

R2#show ip ospf nei

 

Neighbor ID     Pri   State           Dead Time   Address         Interface

172.16.0.1        1   FULL/DR         00:00:34    172.16.2.2      FastEthernet0/0

172.16.0.5        0   FULL/  -        00:00:03    172.16.5.1      FastEthernet0/1

 

廣播多路訪問類型與點對多點類型,能夠創建鄰居

 

point-to-point 點對點類型

point-to-multipoint 點對多點類型

broadcast 廣播多路訪問類型

non-broadcast 非廣播多路訪問類型

 

網絡類型不一致,有可能創建鄰居

測試方法10

R5(config)#inter f0/0

R5(config-if)#ip ospf hello-interval 2

R2(config)#interface FastEthernet0/1

R2(config-if)#ip ospf hello-interval 1

測試10的結果:

R5#show ip ospf neighbor

 

*Mar  1 02:05:12.279: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.0.2 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired

 

Hello時間不一致,不能創建鄰居

Hello時間<1-65535>s

 

測試方法11

R5(config)#inter f0/0

R5(config-if)# ip ospf dead-interval 10

R2(config)#interface FastEthernet0/1

R2(config-if)# ip ospf dead-interval 15

測試11的結果:

R5#show ip ospf neighbor

 

*Mar  1 02:19:00.255: %OSPF-5-ADJCHG: Process 1, Nbr 172.16.0.2 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Dead timer expired

 

死亡時間不一致,不能創建鄰居

死亡時間<1-65535>s

 

預期結果:常見OSPF鄰居不能創建的緣由

(1)       Area ID不一致;Router-id 重複

(2)       StubNSSA配置不一致

(3)       子網掩碼不一致

(4)       網絡類型不一致

(5)       Hello時間、Down時間不一致

(6)       DR選舉問題

(7)       MTU不一致

(8)       OSPF鄰居認證問題

測試結果:

(1)    Area ID不一致;Router-id 重複

(2)    StubNSSA配置不一致

(3)    子網掩碼不一致

(4)    Hello時間、Down時間不一致

(5)    DR選舉問題

(6)    MTU不一致

(7)    OSPF鄰居認證問題

相關文章
相關標籤/搜索