在OSPF 网络中,区域0为骨干区域,其它的为非骨干区域,非骨干区域必须与骨干区域直接相连。

根据拓扑图可看到区域1与骨干区域0直接相连而区域2与骨干区域没有直接相连,这种情况下我们可以创建一条虚链路使区域2与骨干区域0直接相连。虚链路还可将不连续的区域0连接起来。

R1配置:

interface Loopback1
ip address 1.1.1.1 255.255.255.255
!
interface Serial1/1
ip address 12.12.12.1 255.255.255.0
serial restart-delay 0
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.0 0.0.0.255 area 0
network 12.12.12.0 0.0.0.255 area 0
!

R2配置:

interface Loopback1
ip address 2.2.2.2 255.255.255.0
! interface Serial1/0
ip address 12.12.12.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 23.23.23.2 255.255.255.0
serial restart-delay 0
!
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
area 1 virtual-link 4.4.4.4
network 2.2.2.0 0.0.0.255 area 0
network 12.12.12.0 0.0.0.255 area 0
network 23.23.23.0 0.0.0.255 area 1
!

R3配置:

interface Loopback1
ip address 3.3.3.3 255.255.255.255
!
interface Serial1/0
ip address 23.23.23.3 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 34.34.34.3 255.255.255.0
serial restart-delay 0
!
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.0 0.0.0.255 area 1
network 23.23.23.0 0.0.0.255 area 1
network 34.34.34.0 0.0.0.255 area 1
!

R4配置:

interface Loopback1
ip address 4.4.4.4 255.255.255.0
!
interface Serial1/0
ip address 34.34.34.4 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 45.45.45.4 255.255.255.0
serial restart-delay 0
!
router ospf 1
router-id 4.4.4.4
log-adjacency-changes
area 1 virtual-link 2.2.2.2
network 4.4.4.0 0.0.0.255 area 1
network 34.34.34.0 0.0.0.255 area 1
network 45.45.45.0 0.0.0.255 area 2
!

R5配置:

interface Loopback1
ip address 5.5.5.5 255.255.255.0
!
interface Serial1/0
ip address 45.45.45.5 255.255.255.0
serial restart-delay 0
!
router ospf 1
router-id 5.5.5.5
log-adjacency-changes
network 5.5.5.0 0.0.0.255 area 2
network 45.45.45.0 0.0.0.255 area 2
!

配置虚链路后再次查看R1的路由表,已经学到了区域2的路由:

Router#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type , N2 - OSPF NSSA external type
E1 - OSPF external type , E2 - OSPF external type
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-, L2 - IS-IS level-
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route Gateway of last resort is not set
34.0.0.0/ is subnetted, subnets
O IA 34.34.34.0 [/] via 12.12.12.2, ::, Serial1/
1.0.0.0/ is subnetted, subnets
C 1.1.1.1 is directly connected, Loopback1
2.0.0.0/ is subnetted, subnets
O 2.2.2.2 [/] via 12.12.12.2, ::, Serial1/
3.0.0.0/ is subnetted, subnets
O IA 3.3.3.3 [/] via 12.12.12.2, ::, Serial1/
4.0.0.0/ is subnetted, subnets
O IA 4.4.4.4 [/] via 12.12.12.2, ::, Serial1/
5.0.0.0/ is subnetted, subnets
O IA 5.5.5.5 [/] via 12.12.12.2, ::, Serial1/ //区域2路由
23.0.0.0/ is subnetted, subnets
O IA 23.23.23.0 [/] via 12.12.12.2, ::, Serial1/
12.0.0.0/ is subnetted, subnets
C 12.12.12.0 is directly connected, Serial1/
45.0.0.0/ is subnetted, subnets
O IA 45.45.45.0 [/] via 12.12.12.2, ::, Serial1/ //区域2路由

在末配置虚链路时查看R1的路由表,R1是学不到区域2的路由

Router#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type , N2 - OSPF NSSA external type
E1 - OSPF external type , E2 - OSPF external type
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-, L2 - IS-IS level-
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
34.0.0.0/ is subnetted, subnets
O IA 34.34.34.0 [/] via 12.12.12.2, ::, Serial1/
1.0.0.0/ is subnetted, subnets
C 1.1.1.1 is directly connected, Loopback1
2.0.0.0/ is subnetted, subnets
O 2.2.2.2 [/] via 12.12.12.2, ::, Serial1/
3.0.0.0/ is subnetted, subnets
O IA 3.3.3.3 [/] via 12.12.12.2, ::, Serial1/
4.0.0.0/ is subnetted, subnets
O IA 4.4.4.4 [/] via 12.12.12.2, ::, Serial1/
23.0.0.0/ is subnetted, subnets
O IA 23.23.23.0 [/] via 12.12.12.2, ::, Serial1/
12.0.0.0/ is subnetted, subnets
C 12.12.12.0 is directly connected, Serial1/

总结:在ospf标准配置上增加:

R2 Router-id:2.2.2.2
R4 Router-id:4.4.4.4
R2(config)#area virtual link 4.4.4.4
R4(config)#area virtual link 2.2.2.2

