Download PDF
Home

1. Introduction to OSPF

OSPF (Open Shortest Path First) is an Interior Gateway Protocol that distributes routing information within a single Autonomous System (AS) in an IP network. OSPF is a link-state routing protocol that uses link-state information to form a routing table and exchange the routing information with the neighbors.

OSPF routers flood LSAs (link-state advertisements) to all other routers in an autonomous system. Routers generate routing tables using the information received from the LSAs and calculate the best path to other routers in the network. OSPF uses the Dijkstra (Shortest Path First) algorithm to calculate the best path.

LSAs contain local state information such as interfaces and the reachability of neighbors. Other routers, which receive this information as LSAs, build their LSDB (link-state database) using this information. In an OSPF network, all routers build and maintain information about the topology of that network.

1.1. Understanding OSPF Areas

OSPF allows for a logical partition of the autonomous system by dividing it into areas. This logical partitioning helps to limit the flooding of link-state updates within an area.

An OSPF Autonomous System can be maintained as a single-area network or can be divided as a multi-area network. In a single area AS, the topology provides link-state information of routers in the entire autonomous system.

While in a multi-area AS, the topology provides the link-state information of routers belonging to that particular area, not about routers in other areas in the autonomous system. Within an area, all OSPF routers maintain separate databases which are identical.

In a multi-area OSPF network, all areas are connected to the backbone area, known as Area 0.

1.1.1. Backbone Area

The backbone area, also known as Area 0, is connected to all other areas in an OSPF network. The backbone area, which acts as a central point of communication, receives LSAs from other areas and disseminates the same to other areas.

1.1.2. Area Border Router

Routers that connect one or more areas with the backbone area are called Area Border Router (ABR). One interface of the ABR is connected to the backbone, while other interfaces are connected to other areas. ABRs, which belong to multiple areas in an OSPF network, maintain separate LSDBs for each area that they are connected to.

The following OSPF architectural diagram shows a simple OSPF network that is divided into areas. Area 1 and Area 2 are connected to the backbone area (Area 0) through the ABRs. Area 1 and Area 2 are not directly connected. They receive link state advertisements from each other from Area 0 which acts as the central point of communication for all other areas.

OSPF Areas

1.1.3. Autonomous System Boundary Router

ASBR (Autonomous System Boundary Router) serves as a gateway router to the OSPF autonomous system. ASBR can operate multiple protocols and work with other autonomous system routers which run other interior gateway protocols such as EIGRP, IS-IS, i-BGP, and so on. ASBR can import and translate different protocol routes into OSPF through the redistribution mechanism.

1.2. OSPF DR and BDR Election

An OSPF network chooses one router as a Designated Router (DR) and another as a Backup Designated Router (BDR) for a broadcast network.

DR acts as a central point of communication by receiving and distributing topology information. BDR takes over the role of DR if the DR fails. Routers in an OSPF network do not directly exchange routing information with each other. Instead, every router in the network updates routing information only with DR and BDR. DR, in turn, distributes the topology information with all other routers. This mechanism reduces network traffic significantly. OSPF chooses one router as DR and another router as BDR based on the following criteria:

  • The router with the highest priority value becomes the designated router and the router with the second highest priority value becomes the BDR. You can define the priority values for routers during the interface configuration.

  • If multiple routers have the same highest priority value, then the router with the highest router ID is elected as DR and the router with the second highest router ID value becomes the BDR.

You can choose a priority value from the range 0 - 255. Routers with the priority value '0' do not participate in the DR or BDR election.

1.3. Supported OSPF Standards

RBFS supports the following RFCs, which define standards for OSPF version 2 (OSPFv2).

  • RFC 2328, OSPF Version 2

  • RFC 8665, OSPF Extensions for Segment Routing

Note RFC and draft compliance are partial except as specified.

1.4. Supported Platforms

Not all features are necessarily supported on each hardware platform. Refer to the Platform Guide for the features and the sub-features that are or are not supported by each platform.

2. Configuring OSPF

2.1. Configuration Hierarchy

The diagram illustrates the OSPF configuration hierarchy. All OSPF configuration is performed within an instance, for example, the default instance or a VPN service instance. The OSPF instance configuration hierarchy includes parameters that are generic to the respective OSPF instance. The sub-hierarchies include parameters that are specific to redistribution or authentication.

OSPF Configuration Hierarchy

2.2. Configuration Syntax and Commands

The following sections describe the OSPF configuration syntax and commands.

2.2.1. OSPF Instance Configuration

At this configuration hierarchy, you can configure an OSPF instance.

Syntax:

set instance <instance-name> protocol ospf

Attribute Description

<instance-name>

Name of the OSPF instance.

2.2.2. OSPF Address Family Configuration

At this configuration level, you configure OSPF protocol address family. IPv4 is the currently supported address family.

Note You must complete configuring OSPF address family on an OSPF instance before configuring other OSPF features supported.
Syntax

