H3C rip实验

实验拓扑

RIP实验

 

c4ac9095f929373110bc5ecc6ce0b9d4.png

 

 

 

图 1-1

注:如无特别说明,描述中的 R1 或 SW1 对应拓扑中设备名称末尾数字为 1 的设备,R2 或 SW2 对应拓扑中设备名称末尾数字为 2 的设备,以此类推;另外,同一网段中,IP 地址的主机位为其设备编号,如 R3 的 g0/0 接口若在 192.168.1.0/24 网段,则其 IP 地址为 192.168.1.3/24,以此类推


实验需求

  1. 按照图示配置 IP 地址

  2. 配置 RIP 实现全网路由互通

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

  4. 业务网段不允许出现协议报文

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


实验解法

  1. 配置 IP 地址

R1

[R1]sys
[R1]int g0/1
[R1]ip add 172.16.0.1 24
[R1]int g0/2
[R1]ip add 172.16.1.1 24
[R1]int g0/0
[R1]ip add 192.168.1.1 24

R2

[R1]sys
[R2]int g0/0
[R2]ip add 192.168.1.2 24
[R2]int g0/1
[R2]ip add 192.168.2.2 24

R3

[R3]sys
[R3]int g0/0
[R3]ip add 192.168.2.3 24
[R3]int g0/1
[R3]ip add 172.16.2.3 24
[R3]int g0/2
[R3]ip add 172.16.3.3 24

PC4

 

cddc7bea03f000d46d8a60adf896eec5.png

 

PC5

 

60e12aee6d87905cf0bffc188286e017.png

PC6

 

e54cfb66fa83299c2df9dab350770547.png

 

PC7

 

2898444dce27aab0a6007d328502ac07.png

 

 

2,配置 RIP 实现全网路由互通

  分析:实现全网互通,意味着每台路由器都要宣告本地的所有直连网段。RIP 只能做主类宣告,以 R1 为例,连接的两个业务网段属于同一个 B 类主类网段划分出的子网,所以只用宣告一次;而且为了不造成路由环路,需要开启 RIP v2 版本,以支持 VLSM;R3 同理
  
步骤 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

步骤 2:在路由器上查看路由表,发现已经学习到了全网明细路由

[R1]dis ip rou

 

b04691229986aae7574efddeabebf9f8.png

 

[R2]dis ip rou

 

42098b69e2a3636c531000fe47f0a5b4.png

 

[R3]dis ip rou

 

dec3dd64243ca14d8d29fad92e8afe5b.png

 

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

 分析:上一步中的 RIP 已经配置完成,但路由器学习到的都是各网段的明细路由。在网络结构庞大的拓扑中,明细路由太多会导致路由器查表效率降低,所以需要配置路由聚合来减少路由数量
 RIP 的聚合方式分为自动聚合和手动聚合。自动聚合是聚合为主类网段,在本拓扑中会造成路由环路,所以只能使用手动聚合
 R1 连接的 2 个业务网段的路由可以聚合为一条 172.16.0.0/23,R3连接的 2 个业务网段的路由可以聚合为一条 172.16.2.0/23,在各自的路由传递的出接口上配置手动聚合

 
步骤 1:在 R1 的 g0/0 接口配置手动路由聚合

[R1]int g0/0
[R1-GigabitEthernet0/0]rip summary-address 172.16.0.0 23

步骤 2:在 R3 的 g0/0 接口配置手动路由聚合

[R3]int g0/0
[R3-GigabitEthernet0/0]rip summary-address 172.16.2.0 23

步骤 3:在 R2 上查看路由表,发现学习到的是 R1 和 R3 发布的聚合路由

  注意:基于 RIP 的工作原理,旧的明细路由需要一定时间延迟才会从路由表中彻底删除

[R2]display ip routing-table

e2f37306fea1ac9cc80ce391ebd91e6e.png

 

 

  1. 业务网段不允许出现协议报文

  分析:基于 network 命令的两层含义,R1 和 R3 对直连的业务网段进行宣告后,会往该网段发送 RIP 的协议报文。这些协议报文是完全没有意义的,还会消耗网络带宽,所以需要配置静默接口
  
