实例讲解RIP的认证
创始人
2024-07-24 21:31:13
0

RIP版本1不支持认证。如果接收和发送的是版本2包,接口能进行RIP认证。密钥链路决定了能用于接口的一连串密钥。如果不配设置密钥链路,接口就不能进行认证,甚至不能进行缺省认证。下面就让我们看一下配置RIP认证的步骤:

一、实验拓扑如图:

 

实例讲解RIP的认证

二、明文验证

1、明文认证时,被认证方发送key chian时,发送最低ID值的key,并且不携带ID;认证方接收到key后,和自己key chain的全部key进行比较,只要有一个key匹配就通过对被认证方的认证。

2、验证

R1上配置为:

  1. key chain rip-key  
  2. key 1  
  3. key-string ccxx02  
  4. !  
  5. interface FastEthernet0/0  
  6. ip address 192.168.12.1 255.255.255.0  
  7. ip rip authentication key-chain rip-key 

R2上配置为:

  1. key chain rip-key  
  2. key 1  
  3. key-string ccxx01  
  4. key 2  
  5. key-string ccxx02  
  6. !  
  7. interface FastEthernet0/0  
  8. ip address 192.168.12.2 255.255.255.0  
  9. ip rip authentication key-chain rip-key 

3、路由器的路由表结果

  1. R1#show ip route  
  2. Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP  
  3. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area  
  4. N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2  
  5. E1 - OSPF external type 1, E2 - OSPF external type 2  
  6. i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2  
  7. ia - IS-IS inter area, * - candidate default, U - per-user static route  
  8. o - ODR, P - periodic downloaded static route  
  9.  
  10. Gateway of last resort is not set  
  11.  
  12. C    192.168.12.0/24 is directly connected, FastEthernet0/0  
  13. C    192.168.1.0/24 is directly connected, Loopback0  
  14.  
  15. R2#show ip route  
  16. Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP  
  17. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area  
  18. N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2  
  19. E1 - OSPF external type 1, E2 - OSPF external type 2  
  20. i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2  
  21. ia - IS-IS inter area, * - candidate default, U - per-user static route  
  22. o - ODR, P - periodic downloaded static route  
  23.  
  24. Gateway of last resort is not set  
  25.  
  26. C    192.168.12.0/24 is directly connected, FastEthernet0/0  
  27. R    192.168.1.0/24 [120/1] via 192.168.12.1, 00:00:15, FastEthernet0/0  
  28. C    192.168.2.0/24 is directly connected, Loopback0 

4、结论

  实例讲解RIP的认证
 

三、密文认证

1、被认证方发送key时,发送最低ID值的key,并且携带了ID;认证方接收到key后,首先在自己key chain中查找是否具有相同ID的key,如果有相同ID的key并且key相同就通过认证,key值不同就不通过认证。如果没有相同ID的key,就查找该ID往后的最近ID的key;如果没有往后的ID,认证失败。

2、验证

R1上配置为:

  1. key chain rip-key  
  2. key 1  
  3. key-string ccxx02  
  4. !  
  5. interface FastEthernet0/0  
  6. ip address 192.168.12.1 255.255.255.0  
  7. ip rip authentication mode md5  
  8. ip rip authentication key-chain rip-key 

R2上配置为:

  1. key chain rip-key  
  2. key 1  
  3. key-string ccxx01  
  4. key 2  
  5. key-string ccxx02  
  6. !  
  7. interface FastEthernet0/0  
  8. ip address 192.168.12.2 255.255.255.0  
  9. ip rip authentication mode md5  
  10. ip rip authentication key-chain rip-key 

3、路由表的输出结果为:

  1. R1#show ip route  
  2. Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP  
  3. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area  
  4. N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2  
  5. E1 - OSPF external type 1, E2 - OSPF external type 2  
  6. i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2  
  7. ia - IS-IS inter area, * - candidate default, U - per-user static route  
  8. o - ODR, P - periodic downloaded static route  
  9.  
  10. Gateway of last resort is not set  
  11.  
  12. C    192.168.12.0/24 is directly connected, FastEthernet0/0  
  13. C    192.168.1.0/24 is directly connected, Loopback0  
  14.  
  15. R2#show ip route  
  16. Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP  
  17. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area  
  18. N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2  
  19. E1 - OSPF external type 1, E2 - OSPF external type 2  
  20. i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2  
  21. ia - IS-IS inter area, * - candidate default, U - per-user static route  
  22. o - ODR, P - periodic downloaded static route  
  23.  
  24. Gateway of last resort is not set  
  25.  
  26. C    192.168.12.0/24 is directly connected, FastEthernet0/0  
  27. R    192.168.1.0/24 [120/1] via 192.168.12.1, 00:00:15, FastEthernet0/0  
  28. C    192.168.2.0/24 is directly connected, Loopback0 

4、结论  

 
实例讲解RIP的认证

RIP认证的实验就为大家介绍完了,希望大家已经掌握!

【编辑推荐】

  1. 路由器基础知识之路由器的配置过程
  2. 路由故障:VRRP备份组的状态不停切换
  3. 路由故障:BFD for VPN-BFD会话无法建立
  4. 路由故障:ACL未指定VPN实例导致网管失效 

相关内容

热门资讯

如何允许远程连接到MySQL数... [[277004]]【51CTO.com快译】默认情况下,MySQL服务器仅侦听来自localhos...
如何利用交换机和端口设置来管理... 在网络管理中,总是有些人让管理员头疼。下面我们就将介绍一下一个网管员利用交换机以及端口设置等来进行D...
施耐德电气数据中心整体解决方案... 近日,全球能效管理专家施耐德电气正式启动大型体验活动“能效中国行——2012卡车巡展”,作为该活动的...
Windows恶意软件20年“... 在Windows的早期年代,病毒游走于系统之间,偶尔删除文件(但被删除的文件几乎都是可恢复的),并弹...
20个非常棒的扁平设计免费资源 Apple设备的平面图标PSD免费平板UI 平板UI套件24平图标Freen平板UI套件PSD径向平...
德国电信门户网站可实时显示全球... 德国电信周三推出一个门户网站,直观地实时提供其安装在全球各地的传感器网络检测到的网络攻击状况。该网站...
为啥国人偏爱 Mybatis,... 关于 SQL 和 ORM 的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行...
《非诚勿扰》红人闫凤娇被曝厕所... 【51CTO.com 综合消息360安全专家提醒说,“闫凤娇”、“非诚勿扰”已经被黑客盯上成为了“木...