cc/td/doc/product/aggr/vpn5000/5000sw/conc52x/ref52x
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

show ospf

show ospf

The show ospf commands display extensive information about the OSPF database, configuration, and dynamic memory usage.

show ospf {rtrid | config | stats | mem | nbr | rt | all | if [verbose] |
db [all | rtr | net | sum | ext]}


Syntax Description

rtrid

The show ospf rtrid command displays the router ID, which is the largest IP interface address associated with the router. The router ID is calculated only at boot time, or when OSPF has been re-enabled using the ospfenable command (see ospfenable).

config

The show ospf config command displays user-configured values that are currently being used by the protocol.

stats

The show ospf stats command shows OSPF packet statistics.

mem

The show ospf mem command displays OSPF dynamic memory usage.

nbr

The show ospf nbr command displays an abbreviated list of current neighbors and their state.

rt

The show ospf rt command displays the ABR (Area Border Router) and ASBR (Autonomous System Border Router) routes. An Area Border Router is a router which has interfaces in more than one area. An Autonomous System Border Router is a router which acts as a gateway between OSPF and other routing protocols (e.g., RIP, BGP, etc.).

all

The show ospf all command displays the entire OSPF Link State Database.

if [verbose]

The show ospf if command displays the OSPF interface database. The verbose option can be used to display more information.

db [all | rtr | net | sum | ext]

The show ospf db commands display various portions of the OSPF Link State Database.

  • If the all option is used, the router, net and summary databases will be displayed.

  • If the rtr option is used, the router Link State Database will be displayed.

  • If the net option is used, the network Link State Database will be displayed.

  • If the sum option is used, the summary Link State Database will be displayed.

  • If the ext option is used, the external Link State Database will be displayed.

Usage Guidelines

The following sections describe the display contents for each command.

show ospf config Display

The show ospf config command displays configured settings for each interface, including the IP address of the interface, the area the interface is assigned to, and whether the interface is an active or passive OSPF interface. The display also includes any configured settings for OSPF virtual links, the Area ID and any net ranges set for the area and the routing protocol redistribution settings.

Interface Cost

This is the configured cost assigned to this interface.

Router Priority

This is the configured priority assigned to this interface.

Hello Interval

This is the interval, in seconds, the interface sends out "keepalive" packets to let other routers know this interface is up.

Router Dead Interval

This is the interval, in seconds, the router's neighbors will wait without receiving a "keepalive" packet from this router before they assume this router is down.

Transit Delay

This is the amount of time added to the age of Link State Update packets before transmission.

Retransmit Interval

This is the interval, in seconds, the interface will delay before retransmitting Link State Update packets.

show ospf stats Display

The show ospf stats command shows how many of each of the five types of OSPF packets have been received and sent: Hello, Database Description, Link State Request, Link State Update, and Link State Acknowledgment. Discarded packets are not errors; an example of a discarded packet would be a multicast for Designated Routers when this router is not the Designated Router or Backup Designated Router. If "Packet errors" is nonzero, a detailed breakdown of each type of packet error will be displayed.

show ospf if Display

The show ospf if display includes:

Cost

This is the cost of using this interface. An OSPF router will choose the path with the lowest cost to enter into its routing table.

State

This indicates whether this router is the Designated Router or the Backup Designated Router.

Type

This indicates the interface's type. Broadcast interfaces are LAN/Ethernet interfaces. Point-to-Point interfaces are WAN interfaces running PPP. Point-to-Multipoint interfaces are WAN interfaces running Frame Relay.

Priority

This indicates the router's priority. The priority is used to determine whether the router is eligible to become the Designated Router or the Backup Designated Router for the LAN. A priority of 0 means that the router is not eligible. The router with the highest priority becomes the Designated Router.

Designated Router

This is the IP address of the Designated Router.

Backup Designated Router

This is the IP address of the Backup Designated Router.

Timers

This displays the timer settings for this interface. The Hello and Dead timers for each connected router must match or the routers will not be able to communicate.

Neighbors

This shows the number of current neighbors in each state of the neighbor negotiation process. Down, Att (attempting connection), Init (initializing connection), ExStart (starting to exchange database information), Exch (in the process of exchanging database information), and Loading (requesting Link State Advertisements from each other) are transient states and should only appear at startup. 2WAY indicates that this router and the neighbor have completed their neighbor negotiation. FULL indicates that the neighbor is the Designated Router or the Backup Designated Router.

show ospf nbr Display

The show ospf nbr display includes:

Rrt ID

This is the neighbor's router ID, which is the largest IP interface address associated with the router.

Addr

This is the IP address of the neighbor.

State

This is the current state of the neighbor negotiation process between this router and the neighbor. Unless the router is just starting up, the state should either be 2WAY or FULL. FULL indicates that the neighbor is the Designated Router or the Backup Designated Router. 2WAY indicates that this router and the neighbor have completed their neighbor negotiation.

Examples

The following sections show an example for each command.

