Command Reference OSPFv2 Commands
mode. Use the no form of this command to restore the default setting.
ip ospf authentication-key [ 0 | 7 ] key
no ip ospf authentication-key
Displays the key in plain text.
Displays the key in cipher text.
Key containing at most eight characters.
It is disabled by default.
Interface configuration mode
The ip ospf authentication-key command configures the key that will be inserted in all OSPF packet
headers. As a result, if the keys are inconsistent, the OSPF neighbor relationship cannot be
established between two devices directly connected, and thus route information exchange is
impossible.
The keys may vary by interface, but the devices that are connected to the same physical network
segment must use the same key.
To enable the OSPF area authentication, execute the area authentication command in routing
process configuration mode.
The authentication can be enabled separately on an interface by executing the ip ospf authentication
command in interface configuration mode. When both the interface and the area are configured with
authentication, the one for the interface takes precedence.
The following example configures the OSPF authentication key ospfauth for fast Ethernet 0/1.
Ruijie (config)#interfacefastEthernet0/1
Ruijie(config-if-FastEthernet 0/1)# ipaddress172.16.1.1
255.255.255.0
Ruijie(config-if-FastEthernet 0/1)# ip ospf authentication-key ospfauth
Enables OSPF area authentication and defines
authentication mode
Enables authentication on the interface and
defines authentication mode