实例讲解RIP的认证

网络 路由交换
Cisco支持使RIP认证有效的两种接口认证模式:纯文本认证 和MD5认证。RIP包的缺省认证模式为纯文本认证。因为每一个RIP包发送的是未加密的认证值,为安全起见,RIP包不要使用纯文本认证。当安全不成为问题时,例如确保设置的主机不参加路由选择,可使用纯文本认证。

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

一、实验拓扑如图:

 

实例讲解RIP的认证

二、明文验证

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

2、验证

R1上配置为:

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

R2上配置为:

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

3、路由器的路由表结果

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

4、结论

 
实例讲解RIP的认证
 

三、密文认证

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

2、验证

R1上配置为:

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

R2上配置为:

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

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

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

4、结论  

 
实例讲解RIP的认证

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

【编辑推荐】

  1. 路由器基础知识之路由器的配置过程
  2. 路由故障:VRRP备份组的状态不停切换
  3. 路由故障:BFD for VPN-BFD会话无法建立
  4. 路由故障:ACL未指定VPN实例导致网管失效 
责任编辑:佚名 来源: Cisco技术网
相关推荐

2011-04-07 13:09:03

明文验证

2010-08-06 09:38:58

RIP报文

2009-06-09 11:23:23

思科ripsecondary 地

2010-06-10 15:46:07

RIP路由协议

2009-12-15 14:29:52

RIP路由协议

2010-08-06 09:47:36

RIP路由协议

2011-05-23 13:24:01

2009-11-23 17:31:49

PHP时间戳

2009-11-23 20:16:17

PHP接口特性

2013-01-10 14:54:48

Android开发组件Intent

2010-09-14 17:20:57

2011-04-02 16:37:26

PAT

2010-06-03 18:22:38

Hadoop

2010-04-20 16:34:31

2009-11-23 15:32:13

PHP获取远程URL

2009-11-23 14:44:22

PHP 5.0构造函数

2010-05-11 20:17:23

NTLM认证协议

2010-09-03 10:23:49

PPP Multili

2011-04-02 16:33:33

2009-08-28 16:37:32

C# for循环
点赞
收藏

51CTO技术栈公众号