Configuring OSPF Authentication
For security purposes, you can configure OSPF to authenticate every OSPF
packet and the source of every OSPF routing update. By default, the router does
no authentication. OSPF supports three types of authentication:
�¡ Null authentication for a link that does not use authentication at all
�¡ Simple (plain text) authent
The following example shows a router configured for simple password
authentication in OSPF area 1, using a password of “simple”. Note that
authentication commands are necessary both under the OSPF process and
the interface configuration. All OSPF neighbors reachable through an interface
configured for authentication must use the same password. You can,
however, use different passwords for different interfaces.
Router(config)#int gi0/0
Router(config-if)#ip ospf authentication-key simple
Router(config-if)#ip ospf authentication
Router(config-if)#!
Router(config-if)#router ospf 1
Router(config-router)#area 1 authentication
The next example shows the same router configured for OSPF MD5 authentication
for area 0, using a password of “secure”. Note that the commands
are slightly different. The optional keyword message-digest is required in
two of the commands, and a key number must be specified. Any neighbors
reachable through the Gi0/1 interface must also be configured with the same
key.
Router(config-router)#int gi0/1
Router(config-if)#ip ospf message-digest-key 2 md5 secure
Router(config-if)#ip ospf authentication message-digest
Router(config-if)#!
Router(config-if)#router ospf 1
Router(config-router)#area 0 authentication message-digest