在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. 51nod1084 矩阵取数问题 V2

    O(n4)->O(n3)妈呀为什么跑这么慢woc #include<cstdio> #include<cstring> #include<cctype> #i ...

  2. hdu 4619 Warm up 2 网络流 最小割

    题意:告诉你一些骨牌,然后骨牌的位置与横竖,这样求最多保留多少无覆盖的方格. 这样的话有人用二分匹配,因为两个必定去掉一个,我用的是最小割,因为保证横着和竖着不连通即可. #include <s ...

  3. 打印机C++

    m_prnDC.SetMapMode(MM_LOMETRIC);  m_iPrnX = m_prnDC.GetDeviceCaps(HORZRES);m_iPrnY = m_prnDC.GetDevi ...

  4. memcached内存管理及key value长度限制

    1)什么是内存碎片?内存是大小有限的资源.例如把内存比作一张小床,来了一个小伙伴,可以睡下,再来一个小伙伴也能睡下.现在两个人了,他们点了差不多的大小的位置(资源),位置还有剩下.然后再来一个小胖子, ...

  5. 想找个计算器当本命?来试试UWP应用《纸书科学计算器》

    久违了.上次在博客园发文还是4年前,正是高中参加NOIP的时候.这4年里发生了很多事,乃至再次看到过去的文章时,仿佛看到了自己也不熟悉的风景.最近很想把我的博客重新拾起来,慢慢灌溉,写一些微不足道的技 ...

  6. Typed Message模式与Event Sourcing

    引言 在<设计模式沉思录>(Pattern Hatching: Design Patterns Applied,[美]JohnVlissides著)一书的第4章中,围绕事件Message传 ...

  7. dede 首页调用单页->栏目内容

    {dede:sql sql='Select content from dede_arctype where id=47'} [field:content/] {/dede:sql}

  8. In App Purchase翻译

    一.In App Purchase概览 Store Kit代表App和App Store之间进行通信.程序将从App Store接收那些你想要提供的产品的信息,并将它们显示出来供用户购买.当用户需要购 ...

  9. phonegap 退出确认

    实现 再按一次退出  ,这里只针对 主active继承 DroidGap 或者CordovaActive 以下有2种 方案1: 重写CordovaWebView类 新建类NobackWebView p ...

  10. phonegap修改软件名称和图标

    修改app 图标 打开AndroidManifest.xml文件 修改application 节点 <application android:allowBackup="true&quo ...