Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

interface (Protocols OSPF)

 

Syntax

Hierarchy Level

Release Information

Statement introduced before Junos OS Release 7.4.

Statement introduced in Junos OS Release 9.0 for EX Series switches.

Support for the topology statement introduced in Junos OS Release 9.0.

Support for the topology statement introduced in Junos OS Release 9.0 for EX Series switches.

Support for the realm statement introduced in Junos OS Release 9.2.

Support for the realm statement introduced in Junos OS Release 9.2 for EX Series switches.

Support for the no-interface-state-traps statement introduced in Junos OS Release 10.3. This statement is supported only for OSPFv2.

Statement introduced in Junos OS Release 11.3 for the QFX Series.

Description

Enable OSPF routing on a routing device interface.

You must include at least one interface statement in the configuration to enable OSPF on the routing device.

Options

interface-nameSpecify the interface by IP address or interface name for OSPFv2, or only the interface name for OSPFv3. Using both the interface name and IP address of the same interface produces an invalid configuration. To configure all interfaces, you can specify all. Specifying a particular interface and all produces an invalid configuration.
Note

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

disableDisable OSPF, an OSPF interface, or an OSPF virtual link. By default, control packets sent to the remote end of a virtual link must be forwarded using the default topology. In addition, the transit area path consists only of links that are in the default topology. You can disable a virtual link for a configured topology, but not for a default topology. Include the disable statement at the [edit protocols ospf area area-id virtual-link neighbor-id router-id transit-area area-id topology name] hierarchy level.
Note

If you disable the virtual link by including the disable statement at the [edit protocols ospf area area-id virtual-link neighbor-id router-id transit-area area-id] hierarchy level, you disable the virtual link for all topologies, including the default topology. You cannot disable the virtual link only in the default topology.

dead-interval secondsSpecify how long OSPF waits before declaring that a neighboring routing device is unavailable. This is an interval during which the routing device receives no hello packets from the neighbor. The interval to wait is in seconds, and can range from 1 through 65,535 seconds. The default is four times the hello interval—40 seconds (broadcast and point-to-point networks); 120 seconds (nonbroadcast multiple access (NBMA) networks).
demand-circuitConfigure an interface as a demand circuit.
flood-reductionSpecify to send self-generated link-state advertisements (LSAs) with the DoNotAge bit set. As a result, self-originated LSAs are not reflooded every 30 minutes, as required by OSPF by default. An LSA is refreshed only when the content of the LSA changes, which reduces OSPF traffic overhead in stable topologies.
hello-interval secondsSpecify how often, in seconds, the routing device sends hello packets out the interface. The hello interval must be the same for all routing devices on a shared logical IP network. The valid range is 1 through 255 seconds. The default is 10 seconds (broadcast and point-to-point networks); 30 seconds (non-broadcast multiple access [NBMA] networks)
ipsec-sa nameApply the named IPsec authentication to the OSPF interface or virtual link or to an OSPFv2 remote sham link.
ldp-synchronizationEnable synchronization by advertising the maximum cost metric until LDP is operational on the link. LDP distributes labels in non-traffic-engineered applications. Labels are distributed along the best path determined by OSPF. If the synchronization between LDP and OSPF is lost, the label-switched path (LSP) goes down. Therefore, OSPF and LDP synchronization is beneficial. When LDP synchronization is configured and when LDP is not fully operational on a given link (a session is not established and labels are not exchanged), OSPF advertises the link with the maximum cost metric. The link is not preferred but remains in the network topology.

LDP synchronization is supported only on point-to-point interfaces and LAN interfaces configured as point-to-point interfaces under OSPF. LDP synchronization is not supported during graceful restart. To advertise the maximum cost metric until LDP is operational for LDP synchronization, include the ldp-synchronization statement.

disableDisable LDP synchronization for IS-IS.
hold-time seconds The time period to advertise the maximum cost metric for a link that is not fully operational. The range is 1 through 65,535 seconds. The default is infinity.
Note

