OSPF supports packet authentication. Only the packets that are authenticated can be accepted. If packets fail to be authenticated, the neighbor relationship cannot be established.
By default, authentication is not configured for OSPF area. Configuring authentication is recommended to ensure system security.
The system view is displayed.
The OSPF process view is displayed.
The OSPF area view is displayed.
Run authentication-mode simple [ plain plain-text | [ cipher ] cipher-text ]
Simple authentication is configured for the OSPF area.
When configuring an authentication password, select the ciphertext mode because the password is saved in configuration files in simpletext if you select simpletext mode, which has a high risk. To ensure device security, change the password periodically.
Run authentication-mode { md5 | hmac-md5 | hmac-sha256 } [ key-id { plain plain-text | [ cipher ] cipher-text } ]
Cipher-text authentication is configured for the OSPF area.
For the sake of security, using the HMAC-SHA256 algorithm rather than the MD5 and HMAC-MD5 algorithm is recommended.
Run authentication-mode keychain Keychain-Name
The Keychain authentication is configured for the OSPF area.
Before using the Keychain authentication, you must run the keychain command to create a keychain. Then, run the key-id, key-string, and algorithm commands to configure a key ID, a password, and an authentication algorithm for this keychain. Otherwise, the OSPF authentication will fail.
The configuration is committed.