OSPF支持两种认证方式:
1、接口认证
只有该接口发出的OSPF报文头部携带认证信息。
接口配置
[R4-GigabitEthernet0/0/1]ospf authentication-mode ?
hmac-md5 Use HMAC-MD5 algorithm
keychain Keychain authentication mode
md5 Use MD5 algorithm
null Use null authentication //不认证
simple Simple authentication mode //明文认证
2、区域认证
在区域视图下配置认证,那么凡是宣告在这个区域的接口发出的OSPF报文头部中,都会携带认证信息。
区域配置
[R3-ospf-1-area-0.0.0.2]authentication-mode ?
hmac-md5 Use HMAC-MD5 algorithm
keychain Keychain authentication mode
md5 Use MD5 algorithm
simple Simple authentication mode
注意:如果一台路由器上同时配置了接口认证和区域认证,那么接口认证优于区域认证!!!