Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    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:

    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.

    [edit] set interfaces ge-0/2/0 unit 0 family inet address 10.0.0.1set protocols ospf area 0.0.0.1 interface ge-0/2/0

    Step-by-Step Procedure

    To configure an OSPF interface on a broadcast or point-to-point network:

    1. 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
    2. 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
    3. Assign the interface to the area.
      [edit protocols ospf area 0.0.0.1 ]user@host# set interface ge-0/2/0
    4. 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.

    user@host# show interfacesge-0/2/0 {unit 0 {family inet {address 10.0.0.1/32;}}}
    user@host# show protocols ospfarea 0.0.0.1 {interface ge-0/2/0.0;}

    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.

    Published: 2012-12-08