侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

OSPF虚拟链路实验

2023-02-14 星期二 / 0 评论 / 0 点赞 / 57 阅读 / 3148 字

实验OSPF虚拟链路当非主干区域不能直接和主干区域相连的情况下,需要通过中间的过度区域建立虚拟连接。在ABR之间建立,使用对方的route-ID 做标识。配置思路:1、 配置ip地址2、 配置os

.


实验OSPF虚拟链路
当非主干区域不能直接和主干区域相连的情况下,需要通过中间的过度区域建立虚拟连接。在ABR之间建立,使用对方的route-ID 做标识。
配置思路:
1、 配置ip地址
2、 配置ospf路由
3、 配置虚拟链路
4、 查看路由验证结果

R0配置参考
Router #conf t
Router(config)#hostname R0
R0(config)#interface FastEthernet0/0
R0(config-if)#ip address 200.1.1.1 255.255.255.0
R0(config-if)#no shutdown
R0(config-if)#exit
R0(config)#interface loopback 0
R0(config-if)#ip add 192.168.1.1 255.255.255.0
R0(config-if)#exit

配置OSPF路由
R0(config)#router ospf 1
R0(config-router)#network 192.168.1.0 0.0.0.255 area 0
R0(config-router)#network 200.1.1.0 0.0.0.255 area 1
R0(config-router)#end
R0#show ip route
C 192.168.1.0/24 is directly connected, Loopback0
C 200.1.1.0/24 is directly connected, FastEthernet0/0
O 200.1.2.0/24 [110/2] via 200.1.1.2, 00:00:14, FastEthernet0/0
查看路由没有区域2的路由条目

R0#show ip protocols 查看router-ID

Router ID 192.168.1.1
R0#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R0(config)#router ospf 1
R0(config-router)#area 1 virtual-link 172.16.1.1
R0(config-router)#end
R0#
R0#show ip route
172.16.0.0/32 is subnetted, 1 subnets
O IA 172.16.1.1 [110/3] via 200.1.1.2, 00:00:00, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Loopback0
C 200.1.1.0/24 is directly connected, FastEthernet0/0
O 200.1.2.0/24 [110/2] via 200.1.1.2, 00:03:13, FastEthernet0/0

R1配置参考
Router>
Router>en
Router#conf t
Router(config)#hostname R1

R1(config)#interface FastEthernet0/0
R1(config-if)#ip address 200.1.1.2 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface FastEthernet0/1
R1(config-if)#ip address 200.1.2.1 255.255.255.0
R1(config-if)#no shutdown

R1(config-if)#
R1(config-if)#exit
R1(config)#router ospf 1
R1(config-R1)#network 200.1.1.0 0.0.0.255 area 1
R1(config-R1)#network 200.1.2.0 0.0.0.255 area 1
R1(config-R1)#

R2配置参考

Router>enable
Router#configure terminal
Router(config)#hostname R2

Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 200.1.2.2 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface loopback 0
Router(config-if)#ip add 172.16.1.1 255.255.255.0
Router(config-if)#exit
R2(config)#router ospf 1
R2(config-router)#network 172.16.1.0 0.0.0.255 area 2
R2(config-router)#network 200.1.2.0 0.0.0.255 area 1
R2#show ip protocols 查看ROUTER-ID

Routing Protocol is "ospf 1"
Router ID 172.16.1.1

配置虚拟链路
R2#conf t
R2(config)#router ospf 1
R2(config-router)#area 1 virtual-link 192.168.1.1

.

广告 广告

评论区