show ospf rtrid Example

Following is sample output from a show ospf rtrid command.

OSPF Router ID for this router is 198.41.11.202
 

show ospf config Example

Following is sample output from a show ospf config command.

OSPF PER-INTERFACE CONFIGURATION
IP Ethernet Intface 198.41.11.201 assign to area 0.0.0.0
Interface is Active
     Interface Cost = 10, Router Priority = 1
     Hello Interval = 10, Router Dead Interval = 40
     Transit Delay = 1, Retransmit Interval = 5
IP Ethernet Interface 74.0.0.1 assigned to area 0.0.0.0
Interface is Active
     Interface Cost = 10, Router Priority = 1
     Hello Interval = 10, Router Dead Interval = 40
     Transit Delay = 1, Retransmit Interval = 5
 IP Ethernet Interface 73.0.0.1 assigned to area 0.0.0.0
 Interface is Active
     Interface Cost = 10, Router Priority = 1
     Hello Interval = 10, Router Dead Interval = 40
     Transit Delay = 1, Retransmit Interval = 5
 IP Ethernet Interface 77.0.0.1 assigned to area 0.0.0.0
 Interface is Active
     Interface Cost = 10, Router Priority = 1
     Hello Interval = 10, Router Dead Interval = 40
     Transit Delay = 1, Retransmit Interval = 5
         
 OSPF VIRTUAL LINK CONFIGURATION
     None
 
 OSPF AREA CONFIGURATION
     Area ID:  0.0.0.0
     Net Ranges defined for this area:
               None
 
ROUTING PROTOCOL REDISTRIBUTION
      Redistribute RIP routes into OSPF is disabled
      Redistribute BGP routes into OSPF is disabled
      Redistribute OSPF routes into RIP is disabled
 

show ospf mem Example

Following is sample output from a show ospf mem command.

------------------------------------------------------------
OSPF DATABASE STATIC MEMORY USAGE:  36882 bytes
 
          OSPF DATABASE DYNAMIC MEMORY USAGE
Memory Block   Allocs   Deallocs   In Use   Size     Total
------------------------------------------------------------
ospf_intf      2        0          2        874      1748
ospf_nbr       4        0          4        118      472
ospf_nbr_node  4        0          4        20       80
ospf_nh_block  4        0          4        20       80
ospf_lsdb      419      323        96       74       7104
ospf_rtr_lsa   178      173        5        var      216
ospf_stub_lsa  2        0          2        24       48
ospf_net_lsa   36       35         1        var      44
ospf_sum_lsa   350      340        10       28       280
ospf_ase_lsa   3027     2949       78       36       2808
ospf_route     6        4          2        46       92
ospf_netrange  0        0          0        28       0
ospf_rtinfo    82       2          30       80       2400
ospf_dbsum     6        6          0        12       0
ospf_hdr       6        6          0        1422     0
ospf_ack_hdrq  156      156        0        28       0
ospf_ack_intf  3503     3503       0        28       0
ospf_nbrlist   70       70         0        12       0
ospf_lsreq     94       94         0        24       0
ospf_lsdblist  3660     3660       0        16       0
------------------------------------------------------------
Total In Use                                         15130
------------------------------------------------------------
 

show ospf stats Example

Following is sample output from a show ospf stats command.

OSPF Packet Statistics
 
                               Received    Sent
Hello Packets:                 29371       5880        
Database Description Packets:  13          16          
Link State Request Packets:    0           9           
Link State Update Packets:     327         34          
LS Acknowledgment Packets:     275         279         
Total Packets:                 30811       6218        
 
Packets discarded:  825
Packet errors:      0
 

In the example below, the router is reporting a Hello timer interval mismatch with one of the routers on the network, which will cause the two routers to be unable to establish an adjacency.

OSPF Packet Statistics
 
                              Received    Sent
Hello Packets:                 26          19
Database Description Packets:  11          11
Link State Request Packets:    1           4
Link State Update Packets:     17          4
LS Acknowledgment Packets:     6           10
Total Packets:                 63          48
 
Packets discarded:      0
Packet errors:          2
Hello timer mismatch:   2
 

show ospf if Example

Following is sample output from a show ospf if command.

OSPF IP Interfaces
 
Interface Ether0 is Active
    Cost: 5  State: NOT DR OR BDR  Type: BROADCAST
    Priority: 1
    Designated Router: 198.41.11.205
    Backup Designated Router: 198.41.11.204
    Timers:  Hello: 10  Dead: 40  Retrans: 5
    Neighbors:
       Down 0 Att 0 Init 0 2Way 3 ExStart 0 Exch 0 Loading 0 Full 2
 
Interface Ether1 is Active
    Cost: 5  State: NOT DR OR BDR  Type: BROADCAST
    Priority: 1
    Designated Router: 198.41.11.17
    Backup Designated Router: 198.41.11.6
    Timers:  Hello: 10  Dead: 40  Retrans: 5
    Neighbors:
       Down 0 Att 0 Init 0 2Way 0 ExStart 0 Exch 0 Loading 0 Full 2
 

