虚链路:
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
此时就能够拼通了。接口