zoukankan      html  css  js  c++  java
  • 用RIPv2实现网络区域的互通

    1、动态路由的分类:

    DV协议:距离矢量协议

    距离矢量:路由器只能够知道邻居路由的信息

    LS协议:链路状态协议

    链路状态:路由器能够知道所在协议内的所有信息

    RIP协议的全程是:路由信息协议(DV协议)

    2、RIP协议配置的过程(主要指令)

    router rip  //开启RIP协议

    network 主类号  //宣告路由器接口所在主类网络号

                                                                     网络号              主类号

    A       1-127                 10.1.1.1/24      10.1.1.0            10.0.0.0

    B       128-191             130.1.1.1/24    130.1.1.0          130.1.0.0

    C       192-223             192.1.1.1/24    192.1.1.0          192.1.1.0

    简言之:主类号主要看IP地址属于哪一类的?

    3.loopback环回接口

    环回接口→逻辑接口→路由器的辅助接口

    在路由器上模拟一个逻辑节点(相当于一个独立的网段→一台电脑)

    在网络环境比较复杂的时候,loopback接口可以辅助物理接口进行配置管理

    loopback接口如何配置?

    int loopback x(x代指数字,数字范围0~21e)

             ip add x.x.x.x x.x.x.x(IP地址,子网掩码)

             no shu

    4.RIP在默认情况下不会携带子网掩码信息

    所以要RIP配置好network后要进行以下调整

             version 2                     //调整为版本2

             no auto- ummary     //关闭自动汇总

    (tips:RIPv2协议可以支持携带子网掩码

    5.清理路由表

    clear ip route *         //刷新路由表

    6.如何检查自己配置的动态路由是正确的?

    1)查看路由表 能够看到每台路由器的loopback接口路由

    2)ping通每一个loopback接口

    使用记事本的方式复制粘贴命令可以快速对路由器进行操作

    特点:配置简单,方便排错

    实验拓扑:

    详细配置:

    R0:

    enable

    conf t

    hostname R0

    no ip domain-lookup

    int f0/0

    ip add 192.168.12.1 255.255.255.0

    no shu

    int loop 0

    ip add 1.1.1.1 255.255.255.0

    no shu

    exit

    router rip

    network 1.0.0.0

    network 192.168.12.0

    version 2

    no auto-summary

    end

    R1:

    enable

    conf t

    hostname R1

    no ip domain-lookup

    int f0/0

    ip add 192.168.12.2 255.255.255.0

    no shu

    int f0/1

    ip add 192.168.2.1 255.255.255.0

    no shu

    int loop 0

    ip add 2.2.2.2 255.255.255.0

    exit

    router rip

    network 192.168.12.0

    network 192.168.2.0

    network 2.0.0.0

    version 2

    no auto-summary

    end

    R2:

    enable

    conf t

    hostname R2

    no ip domain-lookup

    int f0/0

    ip add 192.168.2.2 255.255.255.0

    no shu

    int loop 0

    ip add 3.3.3.3 255.255.255.0

    no shu

    exit

    router rip

    network 3.0.0.0

    network 192.168.2.0

    version 2

    no auto-summary

    end

    R4:

    enable

    conf t

    hostname R4

    no ip domain-lookup

    int f0/0

    ip add 192.168.12.3 255.255.255.0

    no shu

    int f0/1

    ip add 192.168.3.1 255.255.255.0

    no shu

    int loop 0

    ip add 4.4.4.4 255.255.255.0

    no shu

    exit

    router rip

    network 192.168.12.0

    network 192.168.3.0

    network 4.0.0.0

    version 2

    no auto-summary

    end

    R5:

    enable

    conf t

    hostname R5

    no ip domain-lookup

    int f0/0

    ip add 192.168.3.2 255.255.255.0

    no shu

    int loop 0

    ip add 5.5.5.5 255.255.255.0

    no shu

    exit

    router rip

    network 192.168.3.0

    network 5.0.0.0

    version 2

    no auto-summary

    end

  • 相关阅读:
    HTML简介
    web服务器的原理
    静态网页和动态网页的区别
    HTTP协议相关原理
    C/S,B/S的应用的区别
    git撤销commit但未push的文件
    表单提交不刷新页面
    httpclient请求中文乱码问题
    web项目,@return@see@param等注解Maven install报错,不能识别
    Hive 基本操作
  • 原文地址:https://www.cnblogs.com/lilywhite/p/9960521.html
Copyright © 2011-2022 走看看