虛鏈路:
1.指一條經過一個非骨幹區域鏈接到骨幹區域的鏈路
虛鏈路的目的:
1.經過一個非骨幹區域鏈接一個區域到骨幹區域
2.經過一個非骨幹區域鏈接一個分段的骨幹區域
配置虛鏈路的規則及特色:
1.虛鏈路必須配置在兩臺ABR路由器之間
2.傳送區域不能是一個末梢區域
3.虛鏈路的穩定性取決於其通過的區域的穩定性
4.虛鏈路有助於提供邏輯冗餘網絡
實驗開始以前首先往GNS3中拖入四臺路由器和兩臺PC機,並進行實驗拓撲圖規劃。ide
R1
f0/0:192.168.10.1/24
f0/1:192.168.20.1/24
R2
f0/0:192.168.20.2/24
f0/1:192.168.30.1/24
R3
f0/0:192.168.30.2/24
f0/1:192.168.40.1/24
R4
f0/0:192.168.40.2/24
f0/1:192.168.50.1/24
PC1:192.168.10.2/24
PC2:192.168.50.2/24
實驗拓撲圖3d
R1路由器:router
conf t //進入全局模式
int f0/0 //進入f0/0接口
ip add 192.168.10.1 255.255.255.0 //配置IP地址
no shut //啓動配置
ex //退出
int f0/1 //進入f0/1接口
ip add 192.168.20.1 255.255.255.0 //配置IP地址
no shut //啓動配置
ex //退出
int lo 0
ip add 1.1.1.1 255.255.255.255 //配置路由器IP地址
no shut //啓動配置
ex //退出
router ospf 1 //配置ospf動態路由
router-id 1.1.1.1 //宣告路由器IP地址
network 192.168.10.0 0.0.0.255 area 2 //宣告主網絡號
network 192.168.20.0 0.0.0.255 area 2 //宣告主網絡號
do show ip route //查看路由表
R2路由器:
conf t //進入全局模式
int f0/0
ip add 192.168.20.2 255.255.255.0
no shut
ex
int f0/1
ip add 192.168.30.1 255.255.255.0
no shut
ex
int lo 0
ip add 2.2.2.2 255.255.255.255
no shut
ex
router ospf 1
router-id 2.2.2.2
network 192.168.20.0 0.0.0.255 area 2
network 192.168.30.0 0.0.0.255 area 1
do show ip route
R3路由器:
conf t //進入全局模式
int f0/0
ip add 192.168.30.2 255.255.255.0
no shut
ex
int f0/1
ip add 192.168.40.1 255.255.255.0
no shut
ex
int lo 0
ip add 4.4.4.4 255.255.255.255
no shut
ex
router ospf 1
router-id 3.3.3.3
network 192.168.30.0 0.0.0.255 area 1
network 192.168.40.0 0.0.0.255 area 0
do show ip route
R4路由器:
conf t //進入全局模式
int f0/0
ip add 192.168.40.2 255.255.255.0
no shut
ex
int f0/1
ip add 192.168.50.1 255.255.255.0
no shut
ex
int lo 0
ip add 4.4.4.4 255.255.255.255
no shut
ex
router ospf 1
router-id 4.4.4.4
network 192.168.40.0 0.0.0.255 area 2
network 192.168.50.0 0.0.0.255 area 2
do show ip route
PC機IP地址設置
PC1:ip 192.168.10.2 192.168.10.1 //配置PC1IP地址
PC2:ip 192.168.50.2 192.168.50.1 //配置PC2IP地址
ping 192.168.10.2 用PC2pingPC1
固然此時是ping不通的blog
OSPF虛鏈路配置
router ospf 1
area 1 virtual-link 3.3.3.3
router ospf 1
area 1 virtual-link 2.2.2.2
ping 192.168.50.2 //使用PC1pingPC2
此時就能夠拼通了。接口