Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Configuring a Passive OSPF Interface

This example shows how to configure a passive OSPF interface. A passive OSPF interface advertises its address but does not run the OSPF protocol.

Requirements

Before you begin:

Overview

By default, OSPF must be configured on an interface for direct interface addresses to be advertised as interior routes. To advertise the direct interface addresses without actually running OSPF on that interface (adjacencies are not formed and hello packets are not generated), you configure that interface as a passive interface.

Enabling OSPF on an interface (by including the interface statement), disabling it (by including the disable statement), and not actually having OSPF run on an interface (by including the passive statement) are mutually exclusive states.

Note: If you do not want to see notifications for state changes in a passive OSPF interface, you can disable the OSPF traps for the interface by including the no-interface-state-traps statement. The no-interface-state-traps statement is supported only for OSPFv2.

In this example, you configure interface ge-0/2/0 as a passive OSPF interface in area 0.0.0.1 by including the passive statement.

Configuration

CLI Quick Configuration

To quickly configure a passive OSPF interface, copy the following command and paste it into the CLI.

[edit] set protocols ospf area 0.0.0.1 interface ge-0/2/0 passive

Step-by-Step Procedure

To configure a passive OSPF interface:

  1. Create an OSPF area.

    Note: For an OSPFv3 interface, include the ospf3 statement at the [edit protocols] hierarchy level.

    [edit]user@host# edit protocols ospf area 0.0.0.1
  2. Configure the passive interface.
    [edit protocols ospf area 0.0.0.1 ]user@host# set interface ge-0/2/0 passive
  3. If you are done configuring the device, commit the configuration.
    [edit protocols ospf area 0.0.0.1]user@host# commit

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.

user@host# show protocols ospfarea 0.0.0.1 {interface ge-0/2/0.0 {passive;}}

To confirm your OSPFv3 configuration, enter the show protocols ospf3 command.

Verification

Confirm that the configuration is working properly.

Verifying the Status of OSPF Interfaces

Purpose

Verify the status of the OSPF interface. If the interface is passive, the Adj count field is 0 because no adjacencies have been formed. Next to this field, you might also see the word Passive.

Action

From operational mode, enter the show ospf interface detail command for OSPFv2, and enter the show ospf3 interface detail command for OSPFv3.

Published: 2012-12-08