zoukankan      html  css  js  c++  java
  • 配置 RIP 基本功能示例(IPv4)

    在小型网络中有 4 台路由器,要求在 RouterA、RouterB、RouterC 和 RouterD 上实现网络互连。

    1、拓扑图

    image

    2、配置思路

    配置思路由于要在小型网络中实现设备的网络互连,所以推荐配置 RIP-2 路由协议。

    1. 配置各接口 IP 地址,使网络可达。

    2. 在各路由器上使能 RIP,基本实现网络互连。

    3. 在各路由器上配置 RIP-2 版本,提升 RIP 路由扩展性能。

    1、 配置各接口 IP 地址,使网络可达。

    A

    [Huawei]sysname A
    [A]int g0/0/0
    [A-GigabitEthernet0/0/0]ip add 192.168.1.1 24
    [A-GigabitEthernet0/0/0]quit

    B

    [Huawei]sysname B
    [B]int g0/0/0
    [B-GigabitEthernet0/0/0]ip add 192.168.1.2 24
    [B-GigabitEthernet0/0/0]quit
    [B]int g0/0/2
    [B-GigabitEthernet0/0/2]ip add 172.16.1.2 24
    [B-GigabitEthernet0/0/2]quit
    [B]int g0/0/1
    [B-GigabitEthernet0/0/1]ip add 10.1.1.2 24
    [B-GigabitEthernet0/0/1]quit
    

    C

    [Huawei]sysname C
    [C]int g0/0/2
    [C-GigabitEthernet0/0/2]ip add 172.16.1.1 24
    [C-GigabitEthernet0/0/2]quit

    D

    [Huawei]sysname D
    [D]int g0/0/1
    [D-GigabitEthernet0/0/1]ip add 10.1.1.1 24
    [D-GigabitEthernet0/0/1]quit

    2. 在各路由器上使能 RIP,基本实现网络互连。

    A

    [A]rip
    [A-rip-1]network 192.168.1.0
    [A-rip-1]quit

    B

    [B]rip
    [B-rip-1]network 192.168.1.0
    [B-rip-1]network 172.16.0.0
    [B-rip-1]network 10.0.0.0
    [B-rip-1]quit
    

    C

    [C]rip
    [C-rip-1]network 172.16.0.0
    [C-rip-1]quit

    D

    [D]rip
    [D-rip-1]network 10.0.0.0
    [D-rip-1]quit

    查看路由器A的rip路由表

    从路由表中可以看出,RIP-1 发布的路由信息使用的是自然掩码。

    [A]dis rip 1 route
     Route Flags : R - RIP
                   A - Aging, G - Garbage-collect
     ----------------------------------------------------------------------------
     Peer 192.168.1.2 on GigabitEthernet0/0/0
          Destination/Mask        Nexthop     Cost   Tag     Flags   Sec
           172.16.0.0/16       192.168.1.2      1    0        RA       6
             10.0.0.0/8        192.168.1.2      1    0        RA       6
    [A]

    3. 在各路由器上配置 RIP-2 版本,提升 RIP 路由扩展性能。

    A

    [A]rip
    [A-rip-1]version 2
    [A-rip-1]quit

    其它路由器与A相同。

    查看路由器A的rip路由表

    从路由表中可以看出,RIP-2 发布的路由中带有更为精确的子网掩码信息。

    [A]dis rip 1 route
     Route Flags : R - RIP
                   A - Aging, G - Garbage-collect
     ----------------------------------------------------------------------------
     Peer 192.168.1.2 on GigabitEthernet0/0/0
          Destination/Mask        Nexthop     Cost   Tag     Flags   Sec
           172.16.1.0/24       192.168.1.2      1    0        RA      31
             10.1.1.0/24       192.168.1.2      1    0        RA      31
    [A]

    联通性测试(路由器A ping路由器C和D)

    [A]ping 172.16.1.1
      PING 172.16.1.1: 56  data bytes, press CTRL_C to break
        Reply from 172.16.1.1: bytes=56 Sequence=1 ttl=254 time=30 ms
        Reply from 172.16.1.1: bytes=56 Sequence=2 ttl=254 time=30 ms
        Reply from 172.16.1.1: bytes=56 Sequence=3 ttl=254 time=30 ms
        Reply from 172.16.1.1: bytes=56 Sequence=4 ttl=254 time=30 ms
        Reply from 172.16.1.1: bytes=56 Sequence=5 ttl=254 time=40 ms
    
      --- 172.16.1.1 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 30/32/40 ms
    
    [A]ping 10.1.1.1
      PING 10.1.1.1: 56  data bytes, press CTRL_C to break
        Reply from 10.1.1.1: bytes=56 Sequence=1 ttl=254 time=40 ms
        Reply from 10.1.1.1: bytes=56 Sequence=2 ttl=254 time=40 ms
        Reply from 10.1.1.1: bytes=56 Sequence=3 ttl=254 time=20 ms
        Reply from 10.1.1.1: bytes=56 Sequence=4 ttl=254 time=30 ms
        Reply from 10.1.1.1: bytes=56 Sequence=5 ttl=254 time=20 ms
    
      --- 10.1.1.1 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 20/30/40 ms
    
    [A]


    读书和健身总有一个在路上

  • 相关阅读:
    hdu 携程全球数据中心建设 (球面距离 + 最小生成树)
    next_permutation()函数 和 prev_permutation() 按字典序求全排列
    poj 3792 Area of Polycubes (简单模拟)
    poj 3790 Recursively Palindromic Partitions (递推)
    hdu 1575 Tr A (矩阵快速幂入门题)
    hdu 2986 Ballot evaluation (模拟)
    sscanf() 和 sprintf()的用法。
    Codeforces Round #239 (Div. 2)
    hdu 2372 El Dorado (dp)
    hdu 3433 A Task Process(dp+二分)
  • 原文地址:https://www.cnblogs.com/Renqy/p/13666321.html
Copyright © 2011-2022 走看看