set instance <instance-name> protocol ospf address-family ipv4

Attribute Description

<instance-name>

Name of the instance

ipv4 <ipv4>

Address family identifier (AFI). Supported value: IPv4.

The following example shows OSPF address family (IPv4) configuration.

Example: OSPF Instance Address Family Configuration

supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ospf address-family ipv4
{
  "rtbrick-config:address-family": [
    {
      "afi-type": "ipv4",
      "router-id": "198.51.100.10",
      "area": [
        {
          "area-id": "0.0.0.0",
          "interface": [
            {
              "name": "lo-0/0/0/1"
            },
            {
              "name": "ifl-0/1/2/12",
              "network-type": "p2p"
            }
          ]
        }
      ]
    }
  ]
}
2.2.2.1. OSPF Router ID Configuration

The router ID is an IP address that OSPF uses to identify a device on the network. The router ID should be configured under the address family hierarchy.

Syntax

set instance <instance-name> protocol ospf address-family ipv4 router-id <router-id>

Attribute Description

router-id <ipv4-address>

The router ID of the routing instance. It is recommended to specify the router ID.

Example: OSPF Router Identifier Configuration

supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ospf address-family ipv4 router-id
{
  "rtbrick-config:router-id": "198.51.100.15"
}
2.2.2.2. OSPF Interface Configuration

Enable OSPF protocol on the router interfaces.

Syntax:

set instance <instance-name> protocol ospf address-family ipv4 area <area-id> interface <interface-name> <options>

Attribute Description

authentication

OSPF interface authentication configuration allows enabling an authentication process before becoming neighbors.

ldp-synchronization <enable | disable>

Enable or disable LDP OSPF Synchronization. Default: Disable

metric <metric>

Specify the metric value of an OSPF interface.

network-type <broadcast | p2p>

broadcast - Sets the network type to broadcast; p2p - Sets the network type to point-to-point. By default, the network-type is broadcast.

router-priority <router-priority>

Sets the router priority for an interface. Allowed range: 0 - 255, Default: 1. Routers with priority value '0' do not participate in the DR or BDR election.

segment-routing ipv4 index

Sets the prefix segment identifier (SID) index for the specified interface.

timer <hello | dead>

Interface timer for configuring hello timer and dead timer

  • hello: Sets interval time for sending hello packets to a neighbor and this time is identical on OSPF neighbor routers. Default: 10 seconds.

  • dead: Sets interval time within which if the interface does not receive any hello packet from its neighbor, the interface comes to know that the neighbor is down. Default: 40 seconds.

mtu-ignore <enable | disable>

If there is an MTU mismatch on both sides of the link where OSPF runs, the OSPF adjacency will not come up as the MTU value carried in the Database Description (DBD) packets. To avoid MTU validation in the Database Description (DBD) packets, configure mtu-ignore command. By default, it is disabled.

Example 1: OSPF Interface Configuration

supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ospf address-family ipv4 area 0.0.0.0 interface
{
  "rtbrick-config:interface": [
    {
      "name": "198.51.100.0"
    },
    {
      "name": "ifl-0/0/0/100",
      "metric": 20000,
      "network-type": "p2p"
    },
    {
      "name": "ifl-0/0/1/1",
      "metric": 40000,
      "network-type": "p2p"
    },
    {
      "name": "ifl-0/0/1/100",
      "metric": 30000
    },
    {
      "name": "ifl-0/0/4/1",
      "metric": 60000
    },
    {
      "name": "lo-0/0/0/1"
    },
    {
      "name": "lo-0/0/0/2"
    }
  ]
}

Example 2: LDP OSPF Synchronization

supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ospf address-family ipv4 area 0.0.0.0
{
  "rtbrick-config:area": [
    {
      "area-id": "0.0.0.0",
      "interface": [
        {
          "name": "ifl-0/0/1/1",
          "network-type": "p2p",
          "ldp-synchronization": "enable",
          "authentication": {
            "type": "md5",
            "key-id": 1,q
            "encrypted-text": "$2fd842673283fbff1623ba4bc2664eb5c"
          }
        }
      ]
    }
  ]
}
2.2.2.3. OSPF Area Configuration

A particular area is defined by its area ID.

set instance <instance-name> protocol ospf address-family ipv4 area <area-id> <options>

Attribute Description

metric

Area scope metric. Range: 1 - 65535. Default: 10000.

area-type stub

A stub area is an area through which or into which AS external advertisements are not flooded.

area-type totally-stub

Totally stub area is an area in which type-3 LSAs are not allowed.

Example: Area Configuration

supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ospf address-family ipv4 area 0.0.0.0
{
  "rtbrick-config:area": [
    {
      "area-id": "0.0.0.0",
      "interface": [
        {
          "name": "ifl-0/0/0/1"
        },
        {
          "name": "ifl-0/0/0/100",
          "metric": 20000,
          "network-type": "p2p"
        },
        {
          "name": "ifl-0/0/1/1",
          "metric": 40000,
          "network-type": "p2p"
        },
        {
          "name": "ifl-0/0/1/100",
          "metric": 30000
        },
        {
          "name": "ifl-0/0/4/1",
          "metric": 60000
        },
        {
          "name": "lo-0/0/0/1"
        },
        {
          "name": "lo-0/0/0/2"
        }
      ]
    }
  ]
}
2.2.2.4. OSPF Metric Configuration

Metric is the cost that OSPF uses to calculate and identify the best paths to other routers.

Syntax

set instance <instance-name> protocol ospf address-family ipv4 metric <metric>

Attribute Description

metric <metric>

OSPF address-family metric. Allowed range: 1 - 65535. Default: 10000.

Note If you configure the metric at the address-family, it will be applicable to the configured areas of the address-family. If you configure a metric for an area, this configured metric value will take precedence over the address-family metric configurations of this area.

If you specify a metric value for an area on an interface will override any area and address-family metric configurations for this area.

Example: OSPF Metric Configuration

supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ospf address-family ipv4 metric
{
  "rtbrick-config:metric": 1000
}
2.2.2.5. OSPF Opaque Capability Configuration

Enables opaque link-state advertisements. Routers in the OSPF network can receive and advertise Type-9, Type-10 and Type-11 opaque LSAs.

Syntax

set instance <instance-name> protocol ospf address-family ipv4 opaque-capability <options>

Attribute Description

opaque-capability <enable | disable>

Enable or disable opaque LSA advertisement and reception. Set as 'enable' to enable the router to receive and advertise opaque LSAs.

Example: OSPF Opaque Capability Configuration

supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ospf address-family ipv4 opaque-capability
{
  "rtbrick-config:opaque-capability": "enable"
}
2.2.2.6. Segment Routing Configuration

Enable segment routing for OSPF. For configuring segment routing, you must enable the opaque capability by defining it as 'true'. For information, see the section: "Opaque Capability Configuration".

Syntax

set instance <instance-name> protocol ospf address-family ipv4 segment-routing <options>

Attribute Description

srgb base <value>

Specifies the segment routing global block (SRGB) in source packet routing. SRGB is used for prefix SIDs.

Supported MPLS label values are 0 - 1048575. The reserved MPLS label range is 0 - 15. In RBFS, BGP uses the label range 20000 - 100000. It is recommended to assign label values outside of these reserved ranges to avoid conflicts.

srgb range <value>

OSPF system range of labels from the base label.

status <disable | enable>

Enable or disable the segment routing feature. By default, the status is disabled.

Example: Segment routing Configuration

supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ospf address-family ipv4 segment-routing
{
  "rtbrick-config:segment-routing": {
    "status": "enable",
    "srgb": {
      "base": 1000,
      "range": 1000
    }
  }
}
2.2.2.7. OSPF Redistribution Configuration

Enable route redistribution for the routes originating from other sources or protocols such as BGP, Direct, IPoE, IS-IS, PPP, and Static.

Syntax

set instance <instance-name> protocol ospf ipv4 redistribute <options>

Attribute Description

redistribute <protocol>

Specifies the source protocol from which the routes are to be redistributed. The available options include BGP, Direct, IPoE, IS-IS, PPP, and Static.

metric <metric>

Specifies the metric value for the redistributed routes

metric-type <type 1 | type 2>

Specifies the external metric type for the redistributed routes.

policy

Specifies the name of the policy map. The redistribute attach point allows routes from other sources to be advertised by OSPFv2.

Example 1: Redistribution Configuration

supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ospf address-family ipv4 redistribute bgp
{
  "rtbrick-config:redistribute": [
    {
      "source": "bgp",
      "metric": 2000
    }
  ]
}

Example 2: Redistribution Policy

supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ospf address-family ipv4 redistribute
{
  "rtbrick-config:redistribute": [
    {
      "source": "direct",
      "policy": "ospf_policy_1"
    }
  ]
}
2.2.2.8. OSPF Authentication Configuration

OSPF supports the following two types of authentication:

  • Clear text authentication

  • MD5 authentication: The authentication is accomplished by the exchange of an authenticating key that is known to both the sending and receiving router.

This command enables you to set Message Digest 5 (MD5) or plain text authentication for an OSPF interface.

set instance <instance-name> protocol ospf address-family ipv4 area <area-id> interface <interface-name> authentication <attribute> <value>

Attribute Description

encrypted-text

Specifies encrypted authentication key.

key-id

Specifies the message digest key identifier to be used by the neighboring routers for the OSPF MD5 password authentication. Allowed range: 1 - 255.

plain-text

Specifies authentication key in plain text format.

type <clear_text | md5>

Specifies the type of authentication.

Example: OSPF Interface Authentication Configuration

supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ospf address-family ipv4 area 0.0.0.0 interface ifl-0/0/0/1
{
  "rtbrick-config:interface": [
    {
      "name": "ifl-0/0/0/1",
      "authentication": {
        "type": "md5",
        "key-id": 1,
        "encrypted-text": "$2fd842673283fbff1623ba4bc2664eb5c"
      }
    }
  ]
}
2.2.2.9. ECMP Routing Configuration

ECMP (equal-cost multiple paths) routing is a mechanism in which routers forward packets to a destination using the multiple available best paths. This mechanism can increase network bandwidth substantially by load-balancing traffic through multiple best paths.

Syntax

set instance <instance-name> protocol ospf address-family ipv4 max-load-balance <value>

Attribute Description

<max-load-balance>

Maximum number of equal-cost multiple paths to be calculated for load balancing. Default: 16. Allowed range: 1 - 255.

Example: ECMP Routing Configuration

supervisor@rtbrick>SPINE01: cfg> show config instance default protocol ospf address-family ipv4 max-load-balance
{
  "rtbrick-config:max-load-balance": 100
}

3. OSPF Operational Commands

3.1. OSPF Show Commands

3.1.1. OSPF Summary

Displays the OSPF protocol summary information.

Syntax:

show ospf summary <options>

Option Description

-

Without any option, the command displays the information for all instances.

instance <instance-name>

OSPF summary information for the given instance.

Example: OSPF summary for the default instance

supervisor@rtbrick>SPINE01: op> show ospf summary
Instance: default
  General information:
    Router ID: 198.51.100.15, Area count: 1, Flood interval: 1000
    Opaque capability: True, Segment routing capability: True
    SRGB base: 10000, SRGB range: 100, SRGB label values: 10000-10099
    Flags: OPAQUE|SR|-|-|-|-|-, Cost: 10000
  Area: 198.51.100.0
    Interface count: 7
      Interface: ifl-0/0/0/1
        Address: 198.51.100.85, State: Backup, Type: broadcast, Priority: 1
        Designated router: 198.51.100.0, Backup designated router: 198.51.100.1
        Hello interval: 10 sec, Dead interval: 40 sec
        Cost: 10000, MTU: 1500
      Interface: ifl-0/0/0/100
        Address: 198.51.100.86, State: P2P, Type: p2p, Priority: 1
        Designated router: 198.51.100.101, Backup designated router: 198.51.100.2
        Hello interval: 10 sec, Dead interval: 40 sec
        Cost: 20000, MTU: 1500
      Interface: ifl-0/0/1/1
        Address: 198.51.100.87, State: P2P, Type: p2p, Priority: 1
        Designated router: 198.51.100.102, Backup designated router: 198.51.100.3
        Hello interval: 10 sec, Dead interval: 40 sec
        Cost: 40000, MTU: 1500
<...>

3.1.2. OSPF Interface

Displays OSPF interface information.

Syntax:

show ospf interface <options>

Option Description

-

Without any option, the command displays the interface information for all instances.

detail

Displays the detailed interface information.

interface <interface-name> <detail>

Displays detailed information for the specified interface.

instance <instance-name>

OSPF interface information for the given instance.

instance <instance-name> <detail>

Displays detailed information for the given instance.

instance <instance-name> <interface-name>

Displays information for a specified interface for a given instance.

Example 1: OSPF interface information for the default instance

supervisor@rtbrick>SPINE01: op> show ospf interface
Instance: default
Interface     Area           IP Address     State    Type      Cost   Priority DR          BDR              MTU
ifl-0/0/0/1   0.0.0.0        198.51.100.85  Backup   broadcast  10000  1    198.51.100.27 198.51.100.85     1500
ifl-0/0/0/100 0.0.0.0        198.51.100.77  P2P      p2p        20000  1    198.51.100.0  198.51.100.0      1500
lo-0/0/0/1    0.0.0.0        198.51.100.15  P2P      p2p        10000  1    198.51.100.0  198.51.100.0      1500

Example 2: OSPF interface detailed information

supervisor@rtbrick>SPINE01: cfg> show ospf interface ifl-0/0/1/100 detail
Instance: default
  Interface: ifl-0/0/1/100, Area: 0.0.0.0
    State: P2P, Type: p2p, Primary IPv4: 12.1.0.1, Router priority: 1
    Designated router: 0.0.0.0, Backup designated router: 0.0.0.0
    Hello interval: 10, Router dead interval: 40, Wait timer: 40
    Metric: 20000, IPv4 MTU: 1500, Auth type: md5
    Capabilities: *|-|-|-|-|-|E|*
    Received messages:
      Hello: 2007, Data descriptor: 2, LS request: 1
      LS update: 120, LS acknowledgement: 101
    Sent messages:
      Hello: 2007, Data descriptor: 3, LS request: 0

3.1.3. OSPF Neighbor

Displays OSPF neighbor information.

Syntax:

show ospf neighbor <options>

Option Description

-

Without any option, the command displays the neighbor information for all instances.

instance <instance-name>

OSPF neighbor information for the given instance.

detail

