Configuring OSPF on Interfaces

To enable OSPF on the routing device, you must configure OSPF on at least one of the routing device’s interfaces. How you configure an interface depends on whether the interface is connected to a broadcast or point-to-point network, a point-to-multipoint network, or a nonbroadcast, multiaccess network.

Note: When you configure OSPFv2 on an interface, you must also include the family inet statement at the [edit interfaces interface-name unit logical-unit-number] hierarchy level. When you configure OSPFv3 on an interface, you must also include the family inet6 statement at the [edit interfaces interface-name unit logical-unit-number] hierarchy level. For more information about the family inet statement, see the Junos Network Interfaces Configuration Guide. In Junos OS Release 9.2 and later, you can configure OSPFv3 to support address families other than unicast IPv6. For more information, see Configuring Multiple Address Families for OSPFv3.

To configure OSPF on an interface, you can perform the following tasks:

Configuring an Interface on a Broadcast or Point-to-Point Network

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), include the following form of the interface statement:

area area-id {interface interface-name;}

For a list of hierarchy levels at which you can include this statement, see the statement summary section for this statement.

Specify the interface by IP address or 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. For more information about interface names, see the Junos Network Interfaces Configuration Guide.

Note: Using both the interface name and IP address of the same interface produces an invalid configuration.

Configuring an Interface on a Point-to-Multipoint Network

When you configure OSPFv2 on a nonbroadcast multiaccess (NBMA) network, such as a multipoint ATM or Frame Relay, OSPFv2 operates by default in point-to-multipoint mode. In this mode, OSPFv2 treats the network as a set of point-to-point links. Because there is no autodiscovery mechanism, each neighbor must be configured.

To configure OSPFv2 in point-to-multipoint mode, include the following statement:

interface interface-name {neighbor address;}

For a list of hierarchy levels at which you can include this statement, see the statement summary section for this statement.

Specify the interface by IP address or interface name. Using both the IP address and interface name produces an invalid configuration. For more information about interface names, see the Junos Network Interfaces Configuration Guide.

To configure multiple neighbors, include a neighbor statement for each neighbor.

Configuring an Interface on a Nonbroadcast, Multiaccess Network

When configuring OSPFv2 on an NBMA network, you can use nonbroadcast mode rather than point-to-multipoint mode. Using this mode offers no advantages over point-to-multipoint mode, but it has more disadvantages than point-to-multipoint mode. Nevertheless, you might occasionally find it necessary to configure nonbroadcast mode to interoperate with other equipment.

Nonbroadcast mode treats the NBMA network as a partially connected LAN, electing designated and backup designated routers. All routing devices must have a direct connection to both the designated and backup designated routers, or unpredictable results occur.

To configure nonbroadcast mode, include the following statements:

interface interface-name {interface-type nbma;neighbor address <eligible>;poll-interval seconds;}

For a list of hierarchy levels at which you can include these statements, see the statement summary sections for these statements.

Specify the interface by IP address or interface name. Using both an IP address and interface name produces an invalid configuration. For more information about interface names, see the Junos Network Interfaces Configuration Guide.

Note: For nonbroadcast interfaces, specify the IP address of the nonbroadcast interface as the interface-name.

To configure multiple neighbors, include a neighbor statement for each neighbor.

OSPF routing devices normally discover their neighbors dynamically by listening to the broadcast or multicast hello packets on the network. Because an NBMA network does not support broadcast (or multicast), the routing device cannot discover its neighbors dynamically, so you must configure all the neighbors statically. Do this by including the neighbor statement and specifying the IP address of each neighboring routing device in the address option. To configure multiple neighbors, include multiple neighbor statements. If the neighbor is allowed to become the designated router, include the eligible keyword.

By default, the routing device sends hello packets out the interface every 120 seconds before it establishes adjacency with a neighbor. To modify this interval, include the poll-interval statement.

Configuring an OSPF Demand Circuit Interface

A demand circuit is a connection on which you can limit traffic based on user agreements. The demand circuit can limit bandwidth or access time based upon agreements between the provider and user.

Demand circuits can be used to implement Integrated Services Digital Network (ISDN). For this application, demand circuits are configured on point-to-point and point-to-multipoint interfaces. For more information on ISDN, see the Junos OS Interfaces and Routing Configuration Guide.

Demand circuits can be configured on an OSPF interface. When the interface becomes a demand circuit, all hello packets and link-state advertisements are suppressed as soon as OSPF synchronization is achieved. Hello packets and link-state advertisements are sent and received on a demand-circuit interface only when there is a change in the network topology. This reduces the amount of traffic through the OSPF interface.

To configure an OSPF interface as a demand circuit, include the demand-circuit statement:

area area-id {demand-circuit;}

For a list of hierarchy levels at which you can include this statement, see the statement summary section for this statement.

A demand-circuit interface automatically negotiates demand-circuit connection with its OSPF neighbor. If the neighbor does not support demand circuits, then no demand circuit connection is established.