• HCNA配置RIPv1


    1、拓扑图

     2、配置

    R1

    The device is running!
    ######
    <Huawei>sys
    Enter system view, return user view with Ctrl+Z.
    [Huawei]sysnae    
    [Huawei]sysna    
    [Huawei]sysname R1
    [R1]int    
    [R1]interface g0/00
                  ^
    Error: Wrong parameter found at '^' position.
    [R1]interface g0/0/0
    [R1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
    Dec 11 2017 10:16:12-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
    on the interface GigabitEthernet0/0/0 has entered the UP state. 
    [R1-GigabitEthernet0/0/0]q
    [R1]rip 100
    [R1-rip-100]netwo    
    [R1-rip-100]network 12.0.0.0
    [R1-rip-100]q

    R2

    Please press enter to start cmd line!
    
    <Huawei>
    <Huawei>
    Dec 11 2017 10:15:04-08:00 Huawei %%01IFPDT/4/IF_STATE(l)[0]:Interface GigabitEt
    hernet0/0/1 has turned into UP state.
    <Huawei>
    Dec 11 2017 10:15:06-08:00 Huawei %%01IFPDT/4/IF_STATE(l)[1]:Interface GigabitEt
    hernet0/0/0 has turned into UP state.
    <Huawei>sys
    Enter system view, return user view with Ctrl+Z.
    [Huawei]sysname R2
    [R2]int g0/0/0
    [R2-GigabitEthernet0/0/0]ip add 12.1.1.2 24
    Dec 11 2017 10:17:46-08:00 R2 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
    on the interface GigabitEthernet0/0/0 has entered the UP state. 
    [R2-GigabitEthernet0/0/0]q
    [R2]rip 100
    [R2-rip-100]net    
    [R2-rip-100]network 12.0.0.0
    [R2-rip-100]q
    [R2]int    
    [R2]interface g0/0/1
    [R2-GigabitEthernet0/0/1]ip add 172.16.1.2 24
    [R2-GigabitEthernet0/0/1]
    Dec 11 2017 10:18:30-08:00 R2 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
    on the interface GigabitEthernet0/0/1 has entered the UP state. 
    [R2-GigabitEthernet0/0/1]q
    [R2]rip 100
    [R2-rip-100]net    
    [R2-rip-100]network 172.16.0.0
    [R2-rip-100]q

    R3

     Configuration console exit, please press any key to log on
    
    <R3>sys
    Enter system view, return user view with Ctrl+Z.
    [R3]int    
    [R3]interface g0/0/0
    [R3-GigabitEthernet0/0/0]ip add 192.168.1.3 24
    Dec 11 2017 10:35:57-08:00 R3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
    on the interface GigabitEthernet0/0/0 has entered the UP state. 
    [R3-GigabitEthernet0/0/0]q
    [R3]int    
    [R3]interface g0/0/1
    [R3-GigabitEthernet0/0/1]ip add 172.16.1.3 24
    Dec 11 2017 10:36:14-08:00 R3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
    on the interface GigabitEthernet0/0/1 has entered the UP state. 
    [R3-GigabitEthernet0/0/1]q
    [R3]rip 100
    [R3-rip-100]net    
    [R3-rip-100]network 172.16.0.0
    [R3-rip-100]net    
    [R3-rip-100]network 192.168.1.0
    [R3-rip-100]q
    [R3]

    R4

    The device is running!
    ######################
    <Huawei>
    Dec 11 2017 10:15:07-08:00 Huawei %%01IFPDT/4/IF_STATE(l)[0]:Interface GigabitEt
    hernet0/0/0 has turned into UP state.
    <Huawei>sys
    Enter system view, return user view with Ctrl+Z.
    [Huawei]sysn    
    [Huawei]sysname R4
    [R4]int    
    [R4]interface G0/0/0
    [R4-GigabitEthernet0/0/0]ip add 192.168.1.4 24
    Dec 11 2017 10:20:24-08:00 R4 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
    on the interface GigabitEthernet0/0/0 has entered the UP state. 
    [R4-GigabitEthernet0/0/0]q
    [R4]rip 100
    [R4-rip-100]net    
    [R4-rip-100]network 192.168.1.0
    [R4-rip-100]q

    3、测试

    R1上测试

     Please check whether system data has been changed, and save data in time
    
      Configuration console time out, please press any key to log on
    
    <R1>
    <R1>
    <R1>
    <R1>
    <R1>
    <R1>dis ip rou    
    <R1>dis ip routing-table 
    Route Flags: R - relay, D - download to fib
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 9        Routes : 9        
    
    Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface
    
           12.1.1.0/24  Direct  0    0           D   12.1.1.1        GigabitEthernet
    0/0/0
           12.1.1.1/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
    0/0/0
         12.1.1.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
    0/0/0
          127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
          127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
         172.16.0.0/16  RIP     100  1           D   12.1.1.2        GigabitEthernet
    0/0/0
        192.168.1.0/24  RIP     100  2           D   12.1.1.2        GigabitEthernet
    0/0/0
    255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    
    <R1>ping 192.168.1.4
      PING 192.168.1.4: 56  data bytes, press CTRL_C to break
        Request time out
        Request time out
        Reply from 192.168.1.4: bytes=56 Sequence=3 ttl=253 time=50 ms
        Reply from 192.168.1.4: bytes=56 Sequence=4 ttl=253 time=30 ms
        Reply from 192.168.1.4: bytes=56 Sequence=5 ttl=253 time=40 ms
    
      --- 192.168.1.4 ping statistics ---
        5 packet(s) transmitted
        3 packet(s) received
        40.00% packet loss
        round-trip min/avg/max = 30/40/50 ms
    
    <R1>ping 192.168.1.4
      PING 192.168.1.4: 56  data bytes, press CTRL_C to break
        Reply from 192.168.1.4: bytes=56 Sequence=1 ttl=253 time=30 ms
        Reply from 192.168.1.4: bytes=56 Sequence=2 ttl=253 time=30 ms
        Reply from 192.168.1.4: bytes=56 Sequence=3 ttl=253 time=30 ms
        Reply from 192.168.1.4: bytes=56 Sequence=4 ttl=253 time=30 ms
        Reply from 192.168.1.4: bytes=56 Sequence=5 ttl=253 time=40 ms
    
      --- 192.168.1.4 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 30/32/40 ms

    R4上测试

     Please check whether system data has been changed, and save data in time
    
      Configuration console time out, please press any key to log on
    
    <R4>dis ip rou    
    <R4>dis ip routing-table 
    Route Flags: R - relay, D - download to fib
    ------------------------------------------------------------------------------
    Routing Tables: Public
             Destinations : 9        Routes : 9        
    
    Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface
    
           12.0.0.0/8   RIP     100  2           D   192.168.1.3     GigabitEthernet
    0/0/0
          127.0.0.0/8   Direct  0    0           D   127.0.0.1       InLoopBack0
          127.0.0.1/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    127.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
         172.16.0.0/16  RIP     100  1           D   192.168.1.3     GigabitEthernet
    0/0/0
        192.168.1.0/24  Direct  0    0           D   192.168.1.4     GigabitEthernet
    0/0/0
        192.168.1.4/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
    0/0/0
      192.168.1.255/32  Direct  0    0           D   127.0.0.1       GigabitEthernet
    0/0/0
    255.255.255.255/32  Direct  0    0           D   127.0.0.1       InLoopBack0
    
    <R4>ping 12.1.1.1
      PING 12.1.1.1: 56  data bytes, press CTRL_C to break
        Reply from 12.1.1.1: bytes=56 Sequence=1 ttl=253 time=70 ms
        Reply from 12.1.1.1: bytes=56 Sequence=2 ttl=253 time=50 ms
        Reply from 12.1.1.1: bytes=56 Sequence=3 ttl=253 time=40 ms
        Reply from 12.1.1.1: bytes=56 Sequence=4 ttl=253 time=40 ms
        Reply from 12.1.1.1: bytes=56 Sequence=5 ttl=253 time=30 ms
    
      --- 12.1.1.1 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 30/46/70 ms

    总结:
    1.RIP协议如何工作?
    在路由器上开启RIP协议,并将路由器的直连网段宣告进RIP后,RIP会将这些直连网段信息封装成RIP协议报文,
    发送给邻居路由器。这样邻居路由器间就可以相互学习对方的网段信息,实现网络的互通。

    2.如何配置基本的RIP网络?
    第一步开启RIP协议,第二步将路由器的直连网段宣告进RIP协议。

    3.RIP如何计算开销值?
    RIP是基于跳数来计算的开销值。所谓跳数即是跨越网段的数量。
    RIP路由的最大网络跳数为15,如果一条RIP路由的跳数到达16,路由器则认为该路由不可达。


  • 相关阅读:
    02day-webpack
    Mybatis中的@Param注解(自己没试过)
    SpringMVC
    jsp获取map
    form表单提交时选择性传值到后台
    form表单提交数据的几种方式
    ajax中什么时候进success和error
    @RequestParam加与不加的区别
    @RequestBody和@RequestParam区别
    java.lang.IllegalArgumentException: Invalid character found in the request target. The valid charact
  • 原文地址:https://www.cnblogs.com/me80/p/8021915.html
Copyright © 2020-2023  润新知