试验30 配置RIP认证


R1配置

r1(config)#int s1/2
r1(config-if)#ip add 192.168.0.1 255.255.255.0
r1(config-if)#no sh
r1(config-if)#int lo0
r1(config-if)#ip add 172.16.0.1 255.255.255.0
r1(config-if)#exit
r1(config)#key ?
chain       Key-chain management
config-key  Set a private configuration key
r1(config)#key chain R1                                                key chain名为R1
r1(config-keychain)#key 100                                         设置第一组key名字为100
r1(config-keychain-key)#key-string huawei                   key值为huawei
r1(config-keychain-key)#exit
r1(config-keychain)#key 200                                         设置第二组key名字为200
r1(config-keychain-key)#key-string 3com                      key值为3com
接口下调用
r1(config)#int s1/2
r1(config-if)#ip rip authentication mode ?
md5   Keyed message digest
text  Clear text authentication
r1(config-if)#ip rip authentication mode md5                这里我选择为加密的md5
r1(config-if)#ip rip authentication key-chain R1
r1(config-if)#^Z

配置R1的ripv2
r1#config t
r1(config)#router rip
r1(config-router)#version 2
r1(config-router)#net 192.168.0.0
r1(config-router)#net 172.16.0.0

R2配置

r2(config)#int s2/1
r2(config-if)#ip add 192.168.0.2 255.255.255.0
r2(config-if)#no sh
r2(config-if)#int lo0
r2(config-if)#ip add 172.16.1.2 255.255.255.0
r2(config-if)#exit
r2(config)#key chain R2
r2(config-keychain)#key 100
r2(config-keychain-key)#key-string huawei
r2(config-keychain-key)#key 200
r2(config-keychain-key)#key-string 3com
r2(config-keychain-key)#exit
r2(config-keychain)#exit
r2(config)#int s2/1
r2(config-if)#ip rip authentication mode md5
r2(config-if)#ip rip authentication key-chain R2
r2(config)#router rip
r2(config-router)#net 192.168.0.0
r2(config-router)#net 172.16.0.0
r2(config-router)#exit
r2(config)#^Z

debug查看现象

r1#debug ip rip
01:44:50: RIP: received packet with MD5 authentication
01:44:50: RIP: received v2 update from 192.168.0.2 on Serial1/2
01:44:50:      172.16.0.0/16 -> 0.0.0.0 in 1 hops
01:44:50: RIP: sending v2 update to 224.0.0.9 via Serial1/2 (192.168.0.1)
01:44:50:      172.16.0.0/16 -> 0.0.0.0, metric 1, tag 0
01:44:50: RIP: sending v2 update to 224.0.0.9 via Loopback0 (172.16.0.1)
01:44:50:      172.16.0.0/16 -> 0.0.0.0, metric 2, tag 0
01:44:50:      192.168.0.0/24 -> 0.0.0.0, metric 1, tag 0
01:44:50: RIP: ignored v2 packet from 172.16.0.1 (sourced from one of our addresses)

现在收到了MD5的认证。

你可能感兴趣的:(配置,职场,认证,休闲)