步骤 1:把 R1 连接业务网段的 g0/1 和 g0/2 接口配置为静默接口

[R1]rip 1
[R1-rip-1]silent-interface g0/1
[R1-rip-1]silent-interface g0/2

步骤 2:把 R3 连接业务网段的 g0/1 和 g0/2 接口配置为静默接口

[R3]rip 1
[R3-rip-1]silent-interface g0/1
[R3-rip-1]silent-interface g0/2

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

步骤 1:在 R1 的 g0/0 接口配置接口验证,密钥 runtime

[R1]int g0/0
[R1-GigabitEthernet0/0]rip authentication-mode simple plain runtime

步骤 2:在 R2 的 g0/0 接口配置接口验证,密钥必须和 R1 一致

[R2]int g0/0
[R2-GigabitEthernet0/0]rip authentication-mode simple plain runtime

  说明:通过重置 RIP 进程观察是否能够学习到路由来判断接口验证是否通过

 

  1. save保存后,重启R1与R2.重置需要在用户视图下,过一会。会重新获取rip路由表即为成功

[R1]qu
<R1>save
<R1>The current configuration will be written to the device. Are you sure? [Y/N]:y
<R1>(To leave the existing filename unchanged, press the enter key):回车键
<R1>reboot
<R1>This command will reboot the device. Continue? [Y/N]:y
[R2]qu
<R2>save
<R2>The current configuration will be written to the device. Are you sure? [Y/N]:y
<R2>(To leave the existing filename unchanged, press the enter key):回车键
<R2>reboot
<R2>This command will reboot the device. Continue? [Y/N]:y
[R1]dis ip rou

 

9f645a017b674d0101c7e30a531019ee.png

[R2]dis ip rou

 

a7c0f35fc8d4d93484d112cf7e4d481a.png

​​

 说明:这里页可以通过互相j进行ping   电脑来进行测试,全网段都是通 的

[PC5]ping 172.16.1.5
Ping 172.16.1.5 (172.16.1.5): 56 data bytes, press CTRL_C to break
56 bytes from 172.16.1.5: icmp_seq=0 ttl=255 time=0.495 ms
56 bytes from 172.16.1.5: icmp_seq=1 ttl=255 time=0.756 ms
56 bytes from 172.16.1.5: icmp_seq=2 ttl=255 time=0.568 ms
56 bytes from 172.16.1.5: icmp_seq=3 ttl=255 time=0.682 ms
56 bytes from 172.16.1.5: icmp_seq=4 ttl=255 time=0.707 ms
[PC5]ping 172.16.2.6
Ping 172.16.2.6 (172.16.2.6): 56 data bytes, press CTRL_C to break
56 bytes from 172.16.2.6: icmp_seq=0 ttl=253 time=1.610 ms
56 bytes from 172.16.2.6: icmp_seq=1 ttl=253 time=1.588 ms
56 bytes from 172.16.2.6: icmp_seq=2 ttl=253 time=1.409 ms
56 bytes from 172.16.2.6: icmp_seq=3 ttl=253 time=1.668 ms
56 bytes from 172.16.2.6: icmp_seq=4 ttl=253 time=1.078 ms
[PC5]ping 172.16.3.7
Ping 172.16.3.7 (172.16.3.7): 56 data bytes, press CTRL_C to break
56 bytes from 172.16.3.7: icmp_seq=0 ttl=253 time=1.522 ms
56 bytes from 172.16.3.7: icmp_seq=1 ttl=253 time=1.529 ms
56 bytes from 172.16.3.7: icmp_seq=2 ttl=253 time=1.365 ms
56 bytes from 172.16.3.7: icmp_seq=3 ttl=253 time=1.345 ms
56 bytes from 172.16.3.7: icmp_seq=4 ttl=253 time=2.223 ms

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

月夜行舟

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值