The OSPF Interface Data Structure

The OSPF Interface Data Structure:

Interface DatabasesThere are two databases in which an OSPF or IS-IS router stores information about its immediate environment: the interface and the neighbor database. The OSPF or IS-IS interface database records all the router interfaces on which the protocol is enabled and the interface parameters relevant to the protocol. The neighbor database likewise records all known neighbors and neighbor parameters, mostly based on the information from received Hello messages.This section examines interface databases for OSPF and IS-IS. IS-IS neighbor databases could also be examined in this , because IS-IS neighbors are adjacent after bidirectional communication is established. But OSPF neighbors are not fully adjacent until after database synchronization, and many of the states recorded in its neighbor database refer to steps in the synchronization process.

The OSPF Interface Data Structure

Each router interface running OSPF has an interface data structure associated with it, and the collection of those structures comprises the interface database. Figure 4.33 shows most of the database entry for an OSPF interface.

Figure 4.33. The data for an OSPF interface from the interface database.

Diab@Juniper6> show ospf interface fe-0/0/2.0


Interface       State       Area      DR     ID

BDR  ID          Nbrs

fe-0/0/2.0       BDR     1

Type LAN, address, mask,

MTU 1500, cost 1

DR    addr,    BDR addr, adj

count 1, priority 128

Hello 10, Dead 40, ReXmit 5, Not Stub



Although the format in which the router displays such information varies from vendor to vendor (Figure 4.33 is taken from a Juniper Networks router), in each case the interface data structure contains the same essential information:

    •  Type indicates the OSPF network type to which the interface is attached (broadcast, nonbroadcast, NBMA, point to multipoint, or virtual link). In Figure 4.33, you can see that the network type is LAN (broadcast).
    •  State is the functional level of the interface, as described in the next . The router decides whether adjacencies can be formed on the interface state. The state of the interface in Figure 4.33 is BDR (backup), indicating that this router is the BDR on the network to which this interface is attached.
    • IP Interface Address is the IP address assigned to the interface, and the source address of all OSPF packets sent out the interface. If the interface is unnumbered, of course, no IP address is assigned to it and this entry is empty. The address of the interface in Figure 4.33 is
    • IP Interface Mask indicates the portion of the IP interface address that is the IP prefix for the attached network. On virtual links and some point-to-point links, an address mask is not defined and so will not appear as a part of the interface data. The IP interface mask in Figure 4.33 is
    •  Area ID specifies the area to which the attached network belongs. OSPF messages originated on the interface will include this AID. In Figure 4.33, the AID is


  • Hello Interval is the configured or default OSPF hello interval for the interface. The routers send Hellos on the attached network at this interval, and include this value in the Hello Interval field of each Hello sent. In Figure 4.33, the hello interval is 10 seconds.
  •  RouterDeadInterval is the configured or default value advertised in Hello packets sent from this interface. In Figure 4.33 the router dead interval is 40 seconds.
  • InfTransDelay is the estimated number of seconds it takes to transmit a link state Update packet over the interface. The LSAs contained in the Update packet will have their age incremented by this amount before the packet is transmitted. No InfTransDelay is displayed in Figure 4.33, but it is nonetheless a part of this data structure. In almost all common OSPF implementations, the InfTransDelay is 1.
  • Router Priority is the value set in the Hello packets transmitted on this interface, to be used in the DR election. The router priority in Figure 4.33 is 128, the default value used by Juniper Networks routers.
  • Hello Timer, which is 10 seconds in Figure 4.33, is the interval between Hellos transmitted to the attached network. The hello interval in the transmitted Hellos is set to this value.
  •  Wait Timer is the time the router listens, after first becoming active on the attached network, for the presence of a DR (advertised on neighbors’ Hellos). No wait timer value is displayed in Figure 4.33 because it is not a configurable value. It is, as it is in all common OSPF implementations, the same as the router dead interval.
  • List of Neighboring Routers is the addresses of all neighbors learned from received Hellos. The router might or might not be adjacent with all the neighbors in this list. The JUNOS display in Figure 4.33 does not explicitly show this list, and instead just shows that there is one known neighbor (Nbrs) on the attached network. You can see the list with the JUNOS show ospf neighbors command. Cisco IOS does display the list along with its show ip ospf interface command.
  • Designated Router is both the RID and the interface address of the DR for the attached network (if there is one). Figure 4.33 shows that the DR RID is, and its interface address is
  •  Backup Designated Router is the RID and interface address of the BDR of the attached network, if there is one. Figure 4.33 shows that the BDR RID is, and its interface address is As you already know from the interface state in the display, the displaying router is the BDR, which you can also see from the fact that the BDR interface address and the IP interface address match.
  • Interface Output Cost is the outgoing cost of the interface. This metric, which is 1 for the interface in Figure 4.33, is advertised in Router LSAs originated by this router.
  •  RxmtInterval specifies the time the router waits, after sending LSAs on this interface, for an acknowledgement. If no acknowledgement is received after the number of seconds specified by this value, the router retransmits. The interface in Figure 4.33 has a RxmtInterval (ReXmit in the display) of 5 seconds, which is the default for both Juniper and Cisco routers.
  • AuType is the type of OSPF authentication used on the interface.
  • Authentication Key is the secure information used for authentication when either simple password or cryptographic authentication is enabled. No authentication is configured for the interface in Figure 4.33.