show ospf nbr Example

Following is sample output from a show ospf nbr command.

-----------------------------------------------------------------
OSPF Neighbors
=================================================================
Ether0    RtrID: 198.41.11.200  Addr: 198.41.11.200  State:  2WAY
Ether0    RtrID: 198.41.11.202  Addr: 198.41.11.202  State:  2WAY
Ether0    RtrID: 198.41.11.203  Addr: 198.41.11.203  State:  2WAY
Ether0    RtrID: 198.41.11.204  Addr: 198.41.11.204  State:  FULL
Ether0    RtrID: 198.41.11.205  Addr: 198.41.11.205  State:  FULL
Ether1    RtrID: 198.41.11.6    Addr: 198.41.11.6    State:  FULL
Ether1    RtrID: 198.41.11.17   Addr: 198.41.11.17   State:  FULL
-----------------------------------------------------------------
 

show ospf rt Example

Following is sample output from a show ospf rt command.

AREA 0:
AS Border Routes:
        None
 
Area Border Routes:
78.0.0.1  Area 0  Cost 10  AdvRouter 78.0.0.1
     Nexthop: 75.0.0.5 Interface: 75.0.0.2
76.0.0.2  Area 0  Cost 10  AdvRouter 76.0.0.2
     Nexthop: 75.0.0.3 Interface: 75.0.0.2
75.0.0.2  Area 0  Cost 0   AdvRouter 75.0.0.2
 
AREA 2:
AS Border Routes:
        None
 
Area Border Routes:
75.0.0.2  Area 2  Cost 0  AdvRouter 75.0.0.2
         
SUMMARY AS Border Routes:
        None
 

show ospf db Example

Following is sample output from a show ospf db command.

OSPF Router, Net and Summary Databases:
 
Area 10:
STUB    AdvRtr: 198.41.11.202  Len: 24  Age: 3600  Seq: 00000000
  Router: 198.41.11.192 Mask: 255.255.255.240 Network: 198.41.11.192
 
STUB    AdvRtr: 198.41.11.202  Len: 24  Age: 2084  Seq: 00000000
  Router: 79.0.0.0 Mask: 255.0.0.0 Network: 79.0.0.0
 
RTR     AdvRtr: 198.41.11.193  Len: 36  Age: 1199  Seq: 80000d6b
  RouterID: 198.41.11.193  Area Border: On  AS Border: Off
        Connect Type: TRANS NET Cost: 10
        DR: 198.41.11.193       Address: 198.41.11.193
        Nexthops(1):
                198.41.11.193  Interface: 198.41.11.202
 
RTR     AdvRtr: 198.41.11.194  Len: 36  Age: 393  Seq: 8000063f
  RouterID: 198.41.11.194  Area Border: Off  AS Border: Off
        Connect Type: TRANS NET Cost: 10
        DR: 198.41.11.193       Address: 198.41.11.194
        Nexthops(1):
                198.41.11.194  Interface: 198.41.11.202
 
NET     AdvRtr: 198.41.11.193  Len: 44  Age: 1200  Seq: 80000034
  Router: 198.41.11.193 Mask: 255.255.255.240 Network: 198.41.11.192
        Attached Router: 198.41.11.193
        Attached Router: 198.41.11.194
        Attached Router: 198.41.11.200
        Attached Router: 198.41.11.202
        Attached Router: 198.41.11.203
        Nexthops(1):
                198.41.11.193  Interface: 198.41.11.202

SUM NET AdvRtr: 198.41.11.193  Len: 28  Age: 1486  Seq: 80000026
        Network: 192.168.40.0   Mask: 255.255.255.0    Cost: 20
        Nexthops(1):
                198.41.11.193  Interface: 198.41.11.202
 
SUM NET AdvRtr: 198.41.11.193  Len: 28  Age: 1486  Seq: 80000026
        Network: 192.168.41.0   Mask: 255.255.255.0    Cost: 20
        Nexthops(1):
                198.41.11.193  Interface: 198.41.11.202
 
SUM NET AdvRtr: 198.41.11.193  Len: 28  Age: 1486  Seq: 80000026
        Network: 192.168.42.0   Mask: 255.255.255.0    Cost: 20
        Nexthops(1):
                198.41.11.193  Interface: 198.41.11.202

Related Commands

Command Description

configure IP

Configures IP parameters for an interface

configure IP Protocol Precedence

Configures the precedence order for routes in the routing table

configure OSPF Area

Configures OSPF area parameters

configure OSPF Virtual Link

Configures OSPF to allow an area that is not contiguous to the backbone area (area 0) to operate

ospfenable

Enables OSPF


hometocprevnextglossaryfeedbacksearchhelp
Posted: Wed Sep 27 11:39:29 PDT 2000
Copyright 1989-2000©Cisco Systems Inc.