Configuring HMAC-SHA-1 or HMAC-SHA-256 authentication on an OSPFv2 interface

To configure HMAC-SHA-1 or HMAC-SHA-256 authentication on an OSPFv2 interface, complete the following steps.
  1. Enter the configure terminal command to access global configuration mode.
    device# configure terminal
  2. Enter the interface command and specify an interface.
    device(config)# interface ve 1
  3. Enter the ip ospf authentication command with the required authentication option and parameters. The following example enables HMAC-SHA-1 authentication with key ID 10 and key string "mypasswordkey".
    device(config-vif-1)# ip ospf authentication hmac-sha-1 key-id 10 key mypasswordkey

The following example enables HMAC-SHA-1 authentication using the key ID 10 and key string "mypasswordkey" on the specified interface.

device# configure terminal
device(config)# interface ve 1
device(config-vif-1)# ip ospf authentication hmac-sha-1 key-id 10 key mypasswordkey