Displays the detailed neighbor information.

interface <interface-name>

Displays the neighbor information for a specified interface.

instance <instance-name> detail

Displays detailed OSPF neighbor information for the given instance.

instance <instance-name> interface <interface-name>

Displays OSPF neighbor information for the specified interface for the given instance.

instance <instance-name> interface <interface-name> detail

Displays detailed OSPF neighbor information for the specified interface for the given instance.

interface <interface-name> detail

Displays detailed neighbor information for a specified interface.

Example: OSPF neighbor information for the default instance

supervisor@rtbrick>SPINE01: op> show ospf neighbor
Instance: default
Address        Interface    Router ID      Area         State  Priority  DR        BDR            Uptime          Expires
198.51.100.27 ifl-0/0/0/1   198.51.100.20  0.0.0.0      Full  1   198.51.100.27  198.51.100.85  0d:01h:31m:57s  38 Seconds
198.51.100.4  ifl-0/0/0/100 198.51.100.20  0.0.0.0      Full  1   198.51.100.0   198.51.100.0   0d:01h:32m:36s  39 Seconds

3.1.4. OSPF Database

Displays information from OSPF link-state database that contains data about link-state advertisements (LSAs).

Syntax:

show ospf database <options>

Option Description

advertising-router <router-id>

Displays LSDB information for the specified advertising router.

advertising-router <router-id> detail

Displays the detailed LSDB information for the specified advertising router.

advertising-router <router-id> ls-id <ls-id>

Displays the LSDB information for the specified link-state ID for the advertising router.

advertising-router <router-id> ls-type external

Displays the LSDB information for the specified LSA type for the advertising router. Link-state advertisement type includes external, network, router, and summary.

detail

Displays detailed information from LSDB.

instance <instance-name>

Displays OSPF database information for the given instance.

ls-id <ls-id>

OSPF database information for a specific link-state identifier.

ls-type <type>

OSPF database information for the specified link-state type. Link-state advertisement type includes external, network, router and summary.

area <area-id>

Displays database information for the specified OSPF area.

area <area-id> advertising-router <router-id>

Displays LSDB information for the specified advertising router for a specified OSPF area.

area <area-id> detail

Displays detailed LSDB information for the specified OSPF area.

area <area-id> ls-id <ls-id>

Displays LSDB information for the specified link-state identifier for the specified OSPF area.

area <area-id> ls-type <type>

Displays LSDB information for the specified link-state type for the specified OSPF area. Link-state advertisement type includes external, network, router, and summary.

instance <instance-name> advertising router <router-id>

Displays LSDB information for the specified advertising router for the given instance.

instance <instance-name> area <area-id>

Displays LSDB information for the specified area for the given instance.

instance <instance-name> ls-id <ls-id>

Displays LSDB information for the specified link-state identifier for the given instance.

instance <instance-name> ls-type <type>

Displays LSDB information for the specified type of the given instance. Link-state advertisement type includes external, network, router and summary.

Example 1: OSPF database information for the default instance

supervisor@rtbrick>SPINE01: cfg> show ospf database
Instance: default, Area: 0.0.0.0
  Type            Link State ID   Advertising Router   Age     Sequence     Checksum     Cost   Link Count
  Router          198.51.100.15   198.51.100.15         71      0x80000009     0x7cb6        -      4
  Router          198.51.100.20   198.51.100.20         57      0x8000000a     0x2f7d        -      4
  Network         198.51.100.27   198.51.100.20         329     0x80000004     0x7e5c        -      2
  Summary-Network 198.51.100.65   198.51.100.20         374     0x80000004     0xbc36    15000      -
  Summary-Network 198.51.100.22   198.51.100.20         374     0x80000004     0x7aae    10000      -
  Summary-Asbr    198.51.100.32   198.51.100.20         324     0x80000004     0xe7aa    30000      -
Instance: default
  Type            Link State ID   Advertising Router    Age      Sequence     Checksum    Cost    Link Count
  External        198.50.100.53   198.51.100.32         374      0x80000004    0xba29     16777214   -

Example 2: OSPF database detailed information

supervisor@rtbrick>SPINE01: cfg> show ospf database detail
Instance: default, Area: 0.0.0.0 LSAs
  LSA ID: 198.51.100.15
    Advertising router: 198.51.100.15, LSA type: Router
    Sequence number: 0x8000000f, Checksum: 0x1831, LSA age: 1671
    Length: 132, Options: *|-|-|-|-|-|E|*, Flags: -|-|-|-
    Number of links: 9
      Link ID: 198.51.100.20
        Link data: 198.51.100.30, Type: P2P
        Type of service: 0, Metric: 20000
      Link ID: 198.51.100.15
        Link data: 255.255.255.252, Type: Stub
        Type of service: 0, Metric: 20000
<...>

Example 3: OSPF database for an advertising router

