BSCI--Lab2 OSPF

BSCI 之
LAB2 ---OSPF for Multiple Areas and Frame Relay Nonbroadcast
 
 
配置多區域的OSPF
目標
 ·回顧OSPF網絡類型
 ·對OSPF進行配置
 ·驗證OSPF鄰居和ROUTER ID
 ·瞭解虛擬鏈路在OSPF中的作用
 ·設置設置虛擬鏈路
 ·驗證端到端連接
 
實驗開始之前要記得OSPF網絡類型之中,Broadcast類型的鄰居是自動發現的,而Nonbroadcast類型的鄰居是必須要手動配置的。
本次實驗用到四個7200Router 以及一個點到點的幀中繼網絡。
 
Router(config)#router ospf process-id    //在路由器啓用OSPF進程
 
Router(config-router)#network network_address  [wildcard_mask] area number               //通告網段,並說明屬於哪個區域
 
Router(config-router)#neighbor  ip_address  //在非廣播網絡中手動配置鄰居
Router(config-if)#ip ospf priority 0   //禁止路由器接口參加DR選舉
 
 
OK,那麼開始實驗
 
各個路由器的配置如下:
 
R1#conf term
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#router ospf 1
R1(config-router)#network 10.1.1.0 0.0.0.255 area 0
R1(config-router)#network 10.1.2.0 0.0.0.255 area 0
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
R1(config-router)#neighbor 10.1.1.2
R1(config-router)#exit
1#show ip ospf int s1/0
Serial1/0 is up, line protocol is up
  Internet Address 10.1.1.1/24, Area 0
  Process ID 1, Router ID 1.1.1.1, Network Type NON_BROADCAST, Cost: 64
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 1.1.1.1, Interface address 10.1.1.1
  No backup designated router on this network
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:23
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 0
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)
R1#R1#conf term
 
 
 
R2的配置
 
R2(config)#int s2/0
R2(config-if)#ip ospf priority 0
R2(config-if)#exit
R2(config)#router ospf 1
R2(config-router)#network 10.1.1.0 0.0.0.255 area 0
R2(config-router)#network 172.16.1.0 0.0.0.255 area 1
R2(config-router)#
R2(config-router)#net
*Mar 20 20:03:29.163: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on Serial2/0 from LOADING to FULL, Loading Done
R2(config-router)#network 172.16.1.0 0.0.0.255 area 1
R2(config-router)#network 2.2.2.2 0.0.0.0 area 0
R2(config-router)#end
R2#
R2#
R2#show ip ospf int s2/0
Serial2/0 is up, line protocol is up
  Internet Address 10.1.1.2/24, Area 0
  Process ID 1, Router ID 2.2.2.2, Network Type NON_BROADCAST, Cost: 64
  Transmit Delay is 1 sec, State DROTHER, Priority 0
  Designated Router (ID) 1.1.1.1, Interface address 10.1.1.1
  No backup designated router on this network
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:19
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 1.1.1.1  (Designated Router)
  Suppress hello for 0 neighbor(s)
R2#
R2#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           1   FULL/DR         00:01:46    10.1.1.1        Serial2/0
R2#
 
 
 
R3配置
 
R3>en
R3#conf term
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#router ospf 1
R3(config-router)#network 172.16.1.0 0.0.0.255 area 1
R3(config-router)#
*Mar 20 20:08:20.915: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on FastEthernet0/0 from LOADING to FULL, Loading Done
R3(config-router)#network 192.168.1.0 0.0.0.255 area 2
R3(config-router)#network 3.3.3.3 0.0.0.0 area 1
R3(config-router)#end
R3#show ip
*Mar 20 20:14:53.371: %SYS-5-CONFIG_I: Configured from console by console
R3#show ip ospf interface  fa0/0
FastEthernet0/0 is up, line protocol is up
  Internet Address 172.16.1.3/24, Area 1
  Process ID 1, Router ID 192.168.1.3, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State BDR, Priority 1
  Designated Router (ID) 2.2.2.2, Interface address 172.16.1.2
  Backup Designated router (ID) 192.168.1.3, Interface address 172.16.1.3
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:03
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 2.2.2.2  (Designated Router)
  Suppress hello for 0 neighbor(s)
R3#
R3#
R3#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/DR         00:00:33    172.16.1.2      FastEthernet0/0
R3#
 
 
R4配置
 

R4>
R4>en
R4#
R4#
R4#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R4(config)#router ospf 1
R4(config-router)#network 192.168.1.0 0.0.0.255 area 2
R4(config-router)#network 4.4.4.4 0.0.0.0 area
*Mar 20 20:17:22.227: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.3 on GigabitEthernet1/0 from LOADING to FULL, Loading Done
R4(config-router)#network 4.4.4.4 0.0.0.0 area 2
 
 
 
 
到這裏的時候,要開始進行虛擬鏈路的配置,否則區域2沒法跟區域0聯繫。
區域2要配置命令來穿越區域1。
Router(config-router)# area number virtual-link route-id  //生成一條從路由器到區域0的虛鏈路。
注意:此命令必須要在虛鏈路兩端進行配置。
number號是爲了到達區域0而必須穿越的區域號;
router-id是虛鏈路另一端的路由器的Router ID。
 
首先對R2配置:
R2(config)#router ospf 1
R2(config-router)#area 1 virtual-link 3.3.3.3
R2(config-router)#end
 
接着配置R3:
R3(config)#router ospf 1
R3(config-router)#area 1 virtual-link 2.2.2.2
R3(config-router)#end
 
SHOW一下看看是否成功:
 
R3#SHOW IP OSPF VIRtual-links
Virtual Link OSPF_VL0 to router 2.2.2.2 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 1, via interface FastEthernet0/0, Cost of using 1
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:06
 
 
 
Summary:
 ·Reviewing OSPF network types
 ·Configuring OSPF
 ·Verifying OSPF neighbors and router IDs
 ·Verifying OSPF neighbors and router IDs
 ·Describing the need for virtual link
 ·Configuring virtual links
 ·Verifying end-to-end connectivity
 
 
後記:
 
       有一次配置這個實驗的時候,遇到一個很奇怪的問題,就是配置好虛鏈路之後,在R2上面顯示該鏈路是DOWN,而在R3上面顯示是UP的。
下面是用來分析的錯誤信息:
R2#
*Mar 20 20:53:07.727: %OSPF-4-ERRRCV: Received invalid packet: mismatch area ID, from backbone area must be virtual-link but not found from 172.16.1.3, Ethernet1/1
 
R3#show ip ospf virtual-links
Virtual Link OSPF_VL0 to router 2.2.2.2 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 1, via interface FastEthernet0/0, Cost of using 1
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:08
 
一開始不知道該怎麼解決,在R2和R3上重新配置一次鏈路,還是顯示這個信息,然後又SHOW 了一下R2的OSPF鄰居,居然顯示的是R3的192.168.1.3接口,估計是當初最初沒有配置R3的迴環接口,這樣即使後來配置了也是沒用。又想起鄰居有生存時間間隔比較短暫,於是把R3關閉了,過了一會再重啓,這樣R2就能夠重新學習到鄰居,於是問題也就解決了。  
拓撲圖如下:
(注:接口與實際接口不同,圖片作爲結構圖參考)
 
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章