学习啦 > 学习电脑 > 网络知识 > 路由器 > 路由器设置 > cisco思科 > cisco怎么配置OSPF虚链路

cisco怎么配置OSPF虚链路

时间: 权威724 分享

cisco怎么配置OSPF虚链路

  cisco公司已成为公认的全球网络互联解决方案的领先厂商,该公司出产的一系列路由器更是引领全球,那么你知道cisco怎么配置OSPF虚链路吗?下面是学习啦小编整理的一些关于cisco怎么配置OSPF虚链路的相关资料,供你参考。

  cisco配置OSPF虚链路的方法

  这个配置将验证一个OSPF虚电路(Virtual-Link)的过程,重点在观察虚链路连接的临时网络与正常区域间路由有何区别。上图中区域4(area 4)没有和area 0直接相连。在R2与R3之间配置了一条虚链路。

  // R1 //

  int lo0

  ip ad 1.1.1.1 255.255.255.0

  int e0

  ip ad 192.1.1.1 255.255.255.0

  router os 1

  network 192.1.1.0 0.0.0.255 area 0

  // R2 //

  int lo0

  ip ad 2.2.2.2 255.255.255.0

  int e0

  ip ad 192.1.1.2 255.255.255.0

  int e1

  ip ad 193.1.1.2 255.255.255.0

  router os 1

  network 192.1.1.0 0.0.0.255 area 0

  network 193.1.1.0 0.0.0.255 area 1

  // R3 //

  int lo0

  ip ad 3.3.3.3 255.255.255.0

  int e1

  ip ad 193.1.1.3 255.255.255.0

  int e0

  ip ad 194.1.1.3 255.255.255.0

  router os 1

  network 193.1.1.0 0.0.0.255 area 1

  network 194.1.1.0 0.0.0.255 area 4

  // R4 //

  int lo0

  ip ad 4.4.4.4 255.255.255.0

  int e0

  ip ad 194.1.1.4 255.255.255.0

  router os 1

  network 194.1.1.0 0.0.0.255 area 4

  基本配置完成后,我们在每台路由器上分别来验证一下:

  r1#sh ip os nei

  Neighbor ID Pri State Dead Time Address Interface

  2.2.2.2 1 FULL/BDR 00:00:33 192.1.1.2 Ethernet0/0

  r1#

  r1#sh ip ro

  1.0.0.0/24 is subnetted, 1 subnets

  C 1.1.1.0 is directly connected, Loopback0

  O IA 193.1.1.0/24 [110/20] via 192.1.1.2, 00:00:19, Ethernet0/0

  C 192.1.1.0/24 is directly connected, Ethernet0/0

  //注意R1上有关于193.1.1.0的路由条目,是属于IA类型(域间路由)

  r2#sh ip os nei

  Neighbor ID Pri State Dead Time Address Interface

  1.1.1.1 1 FULL/DR 00:00:35 192.1.1.1 Ethernet0/0

  3.3.3.3 1 FULL/BDR 00:00:35 193.1.1.3 Ethernet1/0

  r2#

  r2#

  r2#sh ip ro

  2.0.0.0/24 is subnetted, 1 subnets

  C 2.2.2.0 is directly connected, Loopback0

  C 193.1.1.0/24 is directly connected, Ethernet1/0

  C 192.1.1.0/24 is directly connected, Ethernet0/0

  r3#sh ip os nei

  Neighbor ID Pri State Dead Time Address Interface

  2.2.2.2 1 FULL/DR 00:00:32 193.1.1.2 Ethernet1/0

  4.4.4.4 1 FULL/DR 00:00:34 194.1.1.4 Ethernet0/0

  r3#sh ip ro

  3.0.0.0/24 is subnetted, 1 subnets

  C 3.3.3.0 is directly connected, Loopback0

  C 193.1.1.0/24 is directly connected, Ethernet1/0

  O IA 192.1.1.0/24 [110/20] via 193.1.1.2, 00:02:49, Ethernet1/0

  C 194.1.1.0/24 is directly connected, Ethernet0/0

  //注意R3中有关于192.1.1.0的路由是属于IA类型(域间路由)

  r4#sh ip os nei

  Neighbor ID Pri State Dead Time Address Interface

  3.3.3.3 1 FULL/BDR 00:00:33 194.1.1.3 Ethernet0/0

  r4#sh ip ro

  4.0.0.0/24 is subnetted, 1 subnets

  C 4.4.4.0 is directly connected, Loopback0

  C 194.1.1.0/24 is directly connected, Ethernet0/0

  //R4上没有关于AREA 0内的任何路由信息

  我们下面在R2、R3上添加Virtual-link的配置:

  R2:

  router os 1

  area 1 virtual-link 3.3.3.3

  R3:

  router os 1

  area 1 virtual-link 2.2.2.2

  对比之前的路由信息,看有何区别:

  r1#sh ip ro

  1.0.0.0/24 is subnetted, 1 subnets

  C 1.1.1.0 is directly connected, Loopback0

  O IA 193.1.1.0/24 [110/20] via 192.1.1.2, 00:00:01, Ethernet0/0

  C 192.1.1.0/24 is directly connected, Ethernet0/0

  O IA 194.1.1.0/24 [110/30] via 192.1.1.2, 00:00:01, Ethernet0/0

  //多了一条194网段的路由,类型IA(区域间)

  r2#sh ip ro

  2.0.0.0/24 is subnetted, 1 subnets

  C 2.2.2.0 is directly connected, Loopback0

  C 193.1.1.0/24 is directly connected, Ethernet1/0

  C 192.1.1.0/24 is directly connected, Ethernet0/0

  O IA 194.1.1.0/24 [110/20] via 193.1.1.3, 00:00:06, Ethernet1/0

  //多了一条194网段路由,类型为IA(区域间)

  r3#sh ip ro

  3.0.0.0/24 is subnetted, 1 subnets

  C 3.3.3.0 is directly connected, Loopback0

  C 193.1.1.0/24 is directly connected, Ethernet1/0

  O 192.1.1.0/24 [110/20] via 193.1.1.2, 00:02:56, Ethernet1/0

  C 194.1.1.0/24 is directly connected, Ethernet0/0

  //R3的192路由原本为IA类型(区域间),现在转为O类型(区域内),说明R3认为自已与192网段是直连的。虚链路相当于将R3直接连接了AREA 0 与 AREA 4区域

  r4#sh ip ro

  4.0.0.0/24 is subnetted, 1 subnets

  C 4.4.4.0 is directly connected, Loopback0

  O IA 193.1.1.0/24 [110/20] via 194.1.1.3, 00:03:40, Ethernet0/0

  O IA 192.1.1.0/24 [110/30] via 194.1.1.3, 00:03:25, Ethernet0/0

  C 194.1.1.0/24 is directly connected, Ethernet0/0

  //R4上192路由类型IA(区域间)

  最后我们将虚链路效果再与正常连接方式进行一下比对,如下图:

  验证如下:

  r1#sh ip ro

  1.0.0.0/24 is subnetted, 1 subnets

  C 1.1.1.0 is directly connected, Loopback0

  O IA 193.1.1.0/24 [110/20] via 192.1.1.2, 00:00:41, Ethernet0/0

  C 192.1.1.0/24 is directly connected, Ethernet0/0

  C 192.2.2.0/24 is directly connected, Ethernet1/0

  O IA 194.1.1.0/24 [110/20] via 192.2.2.4, 00:00:39, Ethernet1/0

  r2#sh ip ro

  2.0.0.0/24 is subnetted, 1 subnets

  C 2.2.2.0 is directly connected, Loopback0

  C 193.1.1.0/24 is directly connected, Ethernet1/0

  C 192.1.1.0/24 is directly connected, Ethernet0/0

  O 192.2.2.0/24 [110/20] via 192.1.1.1, 00:01:04, Ethernet0/0

  O IA 194.1.1.0/24 [110/30] via 192.1.1.1, 00:00:03, Ethernet0/0

  r2#

  r3#sh ip ro

  3.0.0.0/24 is subnetted, 1 subnets

  看过文章“cisco怎么配置OSPF虚链路”的人还看了:

  1.cisco思科路由器设置

  2.思科路由器基本配置教程

  3.Cisco(思科)新手之路由器连接

  4.思科路由器怎么进入 思科路由器怎么设置

  5.如何查看Cisco路由器的配置信息

  6.思科路由器控制端口连接图解

  7.如何cisco路由器更加安全

  8.cisco怎么进端口

  9.cisco ip设置

  10.cisco如何看未接来电

564951