作家
登录

实例讲解RIP的认证

作者: 来源: 2012-06-20 11:26:29 阅读 我要评论

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实例导致网管失效 

  推荐阅读

  路由器基础之GRE配置

GRE 下的网络安全与常规的 IPv4 网络安全是较为相似的,GRE 下的路由采用 IPv4 原本使用的路由,但路由过滤保持不变 。包过滤要求防火墙检查 GRE 包,或者在 GRE 隧道终点完成过滤过程。在那些这被看作是安全问题的环>>>详细阅读


本文标题:实例讲解RIP的认证

地址:http://www.17bianji.com/luyou/5839.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)