OSPF虚链路配置.示例1的更多相关文章

  1. OSPF虚链路配置.示例2

    先看一个拓扑图 黄色区域是area0,即骨干区域,如果如图示RT1与RT6之间的链路断了,那么会出现骨干区域被“分裂”的情况,很明显骨干区域是不能被分割开的,出现这种状况的时候可能会影响到整个自制系统 ...

  2. OSPF 虚链路

    通过配置OSPF虚链路连接到骨干区域. 实验拓扑 如图所示连接,地址规划如下: 名称 接口 IP地址 R1 f0/0 192.168.10.1/24 R1 f0/1 192.168.20.1/24 R ...

  3. OSPF Sham-Link配置示例

    在MPLS/VPN环境中,如果PE-CE之间使用OSPF交换路由信息,OSPF route将作为VPNv4 route(携带OSPF domain ID,OSPF Router ID,OSPF Rou ...

  4. 全互联结构DVPN综合配置示例

    以下内容摘自正在全面热销的最新网络设备图书“豪华四件套”之一<H3C路由器配置与管理完全手册>(第二版)(其余三本分别是:<Cisco交换机配置与管理完全手册>(第二版).&l ...

  5. 华为MSTP负载均衡配置示例

    以下内容摘自由华为公司授权并审核通过,今年元月刚刚出版上市的<华为交换机学习指南>一书:http://item.jd.com/11355972.html,http://product.da ...

  6. OSPF多区域配置;骨干区域与非骨干区域;ABR边界路由器;LSA和SPF算法

    SPF:链路状态路由算法.基本用于OSPF中,但是要求路由器路由数据库足够大,因为链路状态信息包括很多内容,这也是一个缺点. OSPF是一种内部网关协议(IGP) OSPF路由协议是一种典型的链路状态 ...

  7. Nginx 简单的负载均衡配置示例(转载)

    原文地址:Nginx 简单的负载均衡配置示例(转载) 作者:水中游于 www.s135.com 和 blog.s135.com 域名均指向 Nginx 所在的服务器IP. 用户访问http://www ...

  8. HBase + Kerberos 配置示例(二)

    接上篇<HBase + Kerberos配置示例(一)>,我们继续剩下的配置工作. 环境准备 Hadoop配置 Zookeeper配置 HBase配置 Java测试程序 环境准备 安装ha ...

  9. Haproxy的安装和配置示例

    1.ha proxy简介ha proxy是一个开源的,高性能的,基于tcp第四层和http第七层应用的负载均衡软件优点:可靠性和稳定性非常好          最高可以同时维护40000-50000个 ...

随机推荐

  1. website architecture

    如果在不仔细考虑网站架构的情况下就去做一个网站,这就像在没有规划行程前而去贸然旅行.你可能最终到了你的目的终点,但是你可能也不知道在这过程中,你已经走过了多少的弯路.做网站适用同样的道理.在开工之前, ...

  2. HDU 2084 数塔

    没什么好说的,这是我学DP的第一道题目. //#define LOCAL #include <iostream> #include <cstdio> #include < ...

  3. gcc与g++

    gcc和g++都是GNU(组织)的一个编译器. 误区一:gcc只能编译c代码,g++只能编译c++代码两者都可以,但是请注意:1.后缀为.c的,gcc把它当作是C程序,而g++当作是c++程序:后缀为 ...

  4. 2012年7月12 – 腾讯公司 WEB高级应用开发工程师 最新面试题 [转]

    笔试(45 minute):(本来是四张纸,被我弄丢了一张!无伤大雅,难度级别不会有出入) 注意:由于时间紧迫和水平有限,难免有不足或错误,请指证,虚心学习! [PHP] 写出PHP中至少5个全局变量 ...

  5. (转)Spark 算子系列文章

    http://lxw1234.com/archives/2015/07/363.htm Spark算子:RDD基本转换操作(1)–map.flagMap.distinct Spark算子:RDD创建操 ...

  6. linux VFS 内核数据结构

    <strong>简单归纳:fd只是一个整数,在open时产生.起到一个索引的作用,进程通过PCB中的文件描述符表找到该fd所指向的文件指针filp.</strong> 文件描述 ...

  7. [转]就这样,创建了自己的运行时共享库(RSL)

    原文地址:http://riaoo.com/?p=1405 博客园的下载地址(版权归原作者) http://files.cnblogs.com/tianlanliao/CustomRSL.zip 创建 ...

  8. Cadence Allegro导网表的错误问题解决

    在Allegro导入网表的时候,有时候会出现这样一个错误问题,如下: ------ Oversights/Warnings/Errors ------ #1   ERROR(SPMHNI-235): ...

  9. Java中SynchronizedMap与ConcurrentHashMap的对比

    如何使用 概述 ConcurrentHashMap: 线程安全: 其将整个Hash桶进行了分段segment,也就是将这个大的数组分成了几个小的片段segment,而且每个小的片段segment上面都 ...

  10. JS面向对象组件(三)--面向对象中的常用属性和方法

    图片的由来看下面: 1.hasOwnProperty:看是不是对象自身下面的属性 var arr = []; arr.num = ; Array.prototype.num2 = ; //所有的数组对 ...