尝试3 在P1规模内实现基于RIPv2的Key-Chain密钥尝试
[P1R1]
key chain cisco
key 1
key-string mypass
wordint f0/0
ip rip auth key-chain cisco
ip rip auth mode md 5
int s1/1
ip rip auth key-chain cisco
ip rip auth mode md5
验证结不美观
在P1R1上界说密钥往后,分袂在s1/1和f0/0膳缦沔启用,在其他路由器并没有启用不异的密钥的时辰,经由过程debug ip rip eve查看:
16:18:45: RIP: ignored v2 packet from 192.168.1.2 (invalid authentication)
sh ip route查看
R 192.168.3.0/24 is possibly down, routing via 192.168.2.2, FastEthernet0/0
声名因为密钥匹配原因,packet ignored,而且路由条目状况转变为possibly down
在P1R2上界说同样密钥后
debug 信息显示
Page 5 of Cisco Tec! - Powered by Discuz! Board 31
P1R4上sh ip route,可以看到
16:31:16: RIP: received packet with MD5 authentication
认证成功
附加部门
在P1R2上采用同样密钥,可是在接口上应用的时辰如不美观采用明文体例 ip rip auth mod text(P1R1采用MD5加密)
因为双方不匹配,则一样会invalid authentication
注重
可以在路由器上设置装备摆设RIPv2动静认证搜罗:明文或MD5加密密码
在钥匙链(key-chain)上界说多个秘钥(key)或密码,后者可选
界说秘钥链名称:key chain test
界说秘钥 key 1
界说密码key-string cisco
在接口上启用 int e0/0 ip rip authentication key-chain test
界说发送体例 ip rip authtication mode md5
记住,钥匙链-钥匙-钥匙的凹凸代表密码,必需在个锁(接口)上使用此钥匙()
sh ip pro可以查看version和keychain情形
Default version control: send version 2, receive version 2
interface Send Recv Triggered RIP Key-chain
FastEthernet0/0 2 2 cisco
Serial1/1 2 2 cisco
Loopback0 2 2