动态路由RIP协议

   用到是依旧是华为的ensp

     

 第一步:先对192.168.1.0/24进行子网划分

由题可知会用到6个网段 ,划分后用的网段如下所示

192.168.1.0/27

192.168.1.32/27

192.168.1.64/27

192.168.1.96/27

192.168.1.128/27

192.168.1.160/27

精确后如下图

 第二步:设置环回以及接口IP 

[r2]interface LoopBack 0
[r2-LoopBack0]ip add 192.168.1.65 27
[r2-LoopBack0]q
[r2]interface LoopBack 1
[r2-LoopBack1]ip add 192.168.1.97 27
[r2-LoopBack1]q
[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]ip add 192.168.1.130 27
[r2-GigabitEthernet0/0/0]q
[r2]interface GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]ip add 192.168.1.161 27
[r2-GigabitEthernet0/0/1]q

第三步:配置rip v2 并且ping一下另外两个路由器来检测前面做的没有问题,方便下一步的进行

[r2]rip 1
[r2-rip-1]version 2
[r2-rip-1]network 192.168.1.0
[r2-rip-1]q

[r1]ping -a 192.168.1.1 192.168.1.65
  PING 192.168.1.65: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.65: bytes=56 Sequence=1 ttl=255 time=30 ms
    Reply from 192.168.1.65: bytes=56 Sequence=2 ttl=255 time=20 ms
    Reply from 192.168.1.65: bytes=56 Sequence=3 ttl=255 time=20 ms
    Reply from 192.168.1.65: bytes=56 Sequence=4 ttl=255 time=20 ms
    Reply from 192.168.1.65: bytes=56 Sequence=5 ttl=255 time=20 ms

  --- 192.168.1.65 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 20/22/30 ms

为了减少路由器的条目,需要将路由器上两个环回进行汇总,以r2为例

[r2]interface GigabitEthernet 0/0/0
[r2-GigabitEthernet0/0/0]rip summary-address 192.168.1.64 255.255.255.192
[r2-GigabitEthernet0/0/0]q     
[r2]interface GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]rip summary-address 192.168.1.64 255.255.255.192
[r2-GigabitEthernet0/0/1]q

在r1的0/0/0接口进行抓包,可以看到此时的数据并没有加密

 然后给每个路由器的端口都加密,且加密的类型和密码都必须一样,可以从下图看到信息已经被加密

 由于不能宣告r3的环回,所以要用到缺省路由,只用给边界路由器手动配置缺省,之后所有运行RIP的路由器都自动产生缺省

[r3-rip-1]default-route originate

分别用r1,r2 ping3.3.3.3 ,结果都可以ping通,代表整个实验完成 

<r1>ping 3.3.3.3
  PING 3.3.3.3: 56  data bytes, press CTRL_C to break
    Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=254 time=10 ms
    Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=254 time=30 ms
    Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=254 time=30 ms
    Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=254 time=30 ms
    Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=254 time=20 ms

  --- 3.3.3.3 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/24/30 ms

<r2>ping 3.3.3.3
  PING 3.3.3.3: 56  data bytes, press CTRL_C to break
    Reply from 3.3.3.3: bytes=56 Sequence=1 ttl=255 time=10 ms
    Reply from 3.3.3.3: bytes=56 Sequence=2 ttl=255 time=10 ms
    Reply from 3.3.3.3: bytes=56 Sequence=3 ttl=255 time=30 ms
    Reply from 3.3.3.3: bytes=56 Sequence=4 ttl=255 time=10 ms
    Reply from 3.3.3.3: bytes=56 Sequence=5 ttl=255 time=20 ms

  --- 3.3.3.3 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 10/16/30 ms

  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

Gur.

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

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

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

打赏作者

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

抵扣说明:

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

余额充值