Related Documentation
Example: Configuring Simple Authentication for OSPFv2 Exchanges
This example shows how to enable simple authentication for OSPFv2 exchanges.
Requirements
Before you begin:
- Configure the device interfaces. See the Router Interfaces or the Junos OS Interfaces Configuration Guide for Security Devices.
- Configure the router identifiers for the devices in your OSPF network. See Example: Configuring an OSPF Router Identifier.
- Control OSPF designated router election. See Example: Controlling OSPF Designated Router Election
- Configure a single-area OSPF network. See Example: Configuring a Single-Area OSPF Network.
- Configure a multiarea OSPF network. See Example: Configuring a Multiarea OSPF Network.
Overview
Simple authentication uses a plain-text password that is included in the transmitted packet. The receiving routing device uses an authentication key (password) to verify the packet. Plain-text passwords are not encrypted and might be subject to packet interception. This method is the least secure and should only be used if network security is not your goal.
You can configure only one simple authentication key (password) on the routing device. The simple key can be from 1 through 8 characters and can include ASCII strings. If you include spaces, enclose all characters in quotation marks (“ “).
In this example, you specify OSPFv2 interface so-0/1/0 in area 0.0.0.0, set the authentication type to simple-password, and define the key as PssWd4.
Configuration
CLI Quick Configuration
To quickly configure simple authentication, copy the following command, removing any line breaks, and then paste the command into the CLI. You must configure all routing devices within the area with the same authentication and corresponding password.
Step-by-Step Procedure
To enable simple authentication for OSPFv2 exchanges:
- Create an OSPF area.[edit]user@host# edit protocols ospf area 0.0.0.0
- Specify the interface.[edit protocols ospf area 0.0.0.0]user@host# edit interface so-0/1/0
- Set the authentication type and the password. [edit protocols ospf area 0.0.0.0 interface so-0/1/0.0]user@host# set authentication simple-password PssWd4
- If you are done configuring the device, commit the configuration.[edit protocols ospf area 0.0.0.0 interface so-0/1/0.0]user@host# commit
Note: Repeat this entire configuration on all peer OSPFv2 routing devices in the area.
Results
Confirm your configuration by entering the show protocols ospf command. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
![]() | Note: After you configure the password, you do not see the password itself. The output displays the encrypted form of the password you configured. |
Verification
Confirm that the configuration is working properly.
Verifying the Configured Authentication Method
Purpose
Verify that the authentication method for sending and receiving OSPF protocol packets is configured. The Authentication Type field displays Password when configured for simple authentication.
Action
From operational mode, enter the show ospf interface and the show ospf overview commands.