BGP OSPF EIGRP RIPv2的认证总结
1.OSPF的认证
在Area0上进行区域认证:
A(config-router)#area 0 authentication message-digest //区域采用密文认证
A(config-if)#ip ospf message-digest-key 1 md5 cisco
B(config-router)#area 0 authentication message-digest
B(config-if)#ip ospf message-digest-key 1 md5 cisco
A(config-router)#area 0 authentication //区域采用明文认证
A(config-if)#ip ospf authentication-key cisco
B(config-router)#area 0 authentication
B(config-if)#ip ospf authentication-key cisco
链路上进行OSPF认证:
A(config-if)#ip ospf authentication //链路上进行OSPF明文认证
A(config-if)#ip ospf authentication-key cisco
B(config-if)#ip ospf authentication
B(config-if)#ip ospf authentication-key cisco
A(config-if)#ip ospf authentication message-digest //链路上进行OSPF密文认证
A(config-if)#ip ospf message-digest-key 1 md5 cisco
B(config-if)#ip ospf authentication message-digest
B(config-if)#ip ospf message-digest-key 1 md5 cisco
虚链路的认证配置:
A(config-router)#area 1 virtual-link 3.3.3.3 authentication-key cisco
A(config-router)#area 1 virture-link 3.3.3.3 authentication
B(config-router)#area 1 virtual-link 2.2.2.2 authentication-key cisco
B(config-router)#area 1 virture-link 2.2.2.2 authentication
A(config-router)#area 1 virtual-link 3.3.3.3 authentication message-digest
A(config-router)#area 1 virtual-link 3.3.3.3 message-digest-key 1 md5 cisco
B(config-router)#area 1 virtual-link 2.2.2.2 authentication message-digest
B(config-router)#area 1 virtual-link 2.2.2.2 message-digest-key 1 md5 cisco
2.EIGRP认证(EIGRP只支持md5认证,也只是在接口上配置认证)
A(config)#key chain cisco
A(config-keychain)#key 1
A(config-keychain-key)#key-string cisco
A(config-if)#ip authentication mode eigrp 50 md5
A(config-if)#ip authentication key-chain eigrp 90 cisco
B(config)#key chain cisco
B(config-keychain)#key 1
B(config-keychain-key)#key-string cisco
B(config-if)#ip authentication mode eigrp 50 md5
B(config-if)#ip authentication key-chain eigrp 90 cisco
EIGRP认证时,路由器发送最低ID的key,并且携带ID,只有ID和key值完全相同才能成功认证
key chain的名字都只是本地有效,key chain名字的不同不影响认证。
3.BGP认证(BGP只能采用MD5认证)
A(config-router)#neighbor 172.16.1.2 password cisco
B(config-router)#neighbor 172.16.1.1 password cisco
4.RIP认证
A(config)#key chain cisco
A(config-keychain)#key 1
A(config-keychain-key)#key-string cisco
A(config-if)#ip rip authentication mode md5|text //密文或明文验证
A(config-if)#ip rip authentication key cisco
B(config)#key chain cisco
B(config-keychain)#key 1
B(config-keychain-key)#key-string cisco
B(config-if)#ip rip authentication mode md5|text //密文或明文验证
B(config-if)#ip rip authentication key cisco
转载于:https://blog.51cto.com/cisco130/1028290