Example: Enabling Authentication for OSPF Exchanges

This example shows how to enable authentication for OSPF exchanges.

Requirements

Before you begin:

  1. Configure network interfaces. See the Junos OS Interfaces Configuration Guide for Security Devices.
  2. Configure security filters. See the Junos OS Security Configuration Guide.
  3. Configure the router identifiers for the devices in your OSPF network. See Example: Configuring an OSPF Router Identifier.
  4. Control OSPF designated router election. See Example: Controlling OSPF Designated Router Election.
  5. Configure a single-area OSPF network. See Example: Configuring a Single-Area OSPF Network.
  6. Configure a multiarea OSPF network. See Example: Configuring a Multiarea OSPF Network.
  7. Configure stub and not-so-stubby areas. See Example: Configuring OSPF Stub and Not-So-Stubby Areas.

Overview

You can enable either of two authentication types:

In this example, you set the authentication type to md5, and then define the password as Chey3nne and key ID as 2.

Configuration

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode.

To enable authentication for OSPF exchanges:

  1. Create an OSPF area.
    [edit]user@host# edit protocols ospf area 0.0.0.0
  2. Set the authentication type.
    [edit protocols ospf area 0.0.0.0]user@host# set authentication-type md5
  3. Create an interface.
    [edit]user@host# edit interface ge-0/0/0
  4. Set an authentication password and key identifier.
    [edit protocols ospf area 0.0.0.0 interface ge-0/0/0]user@host# set authentication-key Chey3nne key-id 2
  5. If you are done configuring the device, commit the configuration.
    [edit]user@host# commit

Verification

To verify the configuration is working properly, enter the show protocols ospf command.

Related Topics