ip ospf message-digest-key
Use this command to register an MD5 key for OSPF authentication.
Use the no parameter with this command to remove an MD5 key.
Message Digest Authentication is cryptographic authentication. A key (password) and key-id are configured on each router. The router uses an algorithm based on the OSPF packet, the key, and the key-id to generate a message digest that is appended to the packet.
Use this command for uninterrupted transitions between passwords. This is helpful for administrators who want to change the OSPF password without disrupting communication. The system begins a rollover process until all the neighbors have adopted the new password. This allows neighboring routers to continue communication while the network administrator is updating them with a new password. The router will stop sending duplicate packets once it detects that all of its neighbors have adopted the new password.
Maintain only one password per interface, removing the old password whenever you add a new one. This prevents the local system from continuing to communicate with the system that is using the old password. Removing the old password also reduces overhead during rollover. All neighboring routers on the same network must have the same password value to enable exchange of OSPF routing data.
Command Syntax
ip ospf (A.B.C.D|) message-digest-key <1-255> md5 WORD
no ip ospf (A.B.C.D|) message-digest-key <1-255>
Parameters
A.B.C.D
IPv4 address of the interface.
message-digest-key
Message digest authentication password (key).
<1-255>
Specify a key ID.
md5
Specify a key (password) (1-16 characters).
WORD
Specify an encrypted password (key).
Default
By default, MD5 key for OSPF authentication is disabled.
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
The following example shows OSPF authentication on the interface eth0 when IP address has not been specified.
#configure terminal
(config)#interface eth0
(config-if)#ip ospf authentication message-digest
(config-if)#ip ospf message-digest-key 1 md5 yourpass
(config-if)#sh run int xe1
!
interface xe1
ip ospf authentication
ip ospf authentication-key 0x94eebee8c349a4b0
ip ospf message-digest-key 1 md5 0x94eebee8c349a4b0
!
(config-if)#ip ospf message-digest-key 1 md5 0x94eebee8c349a4b0 - encrypted password of 16 characters which can be obtained from sh run <int>
The following example shows OSPF authentication on the interface eth0 for the IP address 1.1.1.1. (If the interface has two IP addresses assigned-- 1.1.1.1 & 2.2.2.2, OSPF authentication will be enabled only for the IP address 1.1.1.1)
(config)#interface eth0
(config-if)#ip ospf 1.1.1.1 authentication message-digest
(config-if)#ip ospf 1.1.1.1 message-digest-key 2 md5 yourpass
Last modified date: 10/16/2023