OSPF Interface States:

Like so many OSPF components, there is a state machine for determining what state each interface should be in, based on prescribed events. The possible OSPF interface states are:

  • Down
  • Loopback
  • Waiting
  • Point-to-Point
  • DR Other
  • Backup
  • DR
  • The interface is in the Down state when the underlying link media is unusable, either as a result of an indication from the physical or data link protocols or because the interface has been administratively disabled. No OSPF packets are sent or received on an interface in this state, all parameters are in their initial values, all timers are disabled, and no adjacencies exist.
  • Loopback indicates that the interface is looped back either in hardware or software, usually for maintenance purposes. OSPF does not transmit any packets on an interface in this state, but it does include the interface address in the Router LSAs flooded from other interfaces to facilitate monitoring and maintenance functions such as pinging the interface.
  • Waiting indicates that the router is attempting to determine whether a DR or BDR exists on the attached network, as indicated by received Hello packets. the interface stays in the waiting state for a period equal to the router dead interval. The router sends Hellos (with the DR and BDR fields set to, but cannot attempt to start a DR/BDR election for the attached network while the interface is in this state.
  • Point-to-point indicates that the OSPF network type is point-to-point or point-to-multipoint and that the interface is fully operational. OSPF packets are sent and received, and if a neighbor is detected on the link the router attempts to establish an adjacency with it.
  • DR Other indicates that the interface is fully operational on a broadcast or NBMA network and that it is neither the DR nor the BDR. OSPF packets are sent and received, the router forms adjacencies with the DR and BDR if they exist, and it attempts to synchronize its link state database with the DR.
  • The interface is in the Backup state when it is fully operational on a broadcast or NBMA network and the router has been elected as the BDR. In this state, the router established adjacencies with all other routers on the network but does not perform database synchronization.
  • The interface state is DR when the interface is fully operational on a broadcast or NBMA network and the router has been elected the DR for the network. The router attempts to become adjacent with all other routers on the network, synchronizes its link state database with all adjacent routers, and originates a Network LSA to represent the network as a pseudonode.

Figure 4.34 shows a diagram of the OPSF interface state machine. The events causing an interface state change are:

  • InterfaceUp Lower-level protocols have indicated that the interface is up. Or, in the case of virtual links, this event is triggered by the SPF calculation.
  • WaitTimer The wait timer has expired.
  • BackupSeen A Hello packet is received from a neighbor with which bidirectional communication has been established, and which either lists itself as the BDR or which lists itself as the DR and indicates that there is no BDR.
  • NeighborChange An event caused by one of the following:
    • Bidirectional communication has been established with a neighbor.
    • Bidirectional communication is lost with a neighbor.
    • A bidirectional neighbor is newly declaring itself the DR or BDR.
    • A bidirectional neighbor is no longer declaring itself the DR or BDR.
    • The router priority value in a bidirectional neighbor’s Hello has changed.
    • A NeighborChange event triggers a DR/BDR election.
  • LoopInd The interface is looped back.
  • UnLoopInd The interface loopback has been dropped.
  • InterfaceDown Lower-level protocols indicate that the interface is down. The interface can be in any state prior to this event.
Figure 4.34. The OSPF interface state machine.
 detailed description of the events causing OSPF interface state changes, and the results of those changes, is provided in RFC 2328

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

F3F r5WZ ep

Please type the text above:

Check Also