RIP实验
实验拓扑
实验需求
- 按照图示配置 IP 地址
- 配置 RIP 实现全网路由互通
- 要求全网路由器不能出现明细路由(直连网段除外),不影响网络正常访问
- 业务网段不允许出现协议报文
- R1 和 R2 之间需要开启接口身份验证来保证协议安全性,密钥为
huayu
实验解法
-
配置 IP 地址部分
<R1>display 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.1/24 -- -- GE0/1 up up 172.16.0.254/24 -- -- GE0/2 up up 172.16.1.254/24 -- --
<R2>display 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>display 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 -- --
-
配置 RIP 实现全网路由互通
步骤 1:在 R1,R2,R3 上分别配置 RIP v2,关闭自动聚合,并宣告所有直连网段[R1]rip 1 [R1-rip-1]version 2 [R1-rip-1]undo summary [R1-rip-1]network 172.16.0.0 [R1-rip-1]network 192.168.1.0
[R2]rip 1 [R2-rip-1]version 2 [R2-rip-1]undo summary [R2-rip-1]network 192.168.1.0 [R2-rip-1]network 192.168.2.0
[R3]rip 1 [R3-rip-1]version 2 [R3-rip-1]undo summary [R3-rip-1]network 172.16.0.0 [R3-rip-1]network 192.168.2.0
-
要求全网路由器不能出现明细路由(直连网段除外),不影响网络正常访问
步骤 1:在 R1 的 g0/0 接口配置手动路由聚合[R1-GigabitEthernet0/0]rip summary-address 172.16.0.0 23
步骤 2:在 R3 的 g0/0 接口配置手动路由聚合
[R3-GigabitEthernet0/0]rip summary-address 172.16.2.0 23
步骤 3:在 R2 上查看路由表,发现学习到的是 R1 和 R3 发布的聚合路由
<R2>display ip routing-table Destinations : 15 Routes : 15 Destination/Mask Proto Pre Cost NextHop Interface ---- 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 ----
-
业务网段不允许出现协议报文
分析:基于
network
命令的两层含义,R1 和 R3 对直连的业务网段进行宣告后,会往该网段发送 RIP 的协议报文。这些协议报文是完全没有意义的,还会消耗网络带宽,所以需要配置静默接口
步骤 1:把 R1 连接业务网段的 g0/1 和 g0/2 接口配置为静默接口[R1-rip-1]silent-interface g0/1 [R1-rip-1]silent-interface g0/2
步骤 2:把 R3 连接业务网段的 g0/1 和 g0/2 接口配置为静默接口
[R3-rip-1]silent-interface g0/1 [R3-rip-1]silent-interface g0/2
-
R1 和 R2 之间需要开启接口身份验证来保证协议安全性,密钥为
huayu
步骤 1:在 R1 的 g0/0 接口配置接口验证,密钥
huayu
[R1-GigabitEthernet0/0]rip authentication-mode simple plain huayu
步骤 2:在 R2 的 g0/0 接口配置接口验证,密钥必须和 R1 一致
[R2-GigabitEthernet0/0]rip authentication-mode simple plain huayu
实验结果
全网互通