supervisor@rtbrick>SPINE01: cfg> show ospf database advertising-router 198.51.100.15
Instance: default, Area: 0.0.0.0
  Type       Link State ID   Advertising Router   Age    Sequence   Checksum     Cost  Link Count
  Router     198.51.100.15    198.51.100.15         690    0x80000009 0x7cb6        -          4

3.1.5. OSPF SPF Result

Displays SPF results.

Syntax:

show ospf spf result <options>

Option Description

-

Without any option, the command displays the SPF result of all instances.

area <area-id>

Displays SPF result for the specified area.

instance <instance-name>

Name of the instance

node-id <node-id>

Displays SPF result for the specified node identifier.

area <area-id> <node-id>

Displays SPF result for the specified node identifier for a specified area.

instance <instance-name> area <area-id>

Displays SPF result for the specified area for a given instance.

instance <instance-name> node-id <node-id>

Displays SPF result for the specified node identifier for a given instance.

Example 1: OSPF SPF Result for the default instance

supervisor@rtbrick>SPINE01: op> show ospf spf result
Instance: default, Area: 0.0.0.0
Node ID       Type     Cost     Advertising Router  Flags      Neighbor Node     Interface      Nexthop
198.51.100.27 NETWORK  10000    198.51.100.20       -|-|-|-    -                 local          -
198.51.100.15 ROUTER   0        198.51.100.15       -|-|-|-    -                 local          -
198.51.100.20 ROUTER   10000    198.51.100.20       -|-|-|B    198.51.100.20     ifl-0/0/0/1    198.51.100.27
                                                               198.51.100.20     ifl-0/0/0/100  198.51.100.4

Example 2: OSPF SPF Result for the specified node identifier for the given area

supervisor@rtbrick>SPINE01: op> show ospf spf result area 0.0.0.0 node-id 198.51.100.27
Instance: default, Area: 0.0.0.0
Node ID        Type      Cost     Advertising Router    Flags     Neighbor Node    Interface    Nexthop
198.51.100.27  NETWORK   10000    198.51.100.20         -|-|-|-    -               local        -

3.1.6. OSPF Route

Displays OSPF routing table information.

Syntax:

show ospf route <options>

Option Description

-

Without any option, the command displays the OSPF route information for all instances.

instance <instance-name>

OSPF route information for the given instance.

instance <instance-name> <afi>

Displays OSPF route information for the specified address family and instance. The supported AFI value is IPv4.

instance <instance-name> AFI <ipv4> <unicast | labeled-unicast>

Displays OSPF route information for the specified SAFI for a specified address family.

instance <instance-name> label <label>

Displays OSPF route information for the specified label and instance.

instance <instance-name> mpls unicast label <label> | type <type>

Displays OSPF route information for the specified MPLS unicast label or type for the instance.

prefix <ip>

Displays OSPF route information for the specified match prefix.

type

Displays information for OSPF route type. The route types include external-type-1, external-type-2, inter-area, intra-area, and ospf-direct.

ipv4 prefix <ip>

Displays OSPF route information for the specified IPv4 prefix.

label <label>

Displays information about the OSPF-labeled routes.

mpls unicast <label | type>

Displays information about OSPF MPLS routes.

area-border

Displays the OSPF Area Border Router (ABR) information. Refer to section "3.1.7. OSPF Route ABR" for the interface configuration details.

autonomous-system-boundary

Displays Autonomous System Border Router information. Refer to section "3.1.7. OSPF Route ABR" for the interface configuration details.

Example: OSPF route information for the default instance

supervisor@rtbrick>SPINE01: op> show ospf route
Instance: default, AFI: ipv4, SAFI: unicast
  Prefix            Area              Type           Cost    Next Hop        Interface
  12.0.0.0/24       0.0.0.0           ospf-direct    10000   n/a             local
  12.1.0.0/24       0.0.0.0           ospf-direct    10000   n/a             local
  24.0.1.0/24       0.0.0.0           inter-area     25000   198.51.100.27   ifl-0/0/0/1
                                                             198.51.100.4    ifl-0/0/0/100
  24.1.1.0/24       0.0.0.0           inter-area     20000   198.51.100.27   ifl-0/0/0/1
                                                             198.51.100.4    ifl-0/0/0/100
  25.0.1.0/24       0.0.0.0           inter-area     35000   198.51.100.27   ifl-0/0/0/1
                                                             198.51.100.4    ifl-0/0/0/100
  198.51.100.15/32  0.0.0.0           ospf-direct    10000   n/a             local
  198.51.100.20/32  0.0.0.0           intra-area     20000   198.51.100.27   ifl-0/0/0/1

3.1.7. OSPF Route Area Border

Displays the OSPF Area Border Router (ABR) information.

Syntax:

show ospf route area-border

Example: OSPF Route ABR information

