Configuring Interfaces for OSPF

Syntax:

set ospf

      area {backbone | <OSPF Area ID>}

            range <IPv4 Address>/<Subnet Mask>

                  {off | on}

                  restrict {off | on}

      stub-network <IPv4 Address>/<Subnet Mask>

            {off | on}

            stub-network-cost <1-677722>

set ospf interface <Name of Interface>

      authtype

            cryptographic key <ID>

                  off

                  algorithm <Hash Algorithm> secret <Secret>

            md5 key authorization key <ID> [secret md5 <Secret>]

            none

            simple <Password>

      area

            backbone {off | on}

            <OSPF Area ID> {off | on}

      cost <1-65535>

      dead-interval {<1-65535> | default}

      hello-interval {<1-65535> | default}

      ip-reachability-detection { off | on}

      passive {off | on}

      priority <0-255>

      retransmit-interval {<1-65535> | default}

Parameters:

Parameter

Description

area {backbone | <OSPF Area ID>} range <IPv4 Address>/<Subnet Mask> {off | on}

Specifies the OSPF area to which the specified interface range belongs.

Select an area from the areas already configured.
Any area can be configured with any number of address ranges.

These ranges are used to reduce the number of routing entries that a given area transmits to other areas.

If a given prefix aggregates a number of more specific prefixes within an area, you can configure an address range that becomes the only prefix advertised to other areas.

Be careful when configuring an address range that covers part of a prefix that is not contained within an area.

An address range is defined by an IP prefix and a mask length.

If you mark a range as restrict, it is not advertised to other areas.

area {backbone | <OSPF Area ID>} range <IPv4 Address>/<Subnet Mask> restrict {off | on}

Any area can be configured with any number of address ranges.

These ranges are used to reduce the number of routing entries that a given area transmits to other areas.

If a given prefix aggregates a number of more specific prefixes within an area, you can configure an address range that becomes the only prefix advertised to other areas.

Be careful when configuring an address range that covers part of a prefix that is not contained within an area.

An address range is defined by an IP prefix and a mask length.

If you mark a range as restrict, it is not advertised to other areas.

stub-network <IPv4 Address>/<Subnet Mask> {off | on}

Specifies a stub network to which the specified interface range belongs.

Configure a stub network to advertise reachability to prefixes that are not running OSPF.

The advertised prefix appears as an OSPF internal route and is filtered at area borders with the OSPF area ranges.

The prefix must be directly reachable on the router where the stub network is configured, that is, one of the router's interface addresses must fall within the prefix range to be included in the router-link-state advertisement.

Use a mask length of 32 to configure the stub host.

The local address of a point-to-point interface can activate the advertised prefix and mask.

To advertise reachability to such an address, enter an IP address for the prefix and a non-zero cost for the prefix.

stub-network <IPv4 Address>/<Subnet Mask> stub-network-cost <1-677722>

Configure a stub network to advertise reachability to prefixes that are not running OSPF.

The advertised prefix appears as an OSPF internal route and is filtered at area borders with the OSPF area ranges.

The prefix must be directly reachable on the router where the stub network is configured, that is, one of the router's interface addresses must fall within the prefix range to be included in the router-link-state advertisement.

Use a mask length of 32 to configure the stub host.

The local address of a point-to-point interface can activate the advertised prefix and mask.

To advertise reachability to such an address, enter an IP address for the prefix and a non-zero cost for the prefix.

interface <Name of Interface> area {backbone | <OSPF Area ID>} {off | on}

Specifies the OSPF area to which the specified interface belongs.

authtype cryptographic key <ID> {off | algorithm <Hash Algorithm> secret <Secret>}

Specifies an authentication with a cryptographic key for the specified interface.

Supported hash algorithms:

  • hmac-sha-1

  • hmac-sha-256

  • hmac-sha-384

  • hmac-sha-512

  • md5

Enter at least one key ID and its corresponding secret.

authtype md5 key authorization key <ID> secret md5 <Secret>

Specifies to use MD5 authorization.

Enter at least one key ID and its corresponding MD5 secret.

If you configure multiple key IDs, the largest key ID is used for authenticating outgoing packets.

All keys can be used to authenticate incoming packets.

Generally, routers on a given link must agree on the authentication configuration to form peer adjacencies.

Use an authentication scheme to guarantee that routing information is accepted only from trusted peers.

authtype none

Specifies not to use an authentication scheme for the specified interface.

authtype simple <Password>

Specifies to use simple authentication for the specified interface.

Enter an ASCII string that is 8 characters long.

Generally, routers on a given link must agree on the authentication configuration to form peer adjacencies.

Use an authentication scheme to guarantee that routing information is accepted only from trusted peers.

cost <1-65535>

Specifies the weight of the given path in a route.

The higher the cost, the less preferred the link.

To use one interface over another for routing paths, assign one a higher cost.

dead-interval {<1-65535> | default}

Specifies the number of seconds after which a router stops receiving hello packets that it declares the peer down.

Generally, you should set this value at 4 times the value of the hello interval.

Do not set the value at 0.

For a given link, this value must be the same on all routers or adjacencies do not form.

Default: 40 seconds

hello-interval {<1-65535> | default}

Specifies the interval, in seconds, between hello packets that the router sends on the specified interface.

For a given link, this value must be the same on all routers or adjacencies do not form.

Default: 10 seconds

ip-reachability-detection { off | on }

Available starting from R81.10.07:

Directs OSPF to start BFD (Bidirectional Forwarding Detection) for each neighbor, from which it hears on this interface.

The BFD session is started only after OSPF transitions to 'Full' state with the neighbor.

Once the BFD session is up, OSPF responds to changes in BFD state.

If a neighbor does not have BFD configured or it does not respond to BFD control packets, it does not impact OSPF operation. OSPF can operate with both BFD and non-BFD neighbors on the same interface.

Before you enable this option, see IP Reachability Detection.

  • Make sure the Firewall policy allows traffic to the UDP port 3784 in both directions.

  • Make sure the SmartConsoleClosed topology is correct (issues with incorrect Firewall topology can cause anti-spoofing to interfere with BFD traffic). (Centrally Managed only)

Range: off, or on

Default: off

passive {off | on}

Enabling this option puts the specified interface into passive mode; that is, hello packets are not sent from the interface.

Putting an interface into passive mode means that no adjacencies are formed on the link.

This mode enables the network associated with the specified interface to be included in intra-area route calculation rather than redistributing the network into OSPF and having it function as an autonomous system external.

Default: off

priority <0-255>

Specifies the priority for becoming the designated router (DR) on the specified link.

When two routers attached to a network attempt to become a designated router, the one with the highest priority wins.

This option prevents the DR from changing too often. The DR option applies only to a share-media interface, such as Ethernet or FDDI; a DR is not elected on a point-to-point type interface.

A router with a priority of 0 is not eligible to become the DR.

retransmit-interval {<1-65535> | default}

Specifies the number of seconds between link state advertisement transmissions for adjacencies belonging to the specified interface.

This value also applies to database description and link state request packets.

Set this value conservatively, that is, at a significantly higher value than the expected round-trip delay between any two routers on the attached network.

Default: 5 seconds