linux社区爱心援助Linux认证系列教程业界动态站务新闻公司招聘建议留言网址大全LPI专题CISCO专题
设为首页
加入收藏
管理团队
JSP  
JAVA  
PERL  
 您的位置:首页 > 专题栏目 > cisco >
栏目导栏
  LPI
  cisco
资料搜索
热门文章
·关于PIX的配置及注解完全手册(
·零起点配置PIX防火墙 PIX防火墙
·零起点配置PIX防火墙 六大基本
·PIX命令集
·Pix515 防火墙配置策略实例分析
·思科PIX防火墙VPN的配置实例
·详细介绍Cisco Secure PIX 525
·使用VPN Client 简单的VPN登入
·开始使用cisco pix 防火墙(主要
·Cisco思科3550交换机配置手册
·Cisco PIX Syslog 配置说明
·某公司PIX 520防火墙系统和NAT
·pix中的七个命令
·Cisco PIX 防火墙安装指南
·CISCO PIX 防火墙及网络安全配
最新文章
·简述万兆以太网技术
·六种方式来设置路由器
·教你怎么优化TCP/IP网络
·路由器ACL实验详细过程讲解
·DHCP Snooping技术介绍
·网关无法Ping通故障及解决方法
·UDP用户数据报协议简介
·OSPF动态路由协议的路由更新机
·OSPF动态路由协议基本工作原理
·Cisco3725交换机密码破解方法
·如何制定全面的网络安全计划
·利用UNIX系统的TFTP和RCP配置路
·CCNA试验考试命令总结
·用命令行在Cisco设备上查看机框
·交换机介绍 网管必读的技术资料
Google
 
OSPF虚链路 配置实例 + 详细验证过程
[ 作者:  加入时间:2007-11-19 18:07:47  来自:Linux联盟收集整理 ]

OSPF虚链路(virtual-link)配置实例 + 详细验证过程(图一)

    这个配置将验证一个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 4qEYLinux联盟
基本配置完成后,我们在每台路由器上分别来验证一下:qEYLinux联盟
    qEYLinux联盟
    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

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

qEYLinux联盟
    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 subnetsqEYLinux联盟
    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的配置:qEYLinux联盟
    qEYLinux联盟
    R2:

    router os 1qEYLinux联盟
    qEYLinux联盟
    area 1 virtual-link 3.3.3.3

    R3:

    router os 1

      area 1 virtual-link 2.2.2.2

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

    r1#sh ip roqEYLinux联盟
       1.0.0.0/24 is subnetted, 1 subnetsqEYLinux联盟
    C       1.1.1.0 is directly connected, Loopback0qEYLinux联盟
    O IA 193.1.1.0/24 [110/20] via 192.1.1.2, 00:00:01, Ethernet0/0qEYLinux联盟
    C    192.1.1.0/24 is directly connected, Ethernet0/0qEYLinux联盟
    O IA 194.1.1.0/24 [110/30] via 192.1.1.2, 00:00:01, Ethernet0/0

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

qEYLinux联盟
    r2#sh ip ro

        2.0.0.0/24 is subnetted, 1 subnetsqEYLinux联盟
    C       2.2.2.0 is directly connected, Loopback0qEYLinux联盟
    C    193.1.1.0/24 is directly connected, Ethernet1/0qEYLinux联盟
    C    192.1.1.0/24 is directly connected, Ethernet0/0qEYLinux联盟
    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 subnetsqEYLinux联盟
    C       3.3.3.0 is directly connected, Loopback0qEYLinux联盟
    C    193.1.1.0/24 is directly connected, Ethernet1/0qEYLinux联盟
    O    192.1.1.0/24 [110/20] via 193.1.1.2, 00:02:56, Ethernet1/0qEYLinux联盟
    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 subnetsqEYLinux联盟
    C       4.4.4.0 is directly connected, Loopback0qEYLinux联盟
    O IA 193.1.1.0/24 [110/20] via 194.1.1.3, 00:03:40, Ethernet0/0qEYLinux联盟
    O IA 192.1.1.0/24 [110/30] via 194.1.1.3, 00:03:25, Ethernet0/0qEYLinux联盟
    C    194.1.1.0/24 is directly connected, Ethernet0/0

    //R4上192路由类型IA(区域间)最后我们将虚链路效果再与正常连接方式进行一下比对,如下图:

    OSPF虚链路(virtual-link)配置实例 + 详细验证过程(图二)

   验证如下:

    r1#sh ip roqEYLinux联盟
        1.0.0.0/24 is subnetted, 1 subnetsqEYLinux联盟
    C       1.1.1.0 is directly connected, Loopback0qEYLinux联盟
    O IA 193.1.1.0/24 [110/20] via 192.1.1.2, 00:00:41, Ethernet0/0qEYLinux联盟
    C    192.1.1.0/24 is directly connected, Ethernet0/0qEYLinux联盟
    C    192.2.2.0/24 is directly connected, Ethernet1/0qEYLinux联盟
    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 subnetsqEYLinux联盟
    C       2.2.2.0 is directly connected, Loopback0qEYLinux联盟
    C    193.1.1.0/24 is directly connected, Ethernet1/0qEYLinux联盟
    C    192.1.1.0/24 is directly connected, Ethernet0/0qEYLinux联盟
    O    192.2.2.0/24 [110/20] via 192.1.1.1, 00:01:04, Ethernet0/0qEYLinux联盟
    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 subnetsqEYLinux联盟
    C       3.3.3.0 is directly connected, Loopback0qEYLinux联盟
    C    193.1.1.0/24 is directly connected, Ethernet1/0qEYLinux联盟
    O IA 192.1.1.0/24 [110/20] via 193.1.1.2, 00:01:31, Ethernet1/0qEYLinux联盟
    O IA 192.2.2.0/24 [110/30] via 193.1.1.2, 00:01:15, Ethernet1/0qEYLinux联盟
    O IA 194.1.1.0/24 [110/40] via 193.1.1.2, 00:00:15, Ethernet1/0

    r4#sh ip roqEYLinux联盟
       4.0.0.0/24 is subnetted, 1 subnetsqEYLinux联盟
    C       4.4.4.0 is directly connected, Loopback0qEYLinux联盟
    O IA 193.1.1.0/24 [110/30] via 192.2.2.1, 00:00:39, Ethernet1/0qEYLinux联盟
    O    192.1.1.0/24 [110/20] via 192.2.2.1, 00:01:37, Ethernet1/0qEYLinux联盟
    C    192.2.2.0/24 is directly connected, Ethernet1/0qEYLinux联盟
    C    194.1.1.0/24 is directly connected, Ethernet0/0

    r5#sh ip ro

        5.0.0.0/24 is subnetted, 1 subnetsqEYLinux联盟
    C       5.5.5.0 is directly connected, Loopback0qEYLinux联盟
    O IA 193.1.1.0/24 [110/40] via 194.1.1.4, 00:00:52, Ethernet0/0qEYLinux联盟
    O IA 192.1.1.0/24 [110/30] via 194.1.1.4, 00:00:52, Ethernet0/0qEYLinux联盟
    O IA 192.2.2.0/24 [110/20] via 194.1.1.4, 00:00:52, Ethernet0/0qEYLinux联盟
    C    194.1.1.0/24 is directly connected, Ethernet0/0 如果上述方式还不容易理解,你也可以将virtual-link可以想象成:将R2与R3合并成一台路由器,如下图:qEYLinux联盟
    qEYLinux联盟
    OSPF虚链路(virtual-link)配置实例 + 详细验证过程(图三)qEYLinux联盟
    qEYLinux联盟
    r1#sh ip ro

         1.0.0.0/24 is subnetted, 1 subnetsqEYLinux联盟
    C       1.1.1.0 is directly connected, Loopback0qEYLinux联盟
    O IA 193.1.1.0/24 [110/20] via 192.1.1.2, 00:00:57, Ethernet0/0qEYLinux联盟
    C    192.1.1.0/24 is directly connected, Ethernet0/0qEYLinux联盟
    O IA 194.1.1.0/24 [110/74] via 192.1.1.2, 00:00:24, Ethernet0/0

    r2#sh ip ro

         2.0.0.0/24 is subnetted, 1 subnetsqEYLinux联盟
    C       2.2.2.0 is directly connected, Loopback0qEYLinux联盟
    C    193.1.1.0/24 is directly connected, Ethernet1/0qEYLinux联盟
    C    192.1.1.0/24 is directly connected, Ethernet0/0qEYLinux联盟
    C    194.1.1.0/24 is directly connected, Serial2/0

    r3#sh ip ro

        3.0.0.0/24 is subnetted, 1 subnetsqEYLinux联盟
    C       3.3.3.0 is directly connected, Loopback0qEYLinux联盟
    C    193.1.1.0/24 is directly connected, Ethernet1/0qEYLinux联盟
    O IA 192.1.1.0/24 [110/20] via 193.1.1.2, 00:01:06, Ethernet1/0qEYLinux联盟
    O IA 194.1.1.0/24 [110/74] via 193.1.1.2, 00:00:37, Ethernet1/0

    r4#sh ip ro

        4.0.0.0/24 is subnetted, 1 subnetsqEYLinux联盟
    C       4.4.4.0 is directly connected, Loopback0qEYLinux联盟
    O IA 193.1.1.0/24 [110/74] via 194.1.1.2, 00:00:17, Serial2/0qEYLinux联盟
    O IA 192.1.1.0/24 [110/74] via 194.1.1.2, 00:00:17, Serial2/0qEYLinux联盟
    C    194.1.1.0/24 is directly connected, Serial2/0

Linux联盟收集整理 ,转贴请标明原始链接,如有任何疑问欢迎来本站Linux论坛讨论
评论】【加入收藏夹】【 】【打印】【关闭
※ 相关链接
 ·Fedora 8下如何配置无线使用WPA验证  (2007-11-18 17:29:55)
 ·JavaScript验证整个表单  (2007-11-13 13:03:42)
 ·iptable+SQUID 透明代理验证mac地址上网  (2007-11-02 11:51:22)
 ·Apache服务器实现的用户验证解析  (2007-11-02 11:10:17)
 ·几个有用的Javascript验证脚本  (2007-10-30 14:24:47)
 ·如何通过需要验证的邮件服务器发送邮件  (2007-10-26 13:02:36)
 ·ASP.Net实现验证码  (2007-10-26 12:58:55)
 ·如何在ASP.NET中获取随机生成的cookie加密与验证密钥  (2007-10-26 12:06:07)
 ·Asp.Net安全验证小结  (2007-10-26 11:50:05)
 ·Java程序如何穿透带有密码验证的代理  (2007-10-25 11:31:24)