supervisor@rtbrick>SPINE01: cfg> show ospf route area-border
Instance: default, Area: 198.51.100.0
  Node ID         Cost     Advertising Router    Flags       Interface      Nexthop
  198.51.100.20   10000    198.51.100.20        -|-|-|B      ifl-0/0/0/1    198.51.100.27
  198.51.100.30    20000   198.51.100.30        -|-|-|B      ifl-0/0/0/1    198.51.100.27
  198.51.100.40    55000   198.51.100.40        -|-|-|B      ifl-0/0/0/1    198.51.100.27
  198.51.100.50    55000   198.51.100.50        -|-|-|B      ifl-0/0/0/1    198.51.100.27

3.1.8. OSPF Route Autonomous System Boundary

Displays Autonomous System Boundary Router information.

Syntax:

show ospf route autonomous-system-boundary

Example: OSPF Route ASBR information

supervisor@rtbrick>SPINE01: cfg> show ospf route autonomous-system-boundary
Instance: default, Area:
  Node ID         Cost     Advertising Router  Flags     Interface         Nexthop
  198.51.100.32    40000    198.51.100.20                ifl-0/0/0/1      198.51.100.27

3.1.9. OSPF LSA Request List

Displays the list of all link-state advertisements (LSAs) requests that have been sent or received by a router.

Syntax:

show ospf request-list <options>

Option Description

-

Without any option,, this command displays the list of all link-state advertisement (LSA) requests that have been sent from the router.

detail

Provides detailed information on the requests that have been sent from the router.

Example 1: OSPF LSA requests sent to a neighbor

supervisor@rtbrick>SPINE01: op> show ospf request-list
Instance: default
  Type            Link State ID   Advertising Router          Age        Sequence   Checksum
  Summary-Network 11.0.0.0        198.51.100.20                 42      0x80000003     0x76e5
  Summary-Network 12.0.0.0        198.51.100.20                 42      0x80000003     0x603d
  Summary-Network 12.1.0.0        198.51.100.20                 42      0x80000003     0x481f
  Summary-Network 12.2.0.0        198.51.100.20                 42      0x80000003     0x4aab
  Summary-Network 12.3.0.0        198.51.100.20                 42      0x80000003     0xc5e4
  Summary-Network 23.0.0.0        198.51.100.20                 42      0x80000003     0xd5bb
  Summary-Network 23.1.0.0        198.51.100.20                 42      0x80000003     0xca2a

Example 2: Detailed information for OSPF LSA requests sent to a neighbor

supervisor@rtbrick>SPINE01: op>  show ospf request-list detail
Instance: default LSAs
  LSA ID: 11.0.0.0
    Advertising router: 198.51.100.20, LSA type: Summary-Network, Router ID: 192.168.0.20
    Sequence number: 0x80000003, Checksum: 0x76e5, LSA age: 42
    Interface: hostif-0/0/0/1, Neighbor address: 25.0.1.2
    Length: 0, Options: *|-|-|-|-|-|-|*
  LSA ID: 12.0.0.0
    Advertised router: 198.51.100.20, LSA type: Summary-Network, Router ID: 192.168.0.20
    Sequence number: 0x80000003, Checksum: 0x603d, LSA age: 42
    Interface: hostif-0/0/0/1, Neighbor address: 25.0.1.2
    Length: 0, Options: *|-|-|-|-|-|-|*
  LSA ID: 12.1.0.0
    Advertised router: 198.51.100.20, LSA type: Summary-Network, Router ID: 192.168.0.20
    Sequence number: 0x80000003, Checksum: 0x481f, LSA age: 42
    Interface: hostif-0/0/0/1, Neighbor address: 25.0.1.2
    Length: 0, Options: *|-|-|-|-|-|-|*
  LSA ID: 12.2.0.0
    Advertised router: 198.51.100.20, LSA type: Summary-Network, Router ID: 192.168.0.20
    Sequence number: 0x80000003, Checksum: 0x4aab, LSA age: 42
    Interface: hostif-0/0/0/1, Neighbor address: 25.0.1.2
    Length: 0, Options: *|-|-|-|-|-|-|*

 <...>

3.1.10. OSPF Transmission List

Displays the list of all LSAs waiting to be re-sent or transmitted from the router.

Syntax:

show ospf transmit-list <option>

Option Description

detail

Provides detailed information on all LSAs waiting to be re-sent.

Example: OSPF LSA requests waiting to be transmitted.

supervisor@rtbrick>SPINE01: op> show ospf transmit-list
Instance: default, Area: 0.0.0.1, Interface: ifl-0/0/4/1, Neighbor: 25.0.1.5
  LSA ID                    LS type                   Advertising router        Transmit interval         Retransmit count
  11.0.0.0                  Summary-Network           198.51.100.20              5000                      1
  12.0.0.0                  Summary-Network           198.51.100.20              5000                      1
  23.0.0.0                  Summary-Network           198.51.100.20              5000                      1
  12.1.0.0                  Summary-Network           198.51.100.20              5000                      1
  23.1.0.0                  Summary-Network           198.51.100.20              5000                      1
  12.2.0.0                  Summary-Network           198.51.100.20              5000                      1
  12.3.0.0                  Summary-Network           198.51.100.20              5000                      1

