ip ospf authentication-key

Use this command to assign a password to be used by neighboring routers using OSPF‘s simple password authentication.

Syntax

ip ospf authentication-key password
no ip ospf authentication-key

Parameters

password Specifies an OSPF authentication password. Valid values are alphanumeric strings up to 8 bytes in length.

Defaults

None.

Mode

Configuration command, Interface configuration.

Usage

All neighboring routers on the same network must have the same password configured to be able to exchange OSPF information.

This password is used as a “key” that is inserted directly into the OSPF header in routing protocol packets. A separate password can be assigned to each OSPF network on a per-interface basis.

The “no” form of this command removes an OSPF authentication password on an interface.

Example

This example shows how to enable an OSPF authentication key on VLAN 1 with the password “yourpass”:

System(rw-config)->interface vlan 1
System(rw-config-intf-vlan.0.1)->ip ospf authentication-key yourpass