H3C RIP基本配置实验

H3C RIP基本配置实验

实验拓扑

image

实验需求

  1. 按照图示配置 IP 地址
  2. 配置 RIP 实现全网路由互通
  3. 要求全网路由器不能出现明细路由(直连网段除外),不影响网络正常访问
  4. 业务网段不允许出现协议报文
  5. R1 和 R2 之间需要开启接口身份验证来保证协议安全性,密钥为 runtime

实验步骤

配置 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    --           --
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     --           --
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    --           --
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
R2
#
rip 1
 undo summary    //关闭路由自动聚合
 version 2
 network 192.168.1.0
 network 192.168.2.0
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

手动路由聚合

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

确定业务端所在设备,与向邻居发送RIP报文的出接口,在出接口上配置手动路由聚合

R1
#
interface GigabitEthernet0/0
 rip summary-address 172.16.0.0 255.255.254.0    //路由手动聚合

R3
#
interface GigabitEthernet0/0
 rip summary-address 172.16.2.0 255.255.254.0    //路由手动聚合

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

R1
#
rip 1
 silent-interface GigabitEthernet0/1
 silent-interface GigabitEthernet0/2
R2
#
rip 1
 silent-interface GigabitEthernet0/1
 silent-interface GigabitEthernet0/2

身份认证加密

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

R1
#
interface GigabitEthernet0/0
 rip authentication-mode simple plain runtime
R2
#
interface GigabitEthernet0/0
 rip authentication-mode simple plain runtime

实验验证

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

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
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
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

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]

在R2上查看路由表发现,去往PC1-PC2的路由,聚合一条B类路由,且是2条等价路由;当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

修改RIP版本为V2后,若不想等等最短180秒的路由失效更新,可手动重启RIP进程

<R2>reset rip 1 process 
Reset RIP process? [Y/N]:y

实验附件

H3C RIP基本配置实验.zip

  • 8
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值