3.1.11. OSPF Statistics

Displays OSPF statistics information.

Syntax:

show ospf statistics <options>

Option Description

interface <interface-name>

Displays packet statistics information for the specified interface.

interface <interface-name> detail

Displays detailed packet statistics information for the specified interface.

neighbor <Neighbor-address>

Displays packet statistics information for the specified neighbor.

neighbor <Neighbor-address> <detail>

Displays detailed packet statistics information for the specified neighbor.

supervisor@rtbrick>SPINE01: op> show ospf statistics interface ifl-0/0/0/1 detail
Instance: default
  Interface: ifl-0/0/0/1, Peer address: 198.51.100.15
    Hello packet:
      Recieved packets: 1185, Sent packets: 2364, Total errors: 0, Unsupported option: 0
      Area mismatch: 0, Area type option mistmatch: 0, Dead interval mismatch: 0
      Hello interval mismatch: 0, Mask mismatch: 0, Self router ID: 0
      Obj add fail: 0, Source address mismatch: 0, Misc: 0
    DD packet:
      Recieved packets: 7, Sent packets: 7, Total errors: 0, Unsupported option: 0
      Invalid state packet rcvd: 0, MTU mismatch: 0, DD obj add fail: 0, Misc: 0, Negotiation fail: 0
      Master bit mismatch: 0, Exchange state init pkt: 0, Capabilities mismatch: 0
      Expected seq mismatch: 0, Full state init pkt: 0
    LS request packet:
      Recieved packets: 0, Sent packets: 0, Total errors: 0, Invalid LSA type: 0
      Invalid state packet rcvd: 0, LSA lookup error: 0, LSA lookup fail: 0
      LSA obj add fail: 0, Misc: 0
    LS update packet:
      Recieved packets: 286, Sent packets: 0, Total errors: 0, Invalid LSA type: 0
      Zero length LSA: 0, LSA length exceeded: 0, LSA checksum fail: 0
      Invalid state packet rcvd: 0, LSA obj add fail: 0, Misc: 0
    Ls ack packet:
      Recieved packets: 24, Sent packets: 7, Total errors: 0, LSA obj add fail: 0
      Invalid state packet rcvd: 0, Misc: 0
    Sanity errors:
      Payload max len error: 0, Payload min len error: 0, Invalid version: 0
      Invalid auth data len: 0, Auth data missing: 0, Invalid packet min len: 0
      Invalid area ID: 0, Invalid network mask: 0, Authentication fail: 0

3.2. OSPF Clear Commands

3.2.1. Clear OSPF Neighbor

Clear OSPF neighbor state information.

Syntax:

clear ospf neighbor <options>

Option Description

-

Without any option, the command clears all the OSPF neighbors.

instance <instance-name>

Clears OSPF neighbor information for the specified instance.

instance <instance-name> area <area-id>

Clears OSPF neighbor for the specified area of the specified instance.

instance <instance-name> area <area-id> interface <interface-name>

Clears OSPF neighbor for the specified interface for the specified area of the specified instance.

force

Forcefully clears all the OSPF neighbors. This may impact DR/BDR election.

force instance <instance-name>

Forcefully clears the neighbor for the specified instance.

force instance <instance-name> area <area-id>

Forcefully clears OSPF neighbor for the specified area of the specified instance.

force instance <instance-name> area <area-id> interface <interface-name>

Forcefully clears OSPF neighbor for a specific interface and area of the specified instance.

Example:

supervisor@rtbrick>SPINE01: cfg> clear ospf neighbor instance default area 198.51.100.0 interface ifl-0/0/1/100
Instance [default], area[0.0.0.1], interface[ifl-0/0/1/100] clear triggered

3.2.2. Clear OSPF Statistics

Clear the OSPF statistics for all instances or for a specified instance.

Syntax:

clear ospf statistics <options>

Option Description

-

Without any option, the command clears all the OSPF statistics.

instance <instance-name>

Clears OSPF statistics information for the specified instance.

instance <instance-name> area <area-id>

Clears OSPF statistics for the specified area of the specified instance.

instance <instance-name> area <area-id> interface <interface-name>

Clears OSPF statistics for the specified interface for the specified area of the specified instance.

Example:

supervisor@rtbrick>SPINE01: cfg> clear ospf statistics instance default area 0.0.0.0 interface ifl-0/0/1/1
Cleared statistics for all neighbors under Instance [default] Area [0.0.0.0] Interface [ifl-0/0/1/1]

©Copyright 2023 RtBrick, Inc. All rights reserved. The information contained herein is subject to change without notice. The trademarks, logos and service marks ("Marks") displayed in this documentation are the property of RtBrick in the United States and other countries. Use of the Marks are subject to RtBrickā€™s Term of Use Policy, available at https://www.rtbrick.com/privacy. Use of marks belonging to other parties is for informational purposes only.