Related Documentation
Example: Configuring an Interface on a Broadcast or Point-to-Point Network
This example shows how to configure an OSPF interface on a broadcast or point-to-point network.
Requirements
Before you begin:
- 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 multiarea OSPF network. See Example: Configuring a Multiarea OSPF Network.
Overview
If the interface on which you are configuring OSPF supports broadcast mode (such as a LAN), or if the interface supports point-to-point mode (such as a PPP interface or a point-to-point logical interface on Frame Relay), you specify the interface by including the IP address or the interface name for OSPFv2, or only the interface name for OSPFv3. In Junos OS Release 9.3 and later, an OSPF point-to-point interface can be an Ethernet interface without a subnet. If you configure an interface on a broadcast network, designated router and backup designated router election is performed.
![]() | Note: Using both the interface name and the IP address of the same interface produces an invalid configuration. |
In this example, you configure interface ge-0/2/0 as an OSPFv2 interface in OSPF area 0.0.0.1.
Configuration
CLI Quick Configuration
To quickly configure an OSPF interface on a broadcast or point-to-point network, copy the following commands and paste them into the CLI.
Step-by-Step Procedure
To configure an OSPF interface on a broadcast or point-to-point network:
- Configure the interface.

Note: For an OSPFv3 interface, specify an IPv6 address.
[edit]user@host# set interfaces ge-0/2/0 unit 0 family inet address 10.0.0.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 - Assign the interface to the area.[edit protocols ospf area 0.0.0.1 ]user@host# set interface ge-0/2/0
- 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 interfaces and the show protocols ospf commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
To confirm your OSPFv3 configuration, enter the show interfaces and the show protocols ospf3 commands.
Verification
Confirm that the configuration is working properly.
Verifying the OSPF Interface
Purpose
Verify the interface configuration. Depending on your deployment, the Type field might display LAN or P2P.
Action
From operational mode, enter the show ospf interface detail command for OSPFv2, and enter the show ospf3 interface detail command for OSPFv3.

