zoukankan      html  css  js  c++  java
  • 云中继

    第五部分,云中继。通过云中继路由器,实现不同网络之间相互通信。

    网络拓扑图如下:

    我们需要在每个路由器与云路由器相连的端口配置虚拟接口,以实现与其他网络的通信,配置完成后,拓扑图中的每台pc机之间能够相互通信。

    代码:

    ##基础配置

    #r0

    en
    conf t
    int f0/0
    ip add 172.168.10.1 255.255.255.0
    no shut
    int s0/0/0
    encapsulation frame-relay
    no shut
    int s0/0/0.1 point-to-point
    ip add 192.168.1.1 255.255.255.0
    frame-relay interface-dlci 20
    int s0/0/0.2 point-to-point
    ip add 192.168.2.1 255.255.255.0
    frame-relay interface-dlci 21
    exit
    router ospf 1
    network 192.168.1.0 0.0.0.255 area 1
    network 192.168.2.0 0.0.0.255 area 1
    network 172.168.10.0 0.0.0.255 area 1

    #r1

    en
    conf t
    int f0/0
    ip add 172.168.20.1 255.255.255.0
    no shut
    int s0/0/0
    encapsulation frame-relay
    no shut
    int s0/0/0.1 point-to-point
    ip add 192.168.1.2 255.255.255.0
    frame-relay interface-dlci 30
    int s0/0/0.2 point-to-point
    ip add 192.168.3.1 255.255.255.0
    frame-relay interface-dlci 31
    exit
    router ospf 1
    network 192.168.1.0 0.0.0.255 area 1
    network 192.168.3.0 0.0.0.255 area 1
    network 172.168.20.0 0.0.0.255 area 1

    #r2

    en
    conf t
    int f0/0
    ip add 172.168.30.1 255.255.255.0
    no shut
    int s0/0/0
    encapsulation frame-relay
    no shut
    int s0/0/0.1 point-to-point
    ip add 192.168.3.2 255.255.255.0
    frame-relay interface-dlci 40
    int s0/0/0.2 point-to-point
    ip add 192.168.1.2 255.255.255.0
    frame-relay interface-dlci 41
    exit
    router ospf 1
    network 192.168.3.0 0.0.0.255 area 1
    network 192.168.1.0 0.0.0.255 area 1
    network 172.168.30.0 0.0.0.255 area 1

    为每个云中继路由器上每个serial接口的DLCI取别名,方便后面面配置,比如,serial0上的DLCI20,我将它分配给与R1通信,我就取名为toR1:

      

    配置云中继,R0要和R1通信,如果从R0到R1这边看,从R0到R1使用Serial0上的toR1,要从R1回到R0,则使用Serial1上的toR0:

      

    结果检测:

    pc0 ping pc2:

     pc0 ping pc4:

  • 相关阅读:
    班服 状压DP NOIP模拟赛
    记录奥林比克/课程录制 洛谷P2255 [USACO14JAN]
    字符串的展开 vijos1379 NOIP2007 字符串 模拟
    树网的核 Vijos1362 NOIP2007 树结构 直径 暴搜
    浏览器(Web Navigation) codevs 5373 POJ 1028 简单模拟
    FPS集合 Codgic1351 动态规划 DP NOIP模拟赛
    基于VBA的Excel抽奖软件
    【CodeForces】Round #436
    【NOI OpenJudge】【1.3】编程基础之算术表达式与顺序执行
    【NOI OpenJudge】【1.2】编程基础之变量定义、赋值及转换
  • 原文地址:https://www.cnblogs.com/sctb/p/11954189.html
Copyright © 2011-2022 走看看