When an interface has been in the holddown state for more than 3 minutes, a system log message with a warning level is sent. This message appears in both the messages file and the trace file.

metric metricSpecify the cost of an OSPF interface. The cost is a routing metric that is used in the link-state calculation. To set the cost of routes exported into OSPF, configure the appropriate routing policy. Range is 1 through 65,535. By default, the cost of an OSPF route is calculated by dividing the reference-bandwidth value by the bandwidth of the physical interface. Any specific value you configure for the metric overrides the default behavior of using the reference-bandwidth value to calculate the cost of the route for that interface.
neighbor address <eligible>For non-broadcast interfaces only, specify neighboring routers. On a non-broadcast interface, you must specify neighbors explicitly because OSPF does not send broadcast packets to dynamically discover their neighbors. To specify multiple neighbors, include multiple neighbor statements.
  • address—IP address of a neighboring router.

  • eligible—(Optional) Allow the neighbor to become a designated router. If you omit this option, the neighbor is not considered eligible to become a designated router.

no-eligible-backupExclude the specified interface as a backup interface for OSPF interfaces on which link protection or node-link protection is enabled.
no-interface-state-trapsDisable the OSPF traps for interface state changes. This statement is particularly useful for OSPF interfaces in passive mode.
Note

The no-interface-state-traps statement is supported only for OSPFv2.

node-link-protectionEnable node-link protection on the specified OSPF interface. Junos OS creates an alternate loop-free path to the primary next hop for all destination routes that traverse a protected interface. This alternate path avoids the primary next-hop router altogether and establishes a path through a different router.
Note

This feature is not supported for the OSPF IPv4 multicast topology or for the OSPFv3 IPv4 multicast or IPv6 multicast topologies because node-link protection creates alternate next-hop paths only for unicast routes.

poll-interval secondsFor non-broadcast interfaces only, specify how often, in seconds, the router sends hello packets out of the interface before it establishes adjacency with a neighbor. The valid range is from 1 to 255 seconds, and the default is 120 seconds.
priority numberSpecify the routing device’s priority for becoming the designated routing device. The routing device that has the highest priority value on the logical IP network or subnet becomes the network’s designated router. You must configure at least one routing device on each logical IP network or subnet to be the designated router. You also should specify a routing device’s priority for becoming the designated router on point-to-point interfaces.

The value number is the device’s priority for becoming the designated router. A priority value of 0 means that the routing device never becomes the designated router. A value of 1 means that the routing device has the least chance of becoming a designated router. The range is 0 through 255, and the default is 128.

retransmit-interval secondsSpecify how long the routing device waits to receive a link-state acknowledgment packet before retransmitting link-state advertisements (LSAs) to an interface’s neighbors. The range is from 1 through 65,535 seconds, and the default is 5 seconds.
Note

You must configure LSA retransmit intervals to be equal to or greater than 3 seconds to avoid triggering a retransmit trap, because Junos OS delays LSA acknowledgments by up to 2 seconds.

secondaryConfigure an interface to belong to another OSPF area. A logical interface can be configured as primary interface only for one area. For any other area for which you configure the interface, you must configure it as a secondary interface.
strict-bfdEnable strict bidirectional forwarding detection over an interface for OSPF.
te-metric metricMetric value used by traffic engineering for information injected into the traffic engineering database. The value of the traffic engineering metric does not affect normal OSPF forwarding. Valid metric values can range from 1 through 65,535. The default is the IGP metric value.
transit-delay secondsSet the estimated time required to transmit a link-state update on the interface. When calculating this time, make sure to account for transmission and propagation delays. The valid range is 1 through 65,535 seconds, with a default of 1 second.
Note

You should never have to modify the transit delay time.

The remaining statements are explained separately. See CLI Explorer.

Note

You cannot run both OSPF and ethernet-tcc encapsulation between two Juniper Networks routing devices.

Required Privilege Level

routing—To view this statement in the configuration.

routing-control—To add this statement to the configuration.