Configuring HMAC-SHA-1 or HMAC-SHA-256 on an OSPFv2 Virtual Link
To configure HMAC-SHA-1 or HMAC-SHA-256 authentication on an OSPFv2 virtual link,
complete the following steps.
- Enter the
configure terminalcommand to access global configuration mode. - Enter the
ip router-idcommand to specify the required router. - Enter the
router ospfcommand to enter OSPFv2 configuration mode and enable OSPFv2 on the device. - Enter the
areaarea-IDvirtual-linkvirtual-link-addressauthenticationcommand, with the required authentication option and parameters. The following example enables HMAC-SHA-1 authentication with the key ID 10 and key string "mypasswordkey".
The following example enables HMAC-SHA-1 authentication using the key ID 10 and key string "mypasswordkey" on the specified virtual link.
device# configure terminal device(config)# ip router-id 10.1.1.1 device(config)# router ospf device(config-ospf-router)# area 1 virtual-link 20.1.1.1 authentication hmac-sha-1 key-id 10 key mypasswordkey