show ip ospf interface

Displays information about all or specific OSPF-enabled interfaces.

Syntax

show ip ospf interface [ ip address ] [ brief ] [ ethernet unit/slot/port ] [ loopback number ] [ tunnel number ] [ ve vlan_id ]

Parameters

ip address
Specifies interface IP address in dotted decimal format.
brief
Displays brief summary information about the specified interface.
ethernet unit/slot/port
Specifies an Ethernet interface. Specify the interface ID in the format unit/slot/port-id.
loopback number
Specifies a loopback port number in the range of 1 to 255.
tunnel number
Specifies a tunnel interface.
ve vlan_id
Specifies the VLAN number.

Modes

Privileged EXEC mode

Usage Guidelines

Use the brief keyword to limit the display to the following fields:

  • Interface
  • Area
  • IP address
  • Cost
  • State
  • Nbrs(F/C)

Command Output

The show ip ospf interface command displays the following information:

This field

Displays

Interface

The type of interface type and the port number or number of the interface.

IP Address

The IP address of the interface.

Area

The OSPF area configured on the interface

Database Filter

The router’s configuration for blocking outbound LSAs on an OSPF interface.

If Not Configured is displayed, there is no outbound LSA filter configured. This is the default condition.

State

The state of the interface. Possible states include the following:

  • DR - The interface is functioning as the Designated Router for OSPFv2.
  • BDR - The interface is functioning as the Backup Designated Router for OSPFv2.
  • Loopback - The interface is functioning as a loopback interface.
  • P2P - The interface is functioning as a point-to-point interface.
  • Passive - The interface is up but it does not take part in forming an adjacency.
  • Waiting - The interface is trying to determine the identity of the BDR for the network.
  • None - The interface does not take part in the OSPF interface state machine.
  • Down - The interface is unusable. No protocol traffic can be sent or received on such a interface.
  • DR other - The interface is a broadcast or NBMA network on which another router is selected to be the DR.
  • Active - The interface sends or receives all the OSPFv2 control packets and forms the adjacency.

default

Shows whether or not the default passive state is set.

Pri

The interface priority.

Cost

The configured output cost for the interface.

Interface bandwidth

The configured bandwidth on a tunnel interface for routing metric purposes only.

Options

OSPF Options (Bit7 - Bit0):

  • unused:1
  • opaque:1
  • summary:1
  • dont_propagate:1
  • nssa:1
  • multicast:1
  • external route capable:1
  • tos:1

Type

The area type, which can be one of the following:

  • Broadcast
  • Point to Point
  • non-broadcast
  • Virtual Link

Events

OSPF Interface Event:

  • Interface_Up = 0x00
  • Wait_Timer = 0x01
  • Backup_Seen = 0x02
  • Neighbor_Change = 0x03
  • Loop_Indication = 0x04
  • Unloop_Indication = 0x05
  • Interface_Down = 0x06
  • Interface_Passive = 0x07

Timer intervals

The interval, in seconds, of the transmit-interval, retransmit-interval, hello-interval, and dead-interval timers.

DR

The router ID (IPv4 address) of the DR.

BDR

The router ID (IPv4 address) of the BDR.

Neighbor Count

The number of neighbors to which the interface is connected.

Adjacent Neighbor Count

The number of adjacent neighbor routers.

Neighbor:

The IP address of the neighbor.

Examples

This example shows sample output from the show ip ospf interface command when the briefkeyword is used.

device# # show ip ospf interface brief
Number of Interfaces is 1
Interface Area IP Addr/Mask Cost State Nbrs(F/C)
eth 1/1/2    0    16.1.1.2/24   1     down  0/0

This example displays information about a specified OSPF-enabled VE interface.

device# show ip ospf interface ve 20

ve 20  admin up, oper up, ospf enabled, state up
     IP Address 21.21.21.22, Area 0
     Database Filter: Not Configured
     State BDR, Pri 1, Cost 1, Options 2, Type broadcast Events 31
     Timers(sec): Transmit 1, Retrans 5, Hello 10, Dead 40
     DR:  Router ID 3.3.3.3           Interface Address 21.21.21.21
     BDR: Router ID 2.2.2.2           Interface Address 21.21.21.22
                     Packets Received        Packets Sent
     Hello                      86374               86735
     Database                       2                   4
     LSA Req                        1                   0
     LSA Upd                      451                 907
     LSA Ack                      906                 451
     No Packet Errors!
     Neighbor Count = 1, Adjacent Neighbor Count= 1
     Neighbor:         21.21.21.21 [id 3.3.3.3] (DR)
     Authentication-Key: None
     MD5 Authentication: Key None, Key-Id None, Auth-change-wait-time 300

This example displays information about a specified OSPF-enabled Ethernet interface, including the cost, where the cost is calculated using the default interface speed and auto cost.

device# show ip ospf interface ethernet 3/1/1

     e 3/1/1 admin up, oper up, ospf enabled, state up
     IP Address 89.0.0.2, Area 0
     Database Filter: Not Configured
     State BDR, Pri 1, Cost 1, Options 2, Type broadcast Events 3

This example displays information about a specified OSPF-enabled Ethernet interface, including the cost, which has been calculated using the configured interface bandwidth and the default auto-cost.

device# show ip ospf interface ethernet 1/1/3

e 1/1/3 admin up, oper up, ospf enabled, state up
     IP Address 172.201.3.2, Area 0
     Database Filter: Not Configured
     State DR, Pri 1, Cost 34, Options 2, Type broadcast Events 5
     Timers(sec): Transmit 1, Retrans 5, Hello 10, Dead 40
     DR:  Router ID 192.168.3.1       Interface Address 172.201.3.2
     BDR: Router ID 192.168.1.1       Interface Address 172.201.3.1
                     Packets Received        Packets Sent
     Hello                         73                  79
     Database                       3                   2
     LSA Req                        0                   1
     LSA Upd                        4                   5
     LSA Ack                        5                   3
     No Packet Errors!
     Neighbor Count = 1, Adjacent Neighbor Count= 1
     Neighbor:         172.201.3.1 [id 192.168.1.1] (BDR)
     Authentication-Key: None
     MD5 Authentication: Key None, Key-Id None, Auth-change-wait-time 300

History

Release version Command history
8.0.30 This command was modified to include configured bandwidth status.