OSPF虛鏈路配置實例


如下圖示:

實驗目標:
R1的Loopback0能與R4的Loopback0能互通。
實驗環境:
1.R1和R2相接為Area0。
2.R2和R3相接為Area1。
3.R3和R4相接為Area2。
解決方法:在R2和R3之間通過虛鏈路技術搭一條邏輯通道,此彼此路由器分享其路由。

R1:
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
interface FastEthernet0/0
 ip address 12.1.1.1 255.255.255.0
 no sh
router ospf 1
 router-id 1.1.1.1
 network 1.1.1.1 0.0.0.0 area 0
 network 12.1.1.0 0.0.0.255 area 0

R2:
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
interface FastEthernet0/0
 ip address 12.1.1.2 255.255.255.0
 no sh
interface FastEthernet0/1
 ip address 23.1.1.2 255.255.255.0
 no sh
router ospf 1
 router-id 2.2.2.2
 area 1 virtual-link 3.3.3.3      //在R2和R3(ABR)之間,建立一條邏輯的連接通道,讓彼此路由器分享其對方。
 network 2.2.2.2 0.0.0.0 area 1   
 network 12.1.1.0 0.0.0.255 area 0
 network 23.1.1.0 0.0.0.255 area 1

R3:
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
interface FastEthernet0/0
 ip address 34.1.1.3 255.255.255.0
 no sh
interface FastEthernet0/1
 ip address 23.1.1.3 255.255.255.0
 no sh
router ospf 1
 router-id 3.3.3.3
 area 1 virtual-link 2.2.2.2        //同上說法。
 network 3.3.3.3 0.0.0.0 area 1
 network 23.1.1.0 0.0.0.255 area 1
 network 34.1.1.0 0.0.0.255 area 2    

R4:
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
interface FastEthernet0/0
 ip address 34.1.1.4 255.255.255.0
 no sh
router ospf 1
 router-id 4.4.4.4
 network 4.4.4.4 0.0.0.0 area 2
 network 34.1.1.0 0.0.0.255 area 2

R2(config-router)#do show ip ospf vir
Virtual Link OSPF_VL0 to router 3.3.3.3 is up  //這個位置的”UP”不表代鄰接關系建立起來,而要看下圖的鄰接關系是否建立成功。
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 1, via interface FastEthernet0/1, Cost of using 10
  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
    Adjacency State FULL (Hello suppressed)  //此時代表鄰接關系建立,虛鏈路才真正開始工作
    Index 2/3, retransmission queue length 0, number of retransmission 0
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 0, maximum is 0
    Last retransmission scan time is 0 msec, maximum is 0 msec

R1#ping 4.4.4.4

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/46/52 ms

R4#ping 1.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/60/92 ms

R2(config-router)#do show ip ospf ne

Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           0   FULL/  -           -        23.1.1.3        OSPF_VL0
1.1.1.1           1   FULL/DR         00:00:38    12.1.1.1        FastEthernet0/0
3.3.3.3           1   FULL/DR         00:00:34    23.1.1.3        FastEthernet0/1

R3(config-router)#do show ip ospf ne

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           0   FULL/  -           -        23.1.1.2        OSPF_VL0
2.2.2.2           1   FULL/BDR        00:00:32    23.1.1.2        FastEthernet0/1
4.4.4.4           1   FULL/BDR        00:00:30    34.1.1.4        FastEthernet0/0

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM