Advertisement

H3C RIP基本配置实验

阅读量:

H3C RIP基本配置实验

实验拓扑

image

实验需求

  1. 依据图解完成 IP 地址配置。
  2. 配置 RIP 网络实现全网路由互通。
  3. 规定所有网络中 router 必须避免配置明细路由(除了直接连接的 subnet 外),确保网络正常访问。
  4. 业务 subnet 内禁止存在 protocol 报文。
  5. R1 和 R2 的 interface 需要启用身份验证机制以确保协议的安全性。

实验步骤

配置 IP 地址

R1
复制代码
    [R1]display ip int br
    \*down: administratively down
    (s): spoofing  (l): loopback
    Interface           Physical Protocol IP address/Mask    VPN instance DescriptionGE0/0               up       up       192.168.1.1/24     --           --
    GE0/1               up       up       172.16.0.254/24    --           --
    GE0/2               up       up       172.16.1.254/24    --           --
    
    
    txt
R2
复制代码
    [R2]dis ip int br
    *down: administratively down
    (s): spoofing  (l): loopback
    Interface           Physical Protocol IP address/Mask    VPN instance Description  
    GE0/0               up       up       192.168.1.2/24     --           --
    GE0/1               up       up       192.168.2.2/24     --           --
    
    
    txt
R3
复制代码
    [R3]dis ip int br
    *down: administratively down
    (s): spoofing  (l): loopback
    Interface           Physical Protocol IP address/Mask    VPN instance Description  
    GE0/0               up       up       192.168.2.3/24     --           --
    GE0/1               up       up       172.16.2.254/24    --           --
    GE0/2               up       up       172.16.3.254/24    --           --
    
    
    txt
PC(略)

配置RIP全网互通,关闭路由自动聚合,开启V2版本

R1
复制代码
    #
    rip 1
     undo summary    //关闭路由自动聚合
     version 2
     network 172.16.0.0 0.0.0.255
     network 172.16.1.0 0.0.0.255
     network 192.168.1.0
    
    
    txt
R2
复制代码
    #
    rip 1
     undo summary    //关闭路由自动聚合
     version 2
     network 192.168.1.0
     network 192.168.2.0
    
    
    txt
R3
复制代码
    #
    rip 1
     undo summary    //关闭路由自动聚合
     version 2
     network 172.16.2.0 0.0.0.255
     network 172.16.3.0 0.0.0.255
     network 192.168.2.0
    
    
    txt

手动路由聚合

要求全网路由器不能出现明细路由(直连网段除外),不影响网络正常访问

明确业务端所在的设备位置,并从该出接口向邻居发送相应的RIP数据包,在该出接口处实施手动路由聚合配置

R1
复制代码
    #
    interface GigabitEthernet0/0
     rip summary-address 172.16.0.0 255.255.254.0    //路由手动聚合
    
    
    
    txt
R3
复制代码
    #
    interface GigabitEthernet0/0
     rip summary-address 172.16.2.0 255.255.254.0    //路由手动聚合
    
    
    txt

静默接口,业务网段不允许出现协议报文

R1
复制代码
    #
    rip 1
     silent-interface GigabitEthernet0/1
     silent-interface GigabitEthernet0/2
    
    
    txt
R2
复制代码
    #
    rip 1
     silent-interface GigabitEthernet0/1
     silent-interface GigabitEthernet0/2
    
    
    txt

身份认证加密

R1 和 R2 之间需要开启接口身份验证来保证协议安全性,密钥为 runtime

R1
复制代码
    #
    interface GigabitEthernet0/0
     rip authentication-mode simple plain runtime
    
    
    txt
R2
复制代码
    #
    interface GigabitEthernet0/0
     rip authentication-mode simple plain runtime
    
    
    txt

实验验证

全网路由互通,且不出现明细路由(直连网段除外)

R1路由表
复制代码
    [R1]dis ip routing-table 
    
    Destinations : 18	Routes : 18
    
    Destination/Mask   Proto   Pre Cost        NextHop         Interface
    0.0.0.0/32         Direct  0   0           127.0.0.1       InLoop0
    127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0
    127.0.0.1/32       Direct  0   0           127.0.0.1       InLoop0
    127.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0
    172.16.0.0/24      Direct  0   0           172.16.0.254    GE0/1
    172.16.0.254/32    Direct  0   0           127.0.0.1       InLoop0
    172.16.0.255/32    Direct  0   0           172.16.0.254    GE0/1
    172.16.1.0/24      Direct  0   0           172.16.1.254    GE0/2
    172.16.1.254/32    Direct  0   0           127.0.0.1       InLoop0
    172.16.1.255/32    Direct  0   0           172.16.1.254    GE0/2
    172.16.2.0/23      RIP     100 2           192.168.1.2     GE0/0
    192.168.1.0/24     Direct  0   0           192.168.1.1     GE0/0
    192.168.1.1/32     Direct  0   0           127.0.0.1       InLoop0
    192.168.1.255/32   Direct  0   0           192.168.1.1     GE0/0
    192.168.2.0/24     RIP     100 1           192.168.1.2     GE0/0
    224.0.0.0/4        Direct  0   0           0.0.0.0         NULL0
    224.0.0.0/24       Direct  0   0           0.0.0.0         NULL0
    255.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0
    
    
    txt
![](https://ad.itadn.com/c/weblog/blog-img/images/2025-08-18/qGxSF15QOy8DbYahCPp2zXHt7fkA.png)
R2路由表
复制代码
    [R2]dis ip routing-table 
    
    Destinations : 15	Routes : 15
    
    Destination/Mask   Proto   Pre Cost        NextHop         Interface
    0.0.0.0/32         Direct  0   0           127.0.0.1       InLoop0
    127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0
    127.0.0.1/32       Direct  0   0           127.0.0.1       InLoop0
    127.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0
    172.16.0.0/23      RIP     100 1           192.168.1.1     GE0/0
    172.16.2.0/23      RIP     100 1           192.168.2.3     GE0/1
    192.168.1.0/24     Direct  0   0           192.168.1.2     GE0/0
    192.168.1.2/32     Direct  0   0           127.0.0.1       InLoop0
    192.168.1.255/32   Direct  0   0           192.168.1.2     GE0/0
    192.168.2.0/24     Direct  0   0           192.168.2.2     GE0/1
    192.168.2.2/32     Direct  0   0           127.0.0.1       InLoop0
    192.168.2.255/32   Direct  0   0           192.168.2.2     GE0/1
    224.0.0.0/4        Direct  0   0           0.0.0.0         NULL0
    224.0.0.0/24       Direct  0   0           0.0.0.0         NULL0
    255.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0
    
    
    txt
![](https://ad.itadn.com/c/weblog/blog-img/images/2025-08-18/lBpoEVkTjf3K5c6ydNLZrbi8hDsx.png)
R3路由表
复制代码
    [R3]dis ip routing-table 
    
    Destinations : 18	Routes : 18
    
    Destination/Mask   Proto   Pre Cost        NextHop         Interface
    0.0.0.0/32         Direct  0   0           127.0.0.1       InLoop0
    127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0
    127.0.0.1/32       Direct  0   0           127.0.0.1       InLoop0
    127.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0
    172.16.0.0/23      RIP     100 2           192.168.2.2     GE0/0
    172.16.2.0/24      Direct  0   0           172.16.2.254    GE0/1
    172.16.2.254/32    Direct  0   0           127.0.0.1       InLoop0
    172.16.2.255/32    Direct  0   0           172.16.2.254    GE0/1
    172.16.3.0/24      Direct  0   0           172.16.3.254    GE0/2
    172.16.3.254/32    Direct  0   0           127.0.0.1       InLoop0
    172.16.3.255/32    Direct  0   0           172.16.3.254    GE0/2
    192.168.1.0/24     RIP     100 1           192.168.2.2     GE0/0
    192.168.2.0/24     Direct  0   0           192.168.2.3     GE0/0
    192.168.2.3/32     Direct  0   0           127.0.0.1       InLoop0
    192.168.2.255/32   Direct  0   0           192.168.2.3     GE0/0
    224.0.0.0/4        Direct  0   0           0.0.0.0         NULL0
    224.0.0.0/24       Direct  0   0           0.0.0.0         NULL0
    255.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0
    
    
    txt
![](https://ad.itadn.com/c/weblog/blog-img/images/2025-08-18/XTR23mr7kOciGVQuZPyw9vD8pebf.png)

RIPV1 路由环路复现

全网路由器RIP 开启版本1后,R2路由表
复制代码
    [R2]display ip routing-table 
    
    Destinations : 14	Routes : 15
    
    Destination/Mask   Proto   Pre Cost        NextHop         Interface
    0.0.0.0/32         Direct  0   0           127.0.0.1       InLoop0
    127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0
    127.0.0.1/32       Direct  0   0           127.0.0.1       InLoop0
    127.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0
    172.16.0.0/16      RIP     100 1           192.168.1.1     GE0/0
                   RIP     100 1           192.168.2.3     GE0/1
    192.168.1.0/24     Direct  0   0           192.168.1.2     GE0/0
    192.168.1.2/32     Direct  0   0           127.0.0.1       InLoop0
    192.168.1.255/32   Direct  0   0           192.168.1.2     GE0/0
    192.168.2.0/24     Direct  0   0           192.168.2.2     GE0/1
    192.168.2.2/32     Direct  0   0           127.0.0.1       InLoop0
    192.168.2.255/32   Direct  0   0           192.168.2.2     GE0/1
    224.0.0.0/4        Direct  0   0           0.0.0.0         NULL0
    224.0.0.0/24       Direct  0   0           0.0.0.0         NULL0
    255.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0
    [R2]
    
    
    
    txt
![](https://ad.itadn.com/c/weblog/blog-img/images/2025-08-18/RTGngBm7uX9dhrt1CKeJqafSF68A.png)

通过R2查看路由表时发现,在前往PC1和PC2的方向上有两条等价的B类地址;当各台PC之间进行互访时,在这两条等价的路径上发送与接收的数据将同步运行,并由此形成一个回路

环路现象
复制代码
    [H3C]tracert 172.16.2.1
    traceroute to 172.16.2.1 (172.16.2.1), 30 hops at most, 40 bytes each packet, press CTRL_C to break
     1  172.16.0.254 (172.16.0.254)  0.414 ms  0.245 ms  0.188 ms
     2  172.16.0.254 (172.16.0.254)  0.183 ms !N  0.256 ms !N  0.203 ms !N
    
    
    txt

升级RIP至版本V2后,在最短时间内(不超过180秒)出现故障的路由不再自动更新的情况下,请手动重启RIP进程。

复制代码
    <R2>reset rip 1 process 
    Reset RIP process? [Y/N]:y
    
    
    
    txt

实验附件

H3C RIP基本配置实验.zip

全部评论 (0)

还没有任何评论哟~