OSPF Operational Commands
OSPF Show Commands
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 and address families. |
instance <instance-name> |
OSPF summary information for the given instance. |
instance <instance-name> <afi> |
OSPF summary information for the specified instance and address family. Supported AFI values are 'ipv4' and 'ipv6'. |
<afi> instance <instance-name> |
OSPF summary information for the specified address family and instance. Supported AFI values are 'ipv4' and 'ipv6'. |
Example: OSPF summary for the default instance
supervisor@rtbrick>SPINE01: op> show ospf summary
Global Information:
Neighbor State Information:
Full : 12
Loading : 0
Exchange : 0
ExStart : 0
TwoWay : 2
Init : 0
Attempt : 0
Down : 0
Instance: default, Address family: ipv4
General information:
Router ID: 192.168.0.10, Area count: 1, Flood interval: 1000ms
Opaque capability: True, Segment routing capability: True
Flags: -|-|-|-|-, Cost: 10000
SPF initial delay: 50ms, SPF short delay: 200ms, SPF long delay: 5000ms
Area: 0.0.0.0
Interface count: 7
Interface: ifl-0/0/0/1
Address: 12.0.0.1, State: BDR, Type: broadcast, Priority: 1
Designated router: 12.0.0.2, Backup designated router: 12.0.0.1
Hello interval: 10s, Dead interval: 40s
Cost: 10000, MTU: 1500
Interface: ifl-0/0/0/100
Address: 12.1.0.1, State: P2P, Type: p2p, Priority: 1
Designated router: 0.0.0.0, Backup designated router: 0.0.0.0
Hello interval: 10s, Dead interval: 40s
Cost: 20000, MTU: 1500
Interface: ifl-0/0/1/1
Address: 12.2.0.0, State: P2P, Type: p2p, Priority: 1
Designated router: 0.0.0.0, Backup designated router: 0.0.0.0
Hello interval: 10s, Dead interval: 40s
Cost: 40000, MTU: 1500
Interface: ifl-0/0/1/100
Address: 12.3.0.1, State: BDR, Type: broadcast, Priority: 1
Designated router: 12.3.0.2, Backup designated router: 12.3.0.1
Hello interval: 10s, Dead interval: 40s
Cost: 30000, MTU: 1500
Interface: ifl-0/0/4/1
Address: 11.0.0.1, State: DROther, Type: broadcast, Priority: 1
Designated router: 11.0.0.5, Backup designated router: 11.0.0.4
Hello interval: 10s, Dead interval: 40s
Cost: 60000, MTU: 1500
Interface: lo-0/0/0/1
Address: 192.168.0.10, State: P2P, Type: p2p, Priority: 1
Designated router: 0.0.0.0, Backup designated router: 0.0.0.0
Hello interval: 10s, Dead interval: 40s
Cost: 10000, MTU:
Interface: lo-0/0/0/2
Address: 192.168.0.11, State: P2P, Type: p2p, Priority: 1
Designated router: 0.0.0.0, Backup designated router: 0.0.0.0
Hello interval: 10s, Dead interval: 40s
Cost: 10000, MTU:
Instance: default, Address family: ipv6, Instance ID: 0
General information:
Router ID: 192.168.0.10, Area count: 1, Flood interval: 1000ms
Opaque capability: True, Segment routing capability: True
Flags: -|-|-|-|-, Cost: 10000
SPF initial delay: 50ms, SPF short delay: 200ms, SPF long delay: 5000ms
Area: 0.0.0.0
Interface count: 7
Interface: ifl-0/0/0/1
Address: fe80::7810:99ff:fec0:0, State: BDR, Type: broadcast, Priority: 1
Designated router: 192.168.0.20, Backup designated router: 192.168.0.10
Hello interval: 10s, Dead interval: 40s
Cost: 10000, MTU: 1500
Interface: ifl-0/0/0/100
Address: fe80::65:7810:99ff:fec0:0, State: P2P, Type: p2p, Priority: 1
Designated router: 0.0.0.0, Backup designated router: 0.0.0.0
Hello interval: 10s, Dead interval: 40s
Cost: 20000, MTU: 1500
Interface: ifl-0/0/1/1
Address: fe80::7810:99ff:fec0:1, State: P2P, Type: p2p, Priority: 1
Designated router: 0.0.0.0, Backup designated router: 0.0.0.0
Hello interval: 10s, Dead interval: 40s
Cost: 40000, MTU: 1500
Interface: ifl-0/0/1/100
Address: fe80::65:7810:99ff:fec0:1, State: BDR, Type: broadcast, Priority: 1
Designated router: 192.168.0.20, Backup designated router: 192.168.0.10
Hello interval: 10s, Dead interval: 40s
Cost: 30000, MTU: 1500
Interface: ifl-0/0/4/1
Address: fe80::7810:99ff:fec0:4, State: DROther, Type: broadcast, Priority: 1
Designated router: 192.168.0.50, Backup designated router: 192.168.0.40
Hello interval: 10s, Dead interval: 40s
Cost: 60000, MTU: 1500
Interface: lo-0/0/0/1
Address: 192:168::10, State: P2P, Type: p2p, Priority: 1
Designated router: 0.0.0.0, Backup designated router: 0.0.0.0
Hello interval: 10s, Dead interval: 40s
Cost: 10000, MTU: 0
Interface: lo-0/0/0/2
Address: 192:168::11, State: P2P, Type: p2p, Priority: 1
Designated router: 0.0.0.0, Backup designated router: 0.0.0.0
Hello interval: 10s, Dead interval: 40s
Cost: 10000, MTU: 0
<...>
OSPF Hostname
Displays the OSPF hostname information.
Syntax:
show ospf hostname
Example: OSPF hostname for the default instance
supervisor@rtbrick>SPINE01: op> show ospf hostname
Instance AFI Instance ID Router ID Hostname
default ipv4 192.168.0.10 Router1
default ipv6 0 192.168.0.10 Router1
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 and address families. |
detail |
Displays the detailed interface information. |
<interface-name> detail |
Displays detailed information for the specified interface. Also, for the specified interface, you can display interface information with filter options: detail, ipv4, and ipv4 detail. |
instance <instance-name> |
OSPF interface information for the given instance. Also, for the specified instance, you can display interface information with filter options: interface name, detail, and ipv4 detail. |
instance <instance-name> <interface-name> |
Displays information for a specified interface for a given instance. |
instance <instance-name> <interface-name> detail |
Displays detailed information for a specified interface for a given instance. |
<afi> |
Displays OSPF interface information for the specified address family. Supported AFI values are 'ipv4' and 'ipv6'. You can display interface information for the specified address family using filters such as interface name, detail, and instance. |
Example 1: OSPF interface information for the default instance
supervisor@rtbrick>SPINE01: op> show ospf interface
Instance: default, Address family: ipv4
Interface Area IP Address State Type Cost Priority DR BDR MTU
ifl-0/0/0/1 0.0.0.0 12.0.0.1 BDR broadcast 10000 1 12.0.0.2 12.0.0.1 1500
ifl-0/0/0/100 0.0.0.0 12.1.0.1 P2P p2p 20000 1 0.0.0.0 0.0.0.0 1500
ifl-0/0/1/1 0.0.0.0 12.2.0.0 P2P p2p 40000 1 0.0.0.0 0.0.0.0 1500
ifl-0/0/1/100 0.0.0.0 12.3.0.1 BDR broadcast 30000 1 12.3.0.2 12.3.0.1 1500
ifl-0/0/4/1 0.0.0.0 11.0.0.1 DROther broadcast 60000 1 11.0.0.5 11.0.0.4 1500
lo-0/0/0/1 0.0.0.0 192.168.0.10 P2P p2p 10000 1 0.0.0.0 0.0.0.0
lo-0/0/0/2 0.0.0.0 192.168.0.11 P2P p2p 10000 1 0.0.0.0 0.0.0.0
Instance: default, Address family: ipv6, Instance ID: 0
Interface Area IP Address State Type Cost Priority DR BDR MTU
ifl-0/0/0/1 0.0.0.0 fe80::7810:99ff:fec0:0 BDR broadcast 10000 1 192.168.0.20 192.168.0.10 1500
ifl-0/0/0/100 0.0.0.0 fe80::65:7810:99ff:fec0:0 P2P p2p 20000 1 0.0.0.0 0.0.0.0 1500
ifl-0/0/1/1 0.0.0.0 fe80::7810:99ff:fec0:1 P2P p2p 40000 1 0.0.0.0 0.0.0.0 1500
ifl-0/0/1/100 0.0.0.0 fe80::65:7810:99ff:fec0:1 BDR broadcast 30000 1 192.168.0.20 192.168.0.10 1500
ifl-0/0/4/1 0.0.0.0 fe80::7810:99ff:fec0:4 DROther broadcast 60000 1 192.168.0.50 192.168.0.40 1500
lo-0/0/0/1 0.0.0.0 192:168::10 P2P p2p 10000 1 0.0.0.0 0.0.0.0 0
lo-0/0/0/2 0.0.0.0 192:168::11 P2P p2p 10000 1 0.0.0.0 0.0.0.0 0
Example 2: OSPF interface detailed information
supervisor@rtbrick>SPINE01: cfg> show ospf interface ifl-0/0/1/100 detail
Instance: default, Address family: ipv4
Interface Area IP Address State Type Cost Priority DR BDR MTU
ifl-0/0/1/100 0.0.0.0 12.3.0.1 BDR broadcast 30000 1 12.3.0.2 12.3.0.1 1500
Instance: default, Address family: ipv6, Instance ID: 0
Interface Area IP Address State Type Cost Priority DR BDR MTU
ifl-0/0/1/100 0.0.0.0 fe80::65:7810:99ff:fec0:1 BDR broadcast 30000 1 192.168.0.20 192.168.0.10 1500
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. |
area <area-id> |
OSPF neighbor information for the given area. |
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. |
<afi> |
Displays OSPF neighbor information for the specified address family. Supported AFI values are 'ipv4' and 'ipv6'. You can display neighbor information for the specified address family using filters such as interface name, detail, and instance. |
log |
Logs neighbor event information. |
Example: OSPF neighbor information for the default instance
supervisor@rtbrick>SPINE01: op> show ospf neighbor
Instance: default, Address family: ipv4
Address Interface Router Area State Priority DR
BDR Uptime Expires
12.0.0.2 ifl-0/0/0/1 192.168.0.20 0.0.0.0 Full 1 12.0.0.2 12.0.0.1 0d:01h:38m:12s 33s
12.2.0.1 ifl-0/0/1/1 192.168.0.20 0.0.0.0 Full 1 0.0.0.0 0.0.0.0 0d:01h:38m:57s 33s
11.0.0.3 ifl-0/0/4/1 192.168.0.30 0.0.0.0 TwoWay 1 11.0.0.5 11.0.0.4 never 34s
11.0.0.4 ifl-0/0/4/1 192.168.0.40 0.0.0.0 Full 1 11.0.0.5 11.0.0.4 0d:01h:38m:11s 34s
11.0.0.5 ifl-0/0/4/1 192.168.0.50 0.0.0.0 Full 1 11.0.0.5 11.0.0.4 0d:01h:38m:16s 34s
12.1.0.2 ifl-0/0/0/100 192.168.0.20 0.0.0.0 Full 1 0.0.0.0 0.0.0.0 0d:01h:38m:57s 33s
12.3.0.2 ifl-0/0/1/100 192.168.0.20 0.0.0.0 Full 1 12.3.0.2 12.3.0.1 0d:01h:38m:12s 33s
Instance: default, Address family: ipv6, Instance ID: 0
Address Interface Router Area State Priority DR
BDR Uptime Expires
fe80::7845:9aff:fec0:0 ifl-0/0/0/1 192.168.0.20 0.0.0.0 Full 1 192.168.0.20 192.168.0.10 0d:01h:38m:12s 33s
fe80::7845:9aff:fec0:1 ifl-0/0/1/1 192.168.0.20 0.0.0.0 Full 1 0.0.0.0 0.0.0.0 0d:01h:38m:52s 33s
fe80::780d:96ff:fec0:4 ifl-0/0/4/1 192.168.0.30 0.0.0.0 TwoWay 1 192.168.0.50 192.168.0.40 never 34s
fe80::7801:34ff:fec0:5 ifl-0/0/4/1 192.168.0.40 0.0.0.0 Full 1 192.168.0.50 192.168.0.40 0d:01h:38m:16s 34s
fe80::7865:1aff:fec0:6 ifl-0/0/4/1 192.168.0.50 0.0.0.0 Full 1 192.168.0.50 192.168.0.40 0d:01h:38m:16s 34s
fe80::65:7845:9aff:fec0:0 ifl-0/0/0/100 192.168.0.20 0.0.0.0 Full 1 0.0.0.0 0.0.0.0 0d:01h:38m:52s 33s
fe80::65:7845:9aff:fec0:1 ifl-0/0/1/100 192.168.0.20 0.0.0.0 Full 1 192.168.0.20 192.168.0.10 0d:01h:38m:12s 33s
OSPF Segment Routing
Displays OSPF segment routing information.
Syntax:
show ospf segment-routing <options>
Option | Description |
---|---|
- |
Without any option, the command displays the neighbor information for all instances. |
global-block |
Displays Segment routing global block (SRGB) information |
global-block instance <instance-name> |
Displays Segment routing global block (SRGB) information for the specified instance |
global-block instance <instance-name> <afi> |
Displays Segment routing global block (SRGB) information for the specified instance address family. Supported AFI values are 'ipv4' and 'ipv6'. |
prefix-segment |
Displays the OSPF prefix segment information |
prefix-segment <instance> Displays the OSPF prefix segments for the specified instance and address family |
prefix-segment <instance-name> <afi> |
Example: OSPF neighbor information for the default instance
supervisor@rtbrick>SPINE01: op> show ospf segment-routing
<...>
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 types include 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 types include 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 types include 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 types include external, network, router and summary. |
<afi> |
Displays LSDB neighbor information for the specified address family. Supported AFI values are 'ipv4' and 'ipv6'. You can display LSDB information for the specified address family using filters such as interface name, detail, and instance. |
Example 1: OSPF database information for the default instance
supervisor@rtbrick>SPINE01: cfg> show ospf database
Instance: default, Address family: ipv4, Area: 0.0.0.0
Type Link State ID Advertising Router Age Sequence Checksum Cost
Router 192.168.0.10 192.168.0.10 578 0x80000008 0x262a -
Router 192.168.0.20 192.168.0.20 579 0x80000009 0xddd7 -
Router 192.168.0.30 192.168.0.30 584 0x80000007 0x92be -
Network 11.0.0.5 192.168.0.50 583 0x80000004 0xc9b1 -
Network 12.0.0.2 192.168.0.20 579 0x80000004 0x7962 -
Network 12.3.0.2 192.168.0.20 579 0x80000004 0xdc7a -
Network 23.0.0.3 192.168.0.30 585 0x80000004 0x9917 -
Summary-Network 24.0.1.0 192.168.0.20 623 0x80000004 0xbc36 15000
Summary-Network 24.0.1.0 192.168.0.40 623 0x80000004 0x449a 15000
Summary-Network 24.0.1.0 192.168.0.50 578 0x80000005 0x795 25000
Instance: default, Address family: ipv4
Type Link State ID Advertising Router Age Sequence Checksum Cost
External 200.0.1.0 192.168.0.60 619 0x80000004 0xba29 16777214
External 200.0.1.60 192.168.0.60 619 0x80000004 0x6047 16777214
External 200.0.1.61 192.168.0.60 619 0x80000004 0x5650 16777214
Instance: default, Address family: ipv6, Instance ID: 0, Area: 0.0.0.0
Type Link State ID Advertising Router Age Sequence Checksum Cost
OSPFv3-Router 0.0.0.0 192.168.0.10 578 0x80000007 0xb041 -
OSPFv3-Router 0.0.0.0 192.168.0.20 579 0x80000007 0x1085 -
OSPFv3-Router 0.0.0.0 192.168.0.30 580 0x80000007 0xe89 -
Inter-Area-Prefix 1.0.0.0 192.168.0.20 624 0x80000004 0xd4b7 15000
Inter-Area-Prefix 1.0.0.0 192.168.0.30 624 0x80000004 0x2208 25000
Inter-Area-Prefix 1.0.0.0 192.168.0.40 623 0x80000004 0x5c1c 15000
Inter-Area-Prefix 1.0.0.0 192.168.0.50 623 0x80000004 0xf9ee 10000
Intra-Area-Prefix 1.0.0.0 192.168.0.10 578 0x80000006 0x7af2 -
Intra-Area-Prefix 1.0.0.0 192.168.0.20 579 0x80000005 0xf646 -
Intra-Area-Prefix 1.0.0.0 192.168.0.30 580 0x80000006 0x56b2 -
Link 6.0.8.0 192.168.0.10 583 0x80000005 0x7d82 -
Link 6.0.8.0 192.168.0.20 584 0x80000005 0xa51a -
Link 6.0.32.3 192.168.0.10 623 0x80000004 0x17d2 -
Link 6.0.32.3 192.168.0.20 624 0x80000004 0x3f6a -
Instance: default, Address family: ipv6, Instance ID: 0
Type Link State ID Advertising Router Age Sequence Checksum Cost
OSPFv3-External 1.0.0.0 192.168.0.60 619 0x80000004 0xa367 16777214
OSPFv3-External 2.0.0.0 192.168.0.60 619 0x80000004 0x738a 16777214
<...>
Example 2: OSPF database detailed information
supervisor@rtbrick>SPINE01: cfg> show ospf database detail
Instance: default, Address family: ipv4, Area: 0.0.0.0 LSAs
LSA ID: 192.168.0.10
Advertising router: 192.168.0.10, LSA type: Router
Sequence number: 0x80000008, Checksum: 0x262a, LSA age: 719s
Length: 132, Options: *|-|-|-|-|-|E|*, Flags: -|-|-|-
Number of links: 9
Link ID: 12.0.0.2
Link data: 12.0.0.1, Type: Transit
Type of service: 0, Metric: 10000
Link ID: 192.168.0.20
Link data: 12.1.0.1, Type: P2P
Type of service: 0, Metric: 20000
Link ID: 12.1.0.0
Link data: 255.255.255.252, Type: Stub
Type of service: 0, Metric: 20000
Link ID: 192.168.0.20
Link data: 12.2.0.0, Type: P2P
Type of service: 0, Metric: 40000
Link ID: 12.2.0.0
Link data: 255.255.255.254, Type: Stub
Type of service: 0, Metric: 40000
Link ID: 12.3.0.2
Link data: 12.3.0.1, Type: Transit
Type of service: 0, Metric: 30000
Link ID: 11.0.0.5
Link data: 11.0.0.1, Type: Transit
Type of service: 0, Metric: 60000
Link ID: 192.168.0.10
Link data: 255.255.255.255, Type: Stub
Type of service: 0, Metric: 10000
Link ID: 192.168.0.11
Link data: 255.255.255.255, Type: Stub
Type of service: 0, Metric: 10000
LSA ID: 192.168.0.20
Advertising router: 192.168.0.20, LSA type: Router, Router ID: 192.168.0.20
Sequence number: 0x80000009, Checksum: 0xddd7, LSA age: 720s
Interface: ifl-0/0/0/100, Neighbor address: 12.1.0.2
Length: 156, Options: *|-|-|-|-|-|E|*, Flags: -|-|-|B
Number of links: 11
Link ID: 12.0.0.2
Link data: 12.0.0.2, Type: Transit
Type of service: 0, Metric: 10000
Link ID: 192.168.0.10
Link data: 12.1.0.2, Type: P2P
Type of service: 0, Metric: 20000
Link ID: 12.1.0.0
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 192.168.0.10
Instance: default, Address family: ipv4, Area: 0.0.0.0
Type Link State ID Advertising Router Age Sequence Checksum Cost
Router 192.168.0.10 192.168.0.10 791 0x80000008 0x262a -
Instance: default, Address family: ipv6, Instance ID: 0, Area: 0.0.0.0
Type Link State ID Advertising Router Age Sequence Checksum Cost
OSPFv3-Router 0.0.0.0 192.168.0.10 791 0x80000007 0xb041 -
Intra-Area-Prefix 1.0.0.0 192.168.0.10 791 0x80000006 0x7af2 -
Link 6.0.8.0 192.168.0.10 796 0x80000005 0x7d82 -
Link 6.0.32.3 192.168.0.10 836 0x80000004 0x17d2 -
Link 6.8.8.0 192.168.0.10 836 0x80000004 0x677e -
Link 6.8.32.3 192.168.0.10 836 0x80000004 0x2b9b -
Link 6.32.8.0 192.168.0.10 795 0x80000006 0x3893 -
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. |
<afi> |
Displays SPF result information for the specified address family. Supported AFI values are 'ipv4' and 'ipv6'. You can display SPF result information for the specified address family using filters such as interface name, detail, and instance. |
Example 1: OSPF SPF Result for the default instance
supervisor@rtbrick>SPINE01: op> show ospf spf result
Instance: default, Address family: ipv4, Area: 0.0.0.0
Node ID Type Cost Advertising Router Flags Neighbor Node Interface Nexthop
12.0.0.2 network 10000 192.168.0.20 -|-|-|- - local -
12.3.0.2 network 30000 192.168.0.20 -|-|-|- - local -
23.0.0.3 network 20000 192.168.0.30 -|-|-|- 192.168.0.20 ifl-0/0/0/1 12.0.0.2
11.0.0.5 network 55000 192.168.0.50 -|-|-|- 192.168.0.20 ifl-0/0/0/1 12.0.0.2
192.168.0.10 router 0 192.168.0.10 -|-|-|- - local -
192.168.0.20 router 10000 192.168.0.20 -|-|-|B 192.168.0.20 ifl-0/0/0/1 12.0.0.2
192.168.0.30 router 20000 192.168.0.30 -|-|-|B 192.168.0.20 ifl-0/0/0/1 12.0.0.2
192.168.0.40 router 55000 192.168.0.40 -|-|-|B 192.168.0.20 ifl-0/0/0/1 12.0.0.2
192.168.0.50 router 55000 192.168.0.50 -|-|-|B 192.168.0.20 ifl-0/0/0/1 12.0.0.2
Instance: default, Address family: ipv6, Area: 0.0.0.0, Instance ID: 0
Node ID Type Cost Advertising Router Flags Neighbor Node Interface Nexthop
192.168.0.10 router 0 192.168.0.10 -|-|-|- - local -
6.0.8.0 network 10000 192.168.0.20 -|-|-|- - local -
6.8.32.3 network 30000 192.168.0.20 -|-|-|- - local -
192.168.0.20 router 10000 192.168.0.20 -|-|-|B 192.168.0.20 ifl-0/0/0/1 fe80::7845:9aff:fec0:0
6.0.8.0 network 20000 192.168.0.30 -|-|-|- 192.168.0.20 ifl-0/0/0/1 fe80::7845:9aff:fec0:0
192.168.0.30 router 20000 192.168.0.30 -|-|-|B 192.168.0.20 ifl-0/0/0/1 fe80::7845:9aff:fec0:0
192.168.0.40 router 55000 192.168.0.40 -|-|-|B 192.168.0.20 ifl-0/0/0/1 fe80::7845:9aff:fec0:0
6.48.8.0 network 55000 192.168.0.50 -|-|-|- 192.168.0.20 ifl-0/0/0/1 fe80::7845:9aff:fec0:0
192.168.0.50 router 55000 192.168.0.50 -|-|-|B 192.168.0.20 ifl-0/0/0/1 fe80::7845:9aff:fec0:0
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 192.168.0.10
Instance: default, Address family: ipv4, Area: 0.0.0.0
Node ID Type Cost Advertising Router Flags Neighbor Node Interface Nexthop
192.168.0.10 router 0 192.168.0.10 -|-|-|- - local -
Instance: default, Address family: ipv6, Area: 0.0.0.0, Instance ID: 0
Node ID Type Cost Advertising Router Flags Neighbor Node Interface Nexthop
192.168.0.10 router 0 192.168.0.10 -|-|-|- - local -
OSPF SPF Log
Displays SPF Log information.
Syntax:
show ospf spf log <options>
Option | Description |
---|---|
- |
Without any option, the command displays the SPF log of all instances. |
instance <instance-name> |
Displays SPF log for the specified instance. |
<afi> |
Displays SPF log information for the specified address family. Supported AFI values are 'ipv4' and 'ipv6'. You can display SPF log information for the specified address family using filters such as interface name, detail, and instance. |
Example 1: OSPF SPF Result for the default instance
supervisor@rtbrick>SPINE01: op> show ospf spf log
Instance: default
Router ID: 192.168.0.10
Schedule timestamp: 2024-04-30 11:19:51, Area ID: 0.0.0.0, LSA type: Router
Reason: Router LSA change, Back off timer: 50, LSA count: 1
LS ID: 0.0.0.0, Number of schedule request: 1
SPF start time: 2024-04-30 11:19:51, Number of nodes: 1, Number of links: 0
Number of stub links: 0, SPF init time: 31us, SPF run time: 394us
Router LSA change count: 1, Network LSA change count: -
Prefix changes: -, Sequence number: 1
Router ID: 192.168.0.10
Schedule timestamp: 2024-04-30 11:19:51, Area ID: 0.0.0.0, LSA type: Router
Reason: Router LSA change, Back off timer: 50, LSA count: 1
LS ID: 192.168.0.10, Number of schedule request: 1
SPF start time: 2024-04-30 11:19:51, Number of nodes: 1, Number of links: 0
Number of stub links: 7, SPF init time: 7us, SPF run time: 311us
Router LSA change count: 1, Network LSA change count: -
Prefix changes: -, Sequence number: 2
Router ID: 192.168.0.10
Schedule timestamp: 2024-04-30 11:19:51, Area ID: 0.0.0.0, LSA type: Link
Reason: Unknown map - (value) 0xa, Back off timer: 200, LSA count: 5
LS ID: 6.0.8.0, Number of schedule request: 5
SPF start time: 2024-04-30 11:19:51, Number of nodes: 1, Number of links: 0
Number of stub links: 0, SPF init time: 7us, SPF run time: 172us
Router LSA change count: 1, Network LSA change count: -
Prefix changes: -, Sequence number: 3
Router ID: 192.168.0.20
Schedule timestamp: 2024-04-30 11:19:51, Area ID: 0.0.0.0, LSA type: Router
Reason: Router LSA change, Back off timer: 5000, LSA count: 6
LS ID: 192.168.0.20, Number of schedule request: 6
SPF start time: 2024-04-30 11:19:56, Number of nodes: 3, Number of links: 6
Number of stub links: 20, SPF init time: 35us, SPF run time: 182us
Router LSA change count: 7, Network LSA change count: -
Prefix changes: -, Sequence number: 4
<...>
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. |
area <area-id> |
OSPF route information for the given area. |
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. Supported AFI values are 'ipv4' and 'ipv6'. |
instance <instance-name> <afi> <safi> |
Displays OSPF route information for the specified address family (AFI), sub-address family (SAFI), and instance. Supported AFI values are 'ipv4' and 'ipv6'. Supported SAFI values are 'unicast', and 'labeled-unicast''. |
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 |
<afi> <safi> |
Displays OSPF route information for the specified address family (AFI) and sub-address family (SAFI). Supported AFI values are 'ipv4' and 'ipv6'. Supported SAFI values are 'unicast', and 'labeled-unicast'' |
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 OSPF Route ABR. |
autonomous-system-boundary |
Displays Autonomous System Border Router information. Refer to section OSPF Route ABR. |
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
11.0.0.0/24 0.0.0.0 intra-area 55000 12.0.0.2 ifl-0/0/0/1
12.0.0.0/23 0.0.0.0 ospf-direct 10000 n/a local
12.1.0.0/30 0.0.0.0 ospf-direct 20000 n/a local
12.2.0.0/31 0.0.0.0 ospf-direct 40000 n/a local
12.3.0.0/17 0.0.0.0 ospf-direct 30000 n/a local
23.0.0.0/24 0.0.0.0 intra-area 20000 12.0.0.2 ifl-0/0/0/1
23.1.0.0/24 0.0.0.0 intra-area 25000 12.0.0.2 ifl-0/0/0/1
24.0.1.0/24 0.0.0.0 inter-area 25000 12.0.0.2 ifl-0/0/0/1
24.1.1.0/24 0.0.0.0 inter-area 20000 12.0.0.2 ifl-0/0/0/1
25.0.1.0/24 0.0.0.0 inter-area 35000 12.0.0.2 ifl-0/0/0/1
192.168.0.10/32 0.0.0.0 ospf-direct 10000 n/a local
192.168.0.11/32 0.0.0.0 ospf-direct 10000 n/a local
192.168.0.20/32 0.0.0.0 intra-area 20000 12.0.0.2 ifl-0/0/0/1
192.168.0.21/32 0.0.0.0 intra-area 20000 12.0.0.2 ifl-0/0/0/1
200.0.1.60/32 external-type-1 16777215 12.0.0.2 ifl-0/0/0/1
200.0.1.61/32 external-type-1 16777215 12.0.0.2 ifl-0/0/0/1
200.0.1.0/24 external-type-1 16777215 12.0.0.2 ifl-0/0/0/1
200.0.2.60/32 external-type-1 16777215 12.0.0.2 ifl-0/0/0/1
200.0.2.61/32 external-type-1 16777215 12.0.0.2 ifl-0/0/0/1
200.0.2.0/24 external-type-1 16777215 12.0.0.2 ifl-0/0/0/1
Instance: default, AFI: ipv6, SAFI: unicast, Instance ID: 0
Prefix Area Type Cost Next Hop
Interface
11::/64 0.0.0.0 intra-area 55000 fe80::7845:9aff:fec0:0 ifl-0/0/0/1
12::/64 0.0.0.0 ospf-direct 10000 n/a
local
12:1::/64 0.0.0.0 ospf-direct 20000 n/a
local
12:2::/64 0.0.0.0 ospf-direct 40000 n/a
local
23::/64 0.0.0.0 intra-area 20000 fe80::7845:9aff:fec0:0 ifl-0/0/0/1
24:0:1::/64 0.0.0.0 inter-area 25000 fe80::7845:9aff:fec0:0 ifl-0/0/0/1
24:1:1::/64 0.0.0.0 inter-area 20000 fe80::7845:9aff:fec0:0 ifl-0/0/0/1
25:0:1::/64 0.0.0.0 inter-area 35000 fe80::7845:9aff:fec0:0 ifl-0/0/0/1
25:1:1::/64 0.0.0.0 inter-area 40000 fe80::7845:9aff:fec0:0 ifl-0/0/0/1
<...>
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 192.168.0.20 10000 192.168.0.20 -|-|-|B ifl-0/0/0/1 12.0.0.2 192.168.0.30 20000 192.168.0.30 -|-|-|B ifl-0/0/0/1 12.0.0.2 192.168.0.40 55000 192.168.0.40 -|-|-|B ifl-0/0/0/1 12.0.0.2 192.168.0.50 55000 192.168.0.50 -|-|-|B ifl-0/0/0/1 12.0.0.2 192.168.0.20 10000 192.168.0.20 -|-|-|B ifl-0/0/0/1 fe80::7845:9aff:fec0:0 192.168.0.30 20000 192.168.0.30 -|-|-|B ifl-0/0/0/1 fe80::7845:9aff:fec0:0 192.168.0.40 55000 192.168.0.40 -|-|-|B ifl-0/0/0/1 fe80::7845:9aff:fec0:0 192.168.0.50 55000 192.168.0.50 -|-|-|B ifl-0/0/0/1 fe80::7845:9aff:fec0:0
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, Address family: ipv4 Node ID Cost Advertising Router Flags Interface Nexthop 192.168.0.60 40000 192.168.0.20 ifl-0/0/0/1 12.0.0.2 Instance: default, Address family: ipv6, Instance ID: 0 Node ID Cost Advertising Router Flags Interface Nexthop 192.168.0.60 40000 192.168.0.20 ifl-0/0/0/1 fe80::7845:9aff:fec0:0
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. |
area <area-id> |
OSPF request-list information for the given area. |
instance <instance-name> |
OSPF request-list information for the given instance. |
<afi> |
Displays request-list information for the specified address family. Supported AFI values are 'ipv4' and 'ipv6'. |
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: ifl-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: ifl-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: ifl-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: ifl-0/0/0/1, Neighbor address: 25.0.1.2
Length: 0, Options: *|-|-|-|-|-|-|*
<...>
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 |
---|---|
- |
Without any option, this command displays the transmit list of all link-state advertisements (LSA). |
area <area-id> |
OSPF transmit-list information for the given area. |
instance <instance-name> |
OSPF transmit-list information for the given instance. |
<afi> |
Displays transmit-list information for the specified address family. Supported AFI values are 'ipv4' and 'ipv6'. |
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
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. |
<afi> |
Displays packet statistics information for the specified address family. Supported AFI values are 'ipv4' and 'ipv6'. |
supervisor@rtbrick>SPINE01: op> show ospf statistics interface ifl-0/0/0/1 detail
Instance: default, Address family: ipv4
Interface: ifl-0/0/0/1, Peer address: 12.0.0.2
Hello packet:
Received packets: 658, Sent packets: 659, Total errors: 0, Unsupported option: 0
Area mismatch: 0, Area type option mismatch: 0, Dead interval mismatch: 0
Hello interval mismatch: 0, Mask mismatch: 0, Self router ID: 0
Obj add fail: 0, Source address mismatch: , Misc: 0
DD packet:
Received packets: 3, Sent packets: 4, Total errors: 1, 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, Invalid lsa: 0, Invalid external lsa: 0,
Lsdb Absent: 0, Lsa lookup fail: 0, Ls req add fail: 0
LS request packet:
Received 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:
Received packets: 0, 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, Invalid LSA payload: 0, Misc: 0
Ls ack packet:
Received packets: 0, Sent packets: 0, 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: 1
Instance: default, Address family: ipv6, Instance ID: 0
Interface: ifl-0/0/0/1, Peer address: fe80::7845:9aff:fec0:0
Hello packet:
Received packets: 658, Sent packets: 658, Total errors: 0, Unsupported option: 0
Area mismatch: 0, Area type option mismatch: 0, Dead interval mismatch: 0
Hello interval mismatch: 0, Mask mismatch: 0, Self router ID: 0
Obj add fail: 0, Source address mismatch: , Misc: 0
DD packet:
Received packets: 4, Sent packets: 4, Total errors: 1, 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, Invalid lsa: 0, Invalid external lsa: 0,
Lsdb Absent: 0, Lsa lookup fail: 0, Ls req add fail: 0
LS request packet:
Received packets: 1, Sent packets: 1, 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:
Received packets: 4, Sent packets: 5, 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, Invalid LSA payload: 0, Misc: 0
Ls ack packet:
Received packets: 4, Sent packets: 4, 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: 1
OSPF Clear Commands
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> <afi> |
Clears OSPF neighbor for the specified address family. Supported AFI values are 'ipv4' and 'ipv6'. Supported AFI values are 'ipv4' and 'ipv6'. When using an IPv6 address family with OSPFv3, an instance ID ranging from 0 to 31 must be specified. |
instance <instance-name> <afi> area <area-id> |
Clears OSPF neighbor for the specified area of the specified instance and address family. |
instance <instance-name> <afi> area <area-id> interface <interface-name> |
Clears OSPF neighbor for the specified interface for the specified area and address family 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> <afi> |
Forcefully clears OSPF neighbor for the specified address family. |
force instance <instance-name> <afi> area <area-id> |
Forcefully clears OSPF neighbor for the specified area of the specified instance and address family. |
force instance <instance-name> <afi> area <area-id> interface <interface-name> |
Forcefully clears OSPF neighbor for a specific interface and area of the specified instance and address family. |
Example:
supervisor@rtbrick>SPINE01: cfg> clear ospf neighbor instance default ipv6 instance-id 0 area 0 interface ifl-0/0/0/1
Triggered clear neighbor successfully
Clear OSPF Statistics
Clear the OSPF statistics for all instances or 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> <afi> |
Clears OSPF statistics for the specified address family of the specified instance. Supported AFI values are 'ipv4' and 'ipv6'. When using an IPv6 address family with OSPFv3, an instance ID ranging from 0 to 31 must be specified. |
instance <instance-name> <afi> area <area-id> |
Clears OSPF statistics for the specified area of the specified instance and address family. |
instance <instance-name> <afi> area <area-id> interface <interface-name> |
Clears OSPF statistics for the specified interface for the specified area of the specified instance and address family. |
Example:
supervisor@rtbrick>SPINE01: cfg> clear ospf statistics instance default ipv6 instance-id 0 area 0.0.0.0 interface ifl-0/0/0/1
Cleared statistics for all ipv6 neighbors under Instance [default] Area [0.0.0.0] Interface [ifl-0/0/0/1]
Clear OSPF Database
Clear the OSPF database for all instances.
Syntax:
clear ospf database <options>
Option | Description |
---|---|
- |
Without any option, the command clears all the OSPF database information. |
<afi> |
Clears OSPF database for the specified address family. Supported AFI values are 'ipv4' and 'ipv6'. Supported AFI values are 'ipv4' and 'ipv6'. When using an IPv6 address family with OSPFv3, an instance ID ranging from 0 to 31 must be specified. |
<afi> instance <instance-name> |
Clears OSPF database for the specified area of the specified instance and address family. |
Example:
supervisor@rtbrick>SPINE01: cfg> clear ospf database ipv6 instance default instance-id 0
Triggered clear database successfully