ip ospf authentication

Configures MD5, HMAC-SHA-1 or HMAC-SHA-256 authentication for Open Shortest Path First version 2 (OSPFv2).
Syntax
ip ospf authentication { md5 | hmac-sha-1 | hmac-sha-256} key-id key-id-val key key-string
no ip ospf authentication { md5 | hmac-sha-1 | hmac-sha-256} key-id-val key key-string
Command Default

MD5, HMAC-SHA-1 or HMAC-SHA-256 authentication is disabled by default.

Parameters
md5
Specifies MD5 authentication.
HMAC-SHA-1
Specifies HMAC-SHA-1 authentication.
HMAC-SHA-256
Specifies HMAC-SHA-256 authentication.
key-id key-id-val
Identifies the number of the MD5, HMAC-SHA-1 or HMAC-SHA-256 algorithm. The number can be from 1 through 255.
key key-string
Sets the corresponding key string to be used with the MD5, HMAC-SHA-1 or HMAC-SHA-256 algorithm. The recommended key string length is 1 through 63 characters.
Modes

Interface subtype configuration mode

Usage Guidelines

Use this command to set or reset the MD5, HMAC-SHA-1 or HMAC-SHA-256 authentication configuration on the OSPFv2 interface to which you are connected.

The no form of the command removes the MD5, HMAC-SHA-1 or HMAC-SHA-256 authentication configuration from the OSPFv2 interface.

Examples

The following example sets HMAC-SHA-1 authentication with key ID '10' and the password key "mypasswordkey", on the OSPFv2 interface.

device# configure terminal
device(config)# interface ve 1
device(config-vif-1)# ip ospf authentication hmac-sha-1 key-id 10 key mypasswordkey
 
History
Release Command History
08.0.70 This command was introduced.