在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. design pattern及其使用

    什么是设计模式? design pattern是一个通用的,可以被重用的关于一个常见的问题的解决方案. 为什么要用设计模式? 引入设计模式的理论基础非常简单.我们每天都会碰到问题.我们可能碰到决定使用 ...

  2. [ionic开源项目教程] - 第4讲 通Service层获取数据列表

    第4讲:通Service层获取数据列表 上一讲中页面的基本架构已完成,这一讲介绍如何通过service层从服务器请求数据,在通过controller层为载体,显示到视图层. 1.在services.j ...

  3. HDU 2516 (Fabonacci Nim) 取石子游戏

    这道题的结论就是,石子的个数为斐波那契数列某一项的时候,先手必败:否则,先手必胜. 结论很简单,但是证明却不是特别容易.找了好几篇博客,发现不一样的也就两篇,但是这两篇给的证明感觉证得不清不楚的,没看 ...

  4. kafka_2.9.2-0.8.1.1分布式集群搭建代码开发实例

    准备3台虚拟机, 系统是RHEL64服务版. 1) 每台机器配置如下:$ cat /etc/hosts    # zookeeper hostnames:       192.168.8.182    ...

  5. MVC+Ef项目(4) 抽象业务逻辑层BLL层

    接下来,我们就要到业务逻辑层了,简单的说,业务逻辑层就是调用Repository(可以看做是DAL数据库访问层) 先来看看项目的架构 我们现在就开始来做BLL层.  同样,先编写  UserInfoS ...

  6. 抛出自定义异常,spring AOP事务不回滚的解决方案

    spring AOP 默认对RuntimeException()异常或是其子类进行事务回滚,也就是说 事务回滚:throw new RuntimeException("xxxxxxxxxxx ...

  7. Python [Leetcode 141]Linked List Cycle

    题目描述: Given a linked list, determine if it has a cycle in it. 解题思路: 快的指针和慢的指针 代码如下: # Definition for ...

  8. 【英语】Bingo口语笔记(34) - Hit系列

    hit it off 合得来 hit the bottle 喝醉酒 hit the spot 正合要求,恰到好处

  9. Android 高仿微信 获取最近刚刚拍照的缩略图 功能实现

    原理其实挺简单的,android 中文件 修改 增加 删除等等 都会在数据库里的某个表里记录下来,你需要的时候 只要迅速的去查找这个表里的值 即可得到你想要的所有信息. 实际上 如果真正理解这个表结构 ...

  10. Apache PHP 安装问题 (SUSE Linux)

    1. SUSE Linux配置命令如下: './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql' 2. 接下来 ...