RFC 1850

OSPF Version 2 Management Information Base

๐Ÿ“… published November 1995, from ietf

RFC 1850: OSPF Version 2 Management Information Base โœจ

Okay bestie, so this is RFC 1850 and it's all about the OSPF Version 2 Management Information Base ๐ŸŽ€ It was written in November 1995 by F. Baker from Cisco Systems and R. Coltun from RainbowBridge Communications ๐Ÿ’– It's on the Standards Track ๐Ÿ”ฅ, and it obsoletes RFC 1253 ๐Ÿ’… so 1253 is officially retired and this is the new hotness.


Status of This Memo โœจ

Okay so this is an Internet standards track protocol for the whole Internet community ๐ŸŒˆ and it's literally asking for discussion and suggestions to make it better ๐Ÿซถ For the official standardization state and status, check the current edition of "Internet Official Protocol Standards" (STD 1) ๐Ÿ“œ And distribution of this memo is unlimited, so share away ๐Ÿฆ‹

Abstract ๐ŸŒธ

This memo defines a portion of the Management Information Base (MIB) for network management protocols in TCP/IP-based internets ๐Ÿ’œ It's specifically the part for managing the Open Shortest Path First Routing Protocol, so OSPF is the main character here ๐Ÿ‘‘

Table of Contents ๐Ÿ“š

   1. The SNMPv2 Network Management Framework ..............    2
   1.1 Object Definitions ..................................    3
   2. Overview .............................................    3
   2.1 Changes from RFC 1253 ...............................    3
   2.2 Textual Conventions .................................    6
   2.3 Structure of MIB ....................................    6
   2.3.1 General Variables .................................    6
   2.3.2 Area Data Structure and Area Stub Metric Table ....    7
   2.3.3 Link State Database and External Link State
         Database ..........................................    7
   2.3.4 Address Table and Host Tables .....................    7
   2.3.5 Interface and Interface Metric Tables .............    7
   2.3.6 Virtual Interface Table ...........................    7
   2.3.7 Neighbor and Virtual Neighbor Tables ..............    7
   2.4 Conceptual Row Creation .............................    7
   2.5 Default Configuration ...............................    8
   3. Definitions ..........................................   10
   3.1 OSPF General Variables ..............................   13
   3.2 OSPF Area Table .....................................   17
   3.3 OSPF Area Default Metrics ...........................   21
   3.4 OSPF Link State Database ............................   25
   3.5 OSPF Address Range Table ............................   27
   3.6 OSPF Host Table .....................................   29
   3.7 OSPF Interface Table ................................   32
   3.8 OSPF Interface Metrics ..............................   39
   3.9 OSPF Virtual Interface Table ........................   42
   3.10 OSPF Neighbor Table ................................   46
   3.11 OSPF Virtual Neighbor Table ........................   51
   3.12 OSPF External Link State Database ..................   54
   3.13 OSPF Route Table Use ...............................   57
   3.14 OSPF Area Aggregate Table ..........................   58
   4. OSPF Traps ...........................................   66
   4.1 Format Of Trap Definitions ..........................   67
   4.2 Approach ............................................   67
   4.3 Ignoring Initial Activity ...........................   67
   4.4 Throttling Traps ....................................   67
   4.5 One Trap Per OSPF Event .............................   68
   4.6 Polling Event Counters ..............................   68
   5. OSPF Trap Definitions ................................   69
   5.1 Trap Support Objects ................................   69
   5.2 Traps ...............................................   71
   6. Acknowledgements ......................................  78
   7. References ............................................  78
   8. Security Considerations ...............................  80
   9. Authors' Addresses ....................................  80

1. The SNMPv2 Network Management Framework โœจ

Okay so the SNMPv2 Network Management Framework is made of four major components ๐Ÿงš They are:

  • RFC 1441 which defines the SMI, the mechanisms used for describing and naming objects for the purpose of management.
  • STD 17, RFC 1213 defines MIB-II, the core set of managed objects for the Internet suite of protocols.
  • RFC 1445 which defines the administrative and other architectural aspects of the framework.
  • RFC 1448 which defines the protocol used for network access to managed objects.

The Framework also lets new objects be defined for experimentation and evaluation, which is giving "build your own" energy ๐Ÿ› ๏ธ

1.1. Object Definitions ๐Ÿ“

Managed objects get accessed through a virtual information store called the Management Information Base, or MIB ๐Ÿ’– Objects in the MIB are defined using the subset of Abstract Syntax Notation One (ASN.1) that's defined in the SMI. Each object type is named by an OBJECT IDENTIFIER, which is an administratively assigned name ๐ŸŽ€ The object type together with an object instance is what uniquely identifies one specific instantiation of the object. And for human convenience, we often use a textual string called the descriptor to refer to the object type ๐Ÿซถ

2. Overview ๐Ÿฆ‹

2.1. Changes from RFC 1253 ๐Ÿ’…

Okay, the changes from RFC 1253 are the following, and I'm obsessed with how detailed this list is ๐Ÿ˜ญ

(1) The textual convention PositiveInteger was changed from 1..'FFFFFFFF'h to 1..'7FFFFFFF'h at the request of Marshall Rose.

(2) The textual convention TOSType was changed to reflect the TOS values defined in the Router Requirements Draft, and in accordance with the IP Forwarding Table MIB's values.

(3) The names of some objects were changed, conforming to the convention that an acronym (for example, LSA) is a single word ("Lsa") in most SNMP names. Main character energy for acronyms ๐Ÿ‘‘

(4) Textual changes were made to make the MIB readable by Dave Perkins' SMIC MIB Compiler in addition to Mosy. This involved changing the case of some characters in certain names and removing the DEFVAL clauses for Counters.

(5) The variables ospfAreaStatus and ospfIfStatus were added, having been overlooked in the original MIB. Oops, but we fixed it ๐Ÿ™ˆ

(6) The range of the variable ospfLsdbType was extended to include multicastLink (Group-membership LSA) and nssaExternalLink (NSSA LSA).

(7) The variable ospfIfMetricMetric was renamed ospfIfMetricValue, and the following text was removed from its description:

"The value FFFF is distinguished to mean 'no route via this TOS'."

(8) The variable ospfNbmaNbrPermanence was added, with the values 'dynamic' and 'permanent'. By this means, dynamically learned and configured neighbors can be distinguished ๐Ÿ’œ

(9) The DESCRIPTION of the variable ospfNbrIpAddr was changed from

"The IP address of this neighbor."

to

"The IP address this neighbor is using in its IP Source Address. Note that, on addressless links, this will not be 0.0.0.0, but the address of another of the neighbor's interfaces."

This is by way of clarification and does not change the specification ๐Ÿง

(10) The OSPF External Link State Database was added. The OSPF Link State Database used to display all LSAs stored. In this MIB, it displays all but the AS External LSAs. This is because there are usually a large number of External LSAs, and they are replicated in all non-Stub Areas ๐ŸŒธ

(11) The variable ospfAreaSummary was added to control the import of summary LSAs into stub areas. If it is noAreaSummary (default), the router will neither originate nor propagate summary LSAs into the stub area. It will rely entirely on its default route. If it is sendAreaSummary, the router will both summarize and propagate summary LSAs โœจ

(12) The general variables ospfExtLsdbLimit and ExitOverflowInterval were introduced to help handle LSDB overflow. ๐Ÿ”ฅ

(13) The use of the IP Forwarding Table is defined.

(14) The ospfAreaRangeTable was obsoleted and replaced with the ospfAreaAggregateTable to accommodate two additional indexes. The ospfAreaAggregateEntry keys now include a LsdbType, which can be used to differentiate between the traditional type-3 Aggregates and NSSA Aggregates, and an ospfAreaAggregateMask, which will more clearly express the range ๐ŸŽ€

(15) The variable ospfAreaAggregateEffect was added. This permits the network manager to hide a subnet within an area. Secret subnet era ๐Ÿ™ˆ

(16) Normally, the border router of a stub area advertises a default route as an OSPF network summary. An NSSA border router will generate a type-7 LSA indicating a default route, and import it into the NSSA. ospfStubMetricType (ospf internal, type 1 external, or type 2 external) indicates the type of the default metric advertised ๐Ÿงš

(17) ospfMulticastExtensions is added to the OSPF General Group. This indicates the router's ability to forward IP multicast (Class D) datagrams ๐ŸŒˆ

(18) ospfIfMulticastForwarding is added to the Interface Group. It indicates whether, and if so, how, multicasts should be forwarded on the interface ๐Ÿฆ‹

(19) The MIB is converted to SNMP Version 2. Beyond simple text changes and the addition of the MODULE-IDENTITY and MODULE-COMPLIANCE macros, this involved trading the TruthValue Textual Convention for SNMP Version 2's, which has the same values, and trading the Validation Textual Convention for SNMP Version 2's RowStatus. Upgrade glow-up โœจ

(20) ospfAuthType (area authentication type) was changed to an interface authentication type to match the key. It also has an additional value, to indicate the use of MD5 for authentication ๐Ÿ”

(21) ospfIfIntfType has a new value, pointToMultipoint ๐Ÿ’œ

(22) ospfIfDemand (read/write) is added, to permit control of Demand OSPF features. ๐Ÿ’…

(23) ospfNbrHelloSuppressed and ospfVirtNbrHelloSuppressed were added (read only). They indicate whether Hellos are being suppressed to the neighbor ๐Ÿ™ˆ

(24) ospfDemandExtensions was added to indicate whether the Demand OSPF extensions have been implemented, and to disable them if appropriate. ๐Ÿ‘‘

2.2. Textual Conventions ๐Ÿซถ

Several new data types are introduced as textual conventions in this MIB document. These textual conventions make the specification easier to read and can make comparing it with other specifications easier too, if that's appropriate ๐Ÿ“ It should be noted that introducing these textual conventions has no effect on either the syntax or the semantics of any managed objects. Using them is just an artifact of the explanatory method. Objects defined in terms of one of these methods are always encoded by means of the rules that define the primitive type. So no changes to the SMI or the SNMP are needed to accommodate these textual conventions, which are adopted merely for the convenience of readers and writers in pursuit of the elusive goal of clear, concise, and unambiguous MIB documents ๐Ÿง โœจ

The new data types are AreaID, RouterID, TOSType, Metric, BigMetric, Status, PositiveInteger, HelloRange, UpToMaxAge, InterfaceIndex, and DesignatedRouterPriority ๐ŸŒธ

2.3. Structure of MIB ๐Ÿงš

okay so the MIB is split into these sections, bestie ๐Ÿ’–

  • General Variables
  • Area Data Structure
  • Area Stub Metric Table
  • Link State Database
  • Address Range Table
  • Host Table
  • Interface Table
  • Interface Metric Table
  • Virtual Interface Table
  • Neighbor Table
  • Virtual Neighbor Table
  • External Link State Database
  • Aggregate Range Table

there's also a separate MIB for notifications ("traps") and it's entirely optional ๐Ÿ””

2.3.1. General Variables ๐ŸŒธ

the General Variables are exactly what they sound like! they're global to the OSPF Process, so they apply to the whole thing ๐Ÿ‘‘

2.3.2. Area Data Structure and Area Stub Metric Table ๐Ÿฆ‹

the Area Data Structure describes the OSPF Areas that the router takes part in. the Area Stub Metric Table describes the metrics advertised into a stub area by the default router(s) โœจ

the Link State Database is there mainly to give you detailed info for network debugging. literally the "why is my network acting up" table ๐Ÿ™ˆ

2.3.4. Address Table and Host Tables ๐Ÿ 

the Address Range Table and the Host Table exist so you can look at configured Network Summary and Host Route info ๐Ÿ’…

2.3.5. Interface and Interface Metric Tables ๐ŸŽ€

the Interface Table and the Interface Metric Table work together to describe the various IP interfaces to OSPF. the metrics get their own tables so that dealing with multiple types of service is simpler, and so there's room to adjust things if the IP TOS definition ever changes in the future ๐Ÿ”ฎ. there's a Default Value specification for the TOS 0 (default) metric too, so you're not starting from nothing ๐Ÿซถ

2.3.6. Virtual Interface Table ๐ŸŒˆ

same energy here: the Virtual Interface Table describes virtual links to the OSPF Process ๐Ÿงƒ

2.3.7. Neighbor and Virtual Neighbor Tables ๐Ÿซ‚

the Neighbor Table and the Virtual Neighbor Table describe the neighbors to the OSPF Process. bestie, it's a whole social network for routers ๐Ÿ˜ญ๐ŸŒธ

2.4. Conceptual Row Creation ๐Ÿ› ๏ธ

okay this one is kinda spicy, so pay attention โœจ

for row-creation in "conceptual" (see [9]) tables, the definitions in section 3 include DEFVAL (Default Value) clauses. these suggest values an agent should use for instances of variables that need to be created because of a Set-Request, but that the Set-Request doesn't specify ๐ŸŒŸ

DEFVAL clauses haven't been given for some read-only objects, which means they're zeroed when the row gets created. those objects are of SYNTAX Counter32 or Gauge32 ๐Ÿ”ข

for the objects that don't have a DEFVAL clause, both management stations and agents should heed the Robustness Principle of the Internet (see RFC-791) ๐Ÿซถ:

"be liberal in what you accept, conservative in what you send"

so the vibe is: management stations should include as many of these columnar objects as they can (for example, all the read-write objects) in a Set-Request when they create a conceptual row ๐ŸŽ€. agents should accept a Set-Request with as few of these as they actually need. the minimum for a row-creating SET is the set of objects that can't be intuited, so for them no default is specified ๐Ÿ’…

there are a bunch of read-write objects in this MIB, because it's built for SNMP management of the protocol and not only SNMP monitoring of its state ๐Ÿ“. still, without a standard SNMP Security architecture, it's acceptable for implementations to make these read-only and offer a different interface for changing them ๐Ÿ”

2.5. Default Configuration ๐ŸŒท

OSPF is a seriously powerful routing protocol ๐Ÿ’ช. it comes with features that can handle basically any configuration requirement you could reasonably have inside an Autonomous System. with that power comes a lot of complexity, which you can tell from how many objects the MIB has ๐Ÿ™ˆ

so when this MIB was built, a lot of care went into giving default values to basically every object, so the typical case needs as little setup as possible โœจ. here's the default configuration:

Given the following assumptions:

  • IP has already been configured
  • The ifTable has already been configured
  • ifSpeed is estimated by the interface drivers
  • The OSPF Process automatically discovers all IP Interfaces and creates corresponding OSPF Interfaces
  • The TOS 0 metrics are autonomously derived from ifSpeed
  • The OSPF Process automatically creates the Areas required for the Interfaces

the simplest configuration of an OSPF process requires that:

  • The OSPF Process be Enabled.

and this can be done with a single SET ๐Ÿช„:

ospfAdminStat := enabled.

the configured system will then have these attributes ๐Ÿง:

  • The RouterID will be one of the IP addresses of the device
  • The device will be neither an Area Border Router nor an Autonomous System Border Router.
  • Every IP Interface, with or without an address, will be an OSPF Interface.
  • The AreaID of each interface will be 0.0.0.0, the Backbone.
  • Authentication will be disabled
  • All Broadcast and Point to Point interfaces will be operational. NBMA Interfaces require the configuration of at least one neighbor.
  • Timers on all direct interfaces will be:
Hello Interval:        10 seconds
Dead Timeout:          40 Seconds
Retransmission:         5 Seconds
Transit Delay:          1 Second
Poll Interval:        120 Seconds
  • no direct links to hosts will be configured.
  • no addresses will be summarized
  • Metrics, being a measure of bit duration, are unambiguous and intelligent.
  • No Virtual Links will be configured.

3. Definitions ๐Ÿ’œ

the MIB definitions themselves are next, so grab a snack ๐Ÿฟ

OSPF-MIB DEFINITIONS ::= BEGIN

    IMPORTS
            MODULE-IDENTITY, OBJECT-TYPE, Counter32, Gauge32,
            Integer32, IpAddress
                FROM SNMPv2-SMI
            TEXTUAL-CONVENTION, TruthValue, RowStatus
                FROM SNMPv2-TC
            MODULE-COMPLIANCE, OBJECT-GROUP          FROM SNMPv2-CONF
            mib-2                                    FROM RFC1213-MIB;

--  This MIB module uses the extended OBJECT-TYPE macro as
--  defined in [9].

ospf MODULE-IDENTITY
        LAST-UPDATED "9501201225Z" -- Fri Jan 20 12:25:50 PST 1995
        ORGANIZATION "IETF OSPF Working Group"
        CONTACT-INFO
       "       Fred Baker
       Postal: Cisco Systems
               519 Lado Drive
               Santa Barbara, California 93111
       Tel:    +1 805 681 0115
       E-Mail: fred@cisco.com

               Rob Coltun
       Postal: RainbowBridge Communications
       Tel:    (301) 340-9416
       E-Mail: rcoltun@rainbow-bridge.com"
    DESCRIPTION
       "The MIB module to describe the OSPF Version 2
       Protocol"
    ::= { mib-2 14 }

--  The Area ID, in OSPF, has the same format as an IP Address,
--  but has the function of defining a summarization point for
--  Link State Advertisements

AreaID ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
       "An OSPF Area Identifier."
    SYNTAX      IpAddress


--  The Router ID, in OSPF, has the same format as an IP Address,
--  but identifies the router independent of its IP Address.

RouterID ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
       "A OSPF Router Identifier."
    SYNTAX      IpAddress


--  The OSPF Metric is defined as an unsigned value in the range

Metric ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
       "The OSPF Internal Metric."
    SYNTAX      Integer32 (0..'FFFF'h)

BigMetric ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
       "The OSPF External Metric."
    SYNTAX      Integer32 (0..'FFFFFF'h)

--  Status Values

Status ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
       "The status of an interface: 'enabled' indicates that
       it is willing to communicate with other OSPF Routers,
       while 'disabled' indicates that it is not."
    SYNTAX      INTEGER { enabled (1), disabled (2) }

--  Time Durations measured in seconds

PositiveInteger ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
       "A positive integer. Values in excess are precluded as
       unnecessary and prone to interoperability issues."
    SYNTAX      Integer32 (0..'7FFFFFFF'h)

HelloRange ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
       "The range of intervals on which hello messages are
       exchanged."
    SYNTAX      Integer32 (1..'FFFF'h)

UpToMaxAge ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
       "The values that one might find or configure for
       variables bounded by the maximum age of an LSA."
    SYNTAX      Integer32 (0..3600)


--  The range of ifIndex

InterfaceIndex ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
       "The range of ifIndex."
    SYNTAX      Integer32


--  Potential Priorities for the Designated Router Election

DesignatedRouterPriority ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
       "The values defined for the priority of a system for
       becoming the designated router."
    SYNTAX      Integer32 (0..'FF'h)

TOSType ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
       "Type of Service is defined as a mapping to the IP Type of
       Service Flags as defined in the IP Forwarding Table MIB

       +-----+-----+-----+-----+-----+-----+-----+-----+
       |                 |                       |     |
       |   PRECEDENCE    |    TYPE OF SERVICE    |  0  |
       |                 |                       |     |
       +-----+-----+-----+-----+-----+-----+-----+-----+

                IP TOS                IP TOS
           Field     Policy      Field     Policy

           Contents    Code      Contents    Code
           0 0 0 0  ==>   0      0 0 0 1  ==>   2
           0 0 1 0  ==>   4      0 0 1 1  ==>   6
           0 1 0 0  ==>   8      0 1 0 1  ==>  10
           0 1 1 0  ==>  12      0 1 1 1  ==>  14
           1 0 0 0  ==>  16      1 0 0 1  ==>  18
           1 0 1 0  ==>  20      1 0 1 1  ==>  22
           1 1 0 0  ==>  24      1 1 0 1  ==>  26
           1 1 1 0  ==>  28      1 1 1 1  ==>  30

       The remaining values are left for future definition."
    SYNTAX      Integer32 (0..30)


--  OSPF General Variables

--      These parameters apply globally to the Router's
--      OSPF Process.

Okay bestie, the general group is where the router keeps its main settings ๐Ÿ’…โœจ Everything hangs off ospfGeneralGroup, which sits at { ospf 1 }.

ospfGeneralGroup OBJECT IDENTIFIER ::= { ospf 1 }


    ospfRouterId OBJECT-TYPE
        SYNTAX   RouterID
        MAX-ACCESS   read-write
        STATUS   current
        DESCRIPTION
           "A  32-bit  integer  uniquely  identifying  the
           router in the Autonomous System.

           By  convention,  to  ensure  uniqueness,   this
           should  default  to  the  value  of  one of the
           router's IP interface addresses."
       REFERENCE
          "OSPF Version 2, C.1 Global parameters"
      ::= { ospfGeneralGroup 1 }


    ospfAdminStat OBJECT-TYPE
        SYNTAX   Status
        MAX-ACCESS   read-write
        STATUS   current
        DESCRIPTION
           "The  administrative  status  of  OSPF  in  the
           router.   The  value 'enabled' denotes that the
           OSPF Process is active on at least  one  inter-
           face;  'disabled'  disables  it  on  all inter-
           faces."
       ::= { ospfGeneralGroup 2 }

    ospfVersionNumber OBJECT-TYPE
        SYNTAX   INTEGER    { version2 (2) }
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION

           "The current version number of the OSPF  proto-
           col is 2."
       REFERENCE
          "OSPF Version 2, Title"
      ::= { ospfGeneralGroup 3 }


    ospfAreaBdrRtrStatus OBJECT-TYPE
        SYNTAX   TruthValue
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "A flag to note whether this router is an  area
           border router."
       REFERENCE
          "OSPF Version 2, Section 3 Splitting the AS into
          Areas"
      ::= { ospfGeneralGroup 4 }


    ospfASBdrRtrStatus OBJECT-TYPE
        SYNTAX   TruthValue
        MAX-ACCESS   read-write
        STATUS   current
        DESCRIPTION
           "A flag to note whether this router is  config-
           ured as an Autonomous System border router."
       REFERENCE
          "OSPF Version 2, Section 3.3  Classification  of
          routers"
      ::= { ospfGeneralGroup 5 }

    ospfExternLsaCount OBJECT-TYPE
        SYNTAX   Gauge32
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The number of external (LS type 5)  link-state
           advertisements in the link-state database."
       REFERENCE
          "OSPF Version 2, Appendix A.4.5 AS external link
          advertisements"
      ::= { ospfGeneralGroup 6 }


    ospfExternLsaCksumSum OBJECT-TYPE
        SYNTAX   Integer32
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The 32-bit unsigned sum of the LS checksums of
           the  external  link-state  advertisements  con-
           tained in the link-state  database.   This  sum
           can  be  used  to determine if there has been a
           change in a router's link state  database,  and
           to  compare  the  link-state  database  of  two
           routers."
       ::= { ospfGeneralGroup 7 }


    ospfTOSSupport OBJECT-TYPE
        SYNTAX   TruthValue
        MAX-ACCESS   read-write
        STATUS   current
        DESCRIPTION
           "The router's support for type-of-service rout-
           ing."
       REFERENCE
          "OSPF Version 2,  Appendix  F.1.2  Optional  TOS
          support"
      ::= { ospfGeneralGroup 8 }

    ospfOriginateNewLsas OBJECT-TYPE
        SYNTAX   Counter32
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The number of  new  link-state  advertisements
           that  have been originated.  This number is in-
           cremented each time the router originates a new
           LSA."
       ::= { ospfGeneralGroup 9 }


    ospfRxNewLsas OBJECT-TYPE
        SYNTAX   Counter32
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The number of  link-state  advertisements  re-
           ceived  determined  to  be  new instantiations.
           This number does not include  newer  instantia-
           tions  of self-originated link-state advertise-
           ments."
       ::= { ospfGeneralGroup 10 }

    ospfExtLsdbLimit OBJECT-TYPE
        SYNTAX   Integer32 (-1..'7FFFFFFF'h)
        MAX-ACCESS   read-write
        STATUS   current
        DESCRIPTION
           "The  maximum   number   of   non-default   AS-
           external-LSAs entries that can be stored in the
           link-state database.  If the value is -1,  then
           there is no limit.

           When the number of non-default AS-external-LSAs
           in   a  router's  link-state  database  reaches
           ospfExtLsdbLimit, the router  enters  Overflow-
           State.   The   router  never  holds  more  than
           ospfExtLsdbLimit  non-default  AS-external-LSAs
           in  its  database. OspfExtLsdbLimit MUST be set
           identically in all routers attached to the OSPF
           backbone  and/or  any regular OSPF area. (i.e.,
           OSPF stub areas and NSSAs are excluded)."
       DEFVAL { -1 }
       ::= { ospfGeneralGroup 11 }

    ospfMulticastExtensions OBJECT-TYPE
        SYNTAX   Integer32
        MAX-ACCESS   read-write
        STATUS   current
        DESCRIPTION
           "A Bit Mask indicating whether  the  router  is
           forwarding  IP  multicast  (Class  D) datagrams
           based on the algorithms defined in  the  Multi-
           cast Extensions to OSPF.

           Bit 0, if set, indicates that  the  router  can
           forward  IP multicast datagrams in the router's
           directly attached areas (called intra-area mul-
           ticast routing).

           Bit 1, if set, indicates that  the  router  can
           forward  IP  multicast  datagrams  between OSPF
           areas (called inter-area multicast routing).

           Bit 2, if set, indicates that  the  router  can
           forward  IP  multicast  datagrams between Auto-
           nomous Systems (called inter-AS multicast rout-
           ing).

           Only certain combinations of bit  settings  are
           allowed,  namely: 0 (no multicast forwarding is
           enabled), 1 (intra-area multicasting  only),  3
           (intra-area  and  inter-area  multicasting),  5
           (intra-area and inter-AS  multicasting)  and  7
           (multicasting  everywhere). By default, no mul-
           ticast forwarding is enabled."
       DEFVAL { 0 }
       ::= { ospfGeneralGroup 12 }

    ospfExitOverflowInterval OBJECT-TYPE
        SYNTAX   PositiveInteger
        MAX-ACCESS   read-write
        STATUS   current
        DESCRIPTION
           "The number of  seconds  that,  after  entering
           OverflowState,  a  router will attempt to leave
           OverflowState. This allows the router to  again
           originate  non-default  AS-external-LSAs.  When
           set to 0, the router will not  leave  Overflow-
           State until restarted."
       DEFVAL { 0 }
       ::= { ospfGeneralGroup 13 }


    ospfDemandExtensions OBJECT-TYPE
        SYNTAX   TruthValue
        MAX-ACCESS   read-write
        STATUS   current
        DESCRIPTION
           "The router's support for demand routing."
       REFERENCE
          "OSPF Version 2, Appendix on Demand Routing"
      ::= { ospfGeneralGroup 14 }


--      The OSPF Area Data Structure contains information
--      regarding the various areas. The interfaces and
--      virtual links are configured as part of these areas.
--      Area 0.0.0.0, by definition, is the Backbone Area


    ospfAreaTable OBJECT-TYPE
        SYNTAX   SEQUENCE OF OspfAreaEntry
        MAX-ACCESS   not-accessible
        STATUS   current
        DESCRIPTION
           "Information describing the configured  parame-
           ters  and  cumulative  statistics of the router's
           attached areas."

       REFERENCE
          "OSPF Version 2, Section 6  The Area Data Struc-
          ture"
      ::= { ospf 2 }


    ospfAreaEntry OBJECT-TYPE
        SYNTAX   OspfAreaEntry
        MAX-ACCESS   not-accessible
        STATUS   current
        DESCRIPTION
           "Information describing the configured  parame-
           ters  and  cumulative  statistics of one of the
           router's attached areas."
       INDEX { ospfAreaId }
       ::= { ospfAreaTable 1 }

Ngl the general group is a whole vibe ๐ŸŽ€ ospfRouterId is the router's 32-bit ID and it's read-write, and the description says it should default to one of the router's IP interface addresses for uniqueness ๐Ÿฆ‹ ospfAdminStat flips the whole process on or off across interfaces, and ospfExtLsdbLimit is the cap on non-default AS-external-LSAs (with -1 meaning no limit at all) ๐Ÿ’œ

The counters are giving read-only drama ๐Ÿ“Š ospfExternLsaCount, ospfOriginateNewLsas and ospfRxNewLsas track LSAs, and ospfExternLsaCksumSum is the 32-bit unsigned sum of the external LS checksums, which is how you can tell if a database changed or compare two routers ๐ŸŒธ

And the area table is where the fun gets organised ๐Ÿงš ospfAreaTable is indexed by ospfAreaId, and each ospfAreaEntry describes one of the router's attached areas. Area 0.0.0.0 is the Backbone Area, no debate ๐Ÿ‘‘

OspfAreaEntry ::= SEQUENCE { ospfAreaId AreaID, ospfAuthType Integer32, ospfImportAsExtern INTEGER, ospfSpfRuns Counter32, ospfAreaBdrRtrCount Gauge32, ospfAsBdrRtrCount Gauge32, ospfAreaLsaCount Gauge32, ospfAreaLsaCksumSum Integer32, ospfAreaSummary INTEGER, ospfAreaStatus RowStatus }

ospfAreaId OBJECT-TYPE SYNTAX AreaID MAX-ACCESS read-only STATUS current DESCRIPTION "A 32-bit integer uniquely identifying an area. Area ID 0.0.0.0 is used for the OSPF backbone."

REFERENCE "OSPF Version 2, Appendix C.2 Area parameters" ::= { ospfAreaEntry 1 }

ospfAuthType OBJECT-TYPE SYNTAX Integer32 -- none (0), -- simplePassword (1) -- md5 (2) -- reserved for specification by IANA (> 2) MAX-ACCESS read-create STATUS obsolete DESCRIPTION "The authentication type specified for an area. Additional authentication types may be assigned locally on a per Area basis." REFERENCE "OSPF Version 2, Appendix E Authentication" DEFVAL { 0 } -- no authentication, by default ::= { ospfAreaEntry 2 }

ospfImportAsExtern OBJECT-TYPE SYNTAX INTEGER { importExternal (1), importNoExternal (2), importNssa (3) } MAX-ACCESS read-create STATUS current DESCRIPTION "The area's support for importing AS external link- state advertisements." REFERENCE "OSPF Version 2, Appendix C.2 Area parameters" DEFVAL { importExternal } ::= { ospfAreaEntry 3 }

ospfSpfRuns OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only STATUS current DESCRIPTION "The number of times that the intra-area route table has been calculated using this area's link-state database. This is typically done using Dijkstra's algorithm."

::= { ospfAreaEntry 4 }

ospfAreaBdrRtrCount OBJECT-TYPE SYNTAX Gauge32 MAX-ACCESS read-only STATUS current DESCRIPTION "The total number of area border routers reach- able within this area. This is initially zero, and is calculated in each SPF Pass." ::= { ospfAreaEntry 5 }

ospfAsBdrRtrCount OBJECT-TYPE SYNTAX Gauge32 MAX-ACCESS read-only STATUS current DESCRIPTION "The total number of Autonomous System border routers reachable within this area. This is initially zero, and is calculated in each SPF Pass." ::= { ospfAreaEntry 6 }

ospfAreaLsaCount OBJECT-TYPE SYNTAX Gauge32 MAX-ACCESS read-only STATUS current DESCRIPTION "The total number of link-state advertisements in this area's link-state database, excluding AS External LSA's." ::= { ospfAreaEntry 7 }

ospfAreaLsaCksumSum OBJECT-TYPE SYNTAX Integer32 MAX-ACCESS read-only STATUS current DESCRIPTION "The 32-bit unsigned sum of the link-state ad- vertisements' LS checksums contained in this area's link-state database. This sum excludes external (LS type 5) link-state advertisements. The sum can be used to determine if there has been a change in a router's link state data- base, and to compare the link-state database of two routers." DEFVAL { 0 } ::= { ospfAreaEntry 8 }

ospfAreaSummary OBJECT-TYPE SYNTAX INTEGER { noAreaSummary (1), sendAreaSummary (2) } MAX-ACCESS read-create STATUS current DESCRIPTION "The variable ospfAreaSummary controls the im- port of summary LSAs into stub areas. It has no effect on other areas.

If it is noAreaSummary, the router will neither originate nor propagate summary LSAs into the stub area. It will rely entirely on its de- fault route.

If it is sendAreaSummary, the router will both summarize and propagate summary LSAs." DEFVAL { noAreaSummary } ::= { ospfAreaEntry 9 }

ospfAreaStatus OBJECT-TYPE SYNTAX RowStatus MAX-ACCESS read-create STATUS current DESCRIPTION "This variable displays the status of the en- try. Setting it to 'invalid' has the effect of rendering it inoperative. The internal effect (row removal) is implementation dependent." ::= { ospfAreaEntry 10 }

-- OSPF Area Default Metric Table

-- The OSPF Area Default Metric Table describes the metrics -- that a default Area Border Router will advertise into a -- Stub area.

ospfStubAreaTable OBJECT-TYPE SYNTAX SEQUENCE OF OspfStubAreaEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "The set of metrics that will be advertised by a default Area Border Router into a stub area." REFERENCE "OSPF Version 2, Appendix C.2, Area Parameters" ::= { ospf 3 }

ospfStubAreaEntry OBJECT-TYPE SYNTAX OspfStubAreaEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "The metric for a given Type of Service that will be advertised by a default Area Border Router into a stub area." REFERENCE "OSPF Version 2, Appendix C.2, Area Parameters" INDEX { ospfStubAreaId, ospfStubTOS } ::= { ospfStubAreaTable 1 }

OspfStubAreaEntry ::= SEQUENCE { ospfStubAreaId AreaID, ospfStubTOS TOSType, ospfStubMetric BigMetric, ospfStubStatus RowStatus, ospfStubMetricType INTEGER }

ospfStubAreaId OBJECT-TYPE SYNTAX AreaID MAX-ACCESS read-only STATUS current DESCRIPTION "The 32 bit identifier for the Stub Area. On creation, this can be derived from the in- stance." ::= { ospfStubAreaEntry 1 }

ospfStubTOS OBJECT-TYPE SYNTAX TOSType MAX-ACCESS read-only STATUS current DESCRIPTION "The Type of Service associated with the metric. On creation, this can be derived from the instance." ::= { ospfStubAreaEntry 2 }

ospfStubMetric OBJECT-TYPE SYNTAX BigMetric MAX-ACCESS read-create STATUS current DESCRIPTION "The metric value applied at the indicated type of service. By default, this equals the least metric at the type of service among the inter- faces to other areas." ::= { ospfStubAreaEntry 3 }

ospfStubStatus OBJECT-TYPE SYNTAX RowStatus MAX-ACCESS read-create STATUS current DESCRIPTION "This variable displays the status of the en- try. Setting it to 'invalid' has the effect of rendering it inoperative. The internal effect (row removal) is implementation dependent." ::= { ospfStubAreaEntry 4 }

ospfStubMetricType OBJECT-TYPE SYNTAX INTEGER { ospfMetric (1), -- OSPF Metric comparableCost (2), -- external type 1 nonComparable (3) -- external type 2 } MAX-ACCESS read-create STATUS current DESCRIPTION "This variable displays the type of metric ad- vertised as a default route." DEFVAL { ospfMetric } ::= { ospfStubAreaEntry 5 }

-- OSPF Link State Database

-- The Link State Database contains the Link State -- Advertisements from throughout the areas that the -- device is attached to.

ospfLsdbTable OBJECT-TYPE SYNTAX SEQUENCE OF OspfLsdbEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "The OSPF Process's Link State Database." REFERENCE "OSPF Version 2, Section 12 Link State Adver- tisements" ::= { ospf 4 }

ospfLsdbEntry OBJECT-TYPE SYNTAX OspfLsdbEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "A single Link State Advertisement." INDEX { ospfLsdbAreaId, ospfLsdbType, ospfLsdbLsid, ospfLsdbRouterId } ::= { ospfLsdbTable 1 }

OspfLsdbEntry ::= SEQUENCE { ospfLsdbAreaId AreaID, ospfLsdbType INTEGER, ospfLsdbLsid IpAddress, ospfLsdbRouterId RouterID, ospfLsdbSequence Integer32, ospfLsdbAge Integer32, ospfLsdbChecksum Integer32, ospfLsdbAdvertisement OCTET STRING }

ospfLsdbAreaId OBJECT-TYPE SYNTAX AreaID MAX-ACCESS read-only STATUS current DESCRIPTION "The 32 bit identifier of the Area from which the LSA was received." REFERENCE "OSPF Version 2, Appendix C.2 Area parameters" ::= { ospfLsdbEntry 1 }

-- External Link State Advertisements are permitted -- for backward compatibility, but should be displayed in -- the ospfExtLsdbTable rather than here.

ospfLsdbType OBJECT-TYPE SYNTAX INTEGER { routerLink (1), networkLink (2), summaryLink (3), asSummaryLink (4), asExternalLink (5), -- but see ospfExtLsdbTable multicastLink (6), nssaExternalLink (7) } MAX-ACCESS read-only STATUS current DESCRIPTION "The type of the link state advertisement. Each link state type has a separate advertise- ment format." REFERENCE "OSPF Version 2, Appendix A.4.1 The Link State Advertisement header" ::= { ospfLsdbEntry 2 }

ospfLsdbLsid OBJECT-TYPE SYNTAX IpAddress MAX-ACCESS read-only STATUS current DESCRIPTION "The Link State ID is an LS Type Specific field containing either a Router ID or an IP Address; it identifies the piece of the routing domain that is being described by the advertisement." REFERENCE "OSPF Version 2, Section 12.1.4 Link State ID" ::= { ospfLsdbEntry 3 }

ospfLsdbRouterId OBJECT-TYPE SYNTAX RouterID MAX-ACCESS read-only STATUS current DESCRIPTION "The 32 bit number that uniquely identifies the originating router in the Autonomous System." REFERENCE "OSPF Version 2, Appendix C.1 Global parameters" ::= { ospfLsdbEntry 4 }

-- Note that the OSPF Sequence Number is a 32 bit signed -- integer. It starts with the value '80000001'h, -- or -'7FFFFFFF'h, and increments until '7FFFFFFF'h

Okay so the sequence number thing is about to get wild ๐Ÿ’… Here's how the link state stuff keeps track of which advertisement is newest ๐Ÿซถ

--  Thus, a typical sequence number will be very negative.

    ospfLsdbSequence OBJECT-TYPE
        SYNTAX   Integer32
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The sequence number field is a  signed  32-bit
           integer.   It  is used to detect old and dupli-
           cate link state advertisements.  The  space  of
           sequence  numbers  is  linearly  ordered.   The
           larger the sequence number the more recent  the
           advertisement."
       REFERENCE
          "OSPF Version 2,  Section  12.1.6  LS  sequence
          number"
      ::= { ospfLsdbEntry 5 }


    ospfLsdbAge OBJECT-TYPE
        SYNTAX   Integer32    -- Should be 0..MaxAge
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "This field is the age of the link state adver-
           tisement in seconds."
       REFERENCE
          "OSPF Version 2, Section 12.1.1 LS age"
      ::= { ospfLsdbEntry 6 }

    ospfLsdbChecksum OBJECT-TYPE
        SYNTAX   Integer32
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "This field is the  checksum  of  the  complete
           contents  of  the  advertisement, excepting the
           age field.  The age field is excepted  so  that
           an   advertisement's  age  can  be  incremented
           without updating the  checksum.   The  checksum
           used  is  the same that is used for ISO connec-
           tionless datagrams; it is commonly referred  to
           as the Fletcher checksum."
       REFERENCE
          "OSPF Version 2, Section 12.1.7 LS checksum"
      ::= { ospfLsdbEntry 7 }


    ospfLsdbAdvertisement OBJECT-TYPE
        SYNTAX   OCTET STRING (SIZE (1..65535))
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The entire Link State Advertisement, including
           its header."
       REFERENCE
          "OSPF Version 2, Section 12  Link  State  Adver-
          tisements"
      ::= { ospfLsdbEntry 8 }

OSPF Address Range Table ๐ŸŽ€

The Address Range Table is basically the sidekick of the Area Table ๐Ÿฆ‹ It describes the address range summaries that get propagated out of an area, so less info about that area leaks past its borders. Lowkey genius.

--  Address Range Table

--      The Address Range Table acts as an adjunct to the Area
--      Table; It describes those Address Range Summaries that
--      are configured to be propagated from an Area to reduce
--      the amount of information about it which is known beyond
--      its borders.

    ospfAreaRangeTable OBJECT-TYPE
        SYNTAX   SEQUENCE OF OspfAreaRangeEntry
        MAX-ACCESS   not-accessible
        STATUS   obsolete
        DESCRIPTION
           "A range if IP addresses  specified  by  an  IP
           address/IP  network  mask  pair.   For example,
           class B address range of X.X.X.X with a network
           mask  of  255.255.0.0 includes all IP addresses
           from X.X.0.0 to X.X.255.255"
       REFERENCE
          "OSPF Version 2, Appendix C.2  Area parameters"
      ::= { ospf 5 }

    ospfAreaRangeEntry OBJECT-TYPE
        SYNTAX   OspfAreaRangeEntry
        MAX-ACCESS   not-accessible
        STATUS   obsolete
        DESCRIPTION
           "A range if IP addresses  specified  by  an  IP
           address/IP  network  mask  pair.   For example,
           class B address range of X.X.X.X with a network
           mask  of  255.255.0.0 includes all IP addresses
           from X.X.0.0 to X.X.255.255"
       REFERENCE
          "OSPF Version 2, Appendix C.2  Area parameters"
      INDEX { ospfAreaRangeAreaId, ospfAreaRangeNet }
      ::= { ospfAreaRangeTable 1 }

OspfAreaRangeEntry ::=
    SEQUENCE {
        ospfAreaRangeAreaId
            AreaID,
        ospfAreaRangeNet
            IpAddress,
        ospfAreaRangeMask
            IpAddress,
        ospfAreaRangeStatus
            RowStatus,
        ospfAreaRangeEffect
            INTEGER
              }

    ospfAreaRangeAreaId OBJECT-TYPE
        SYNTAX   AreaID
        MAX-ACCESS   read-only
        STATUS   obsolete
        DESCRIPTION
           "The Area the Address  Range  is  to  be  found
           within."
       REFERENCE
          "OSPF Version 2, Appendix C.2 Area parameters"
      ::= { ospfAreaRangeEntry 1 }


    ospfAreaRangeNet OBJECT-TYPE
        SYNTAX   IpAddress
        MAX-ACCESS   read-only
        STATUS   obsolete
        DESCRIPTION
           "The IP Address of the Net or Subnet  indicated
           by the range."

       REFERENCE
          "OSPF Version 2, Appendix C.2 Area parameters"
      ::= { ospfAreaRangeEntry 2 }


    ospfAreaRangeMask OBJECT-TYPE
        SYNTAX   IpAddress
        MAX-ACCESS   read-create
        STATUS   obsolete
        DESCRIPTION
           "The Subnet Mask that pertains to  the  Net  or
           Subnet."
       REFERENCE
          "OSPF Version 2, Appendix C.2 Area parameters"
      ::= { ospfAreaRangeEntry 3 }

    ospfAreaRangeStatus OBJECT-TYPE
        SYNTAX   RowStatus
        MAX-ACCESS   read-create
        STATUS   obsolete
        DESCRIPTION
           "This variable displays the status of  the  en-
           try.  Setting it to 'invalid' has the effect of
           rendering it inoperative.  The internal  effect
           (row removal) is implementation dependent."
       ::= { ospfAreaRangeEntry 4 }


    ospfAreaRangeEffect OBJECT-TYPE
        SYNTAX   INTEGER    {
                    advertiseMatching (1),
                    doNotAdvertiseMatching (2)
                  }
        MAX-ACCESS   read-create
        STATUS   obsolete
        DESCRIPTION
           "Subnets subsumed by ranges either trigger  the
           advertisement  of the indicated summary (adver-
           tiseMatching), or result in  the  subnet's  not
           being advertised at all outside the area."
       DEFVAL   { advertiseMatching }
       ::= { ospfAreaRangeEntry 5 }

OSPF Host Table ๐Ÿงš

The Host Table is where the router keeps track of which hosts are directly attached to it, plus what metrics and types of service should be advertised for them ๐Ÿ’œ

--  OSPF Host Table

--      The Host/Metric Table indicates what hosts are directly
--      attached to the Router, and what metrics and types of
--      service should be advertised for them.

    ospfHostTable OBJECT-TYPE
        SYNTAX   SEQUENCE OF OspfHostEntry
        MAX-ACCESS   not-accessible
        STATUS   current
        DESCRIPTION
           "The list of Hosts, and their metrics, that the
           router will advertise as host routes."
       REFERENCE
          "OSPF Version 2, Appendix C.6  Host route param-
          eters"
      ::= { ospf 6 }


    ospfHostEntry OBJECT-TYPE
        SYNTAX   OspfHostEntry
        MAX-ACCESS   not-accessible
        STATUS   current
        DESCRIPTION
           "A metric to be advertised, for a given type of
           service, when a given host is reachable."
       INDEX { ospfHostIpAddress, ospfHostTOS }
       ::= { ospfHostTable 1 }

OspfHostEntry ::=
    SEQUENCE {
        ospfHostIpAddress
            IpAddress,
        ospfHostTOS
            TOSType,
        ospfHostMetric
            Metric,
        ospfHostStatus
            RowStatus,
        ospfHostAreaID
            AreaID
              }

    ospfHostIpAddress OBJECT-TYPE
        SYNTAX   IpAddress
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The IP Address of the Host."
       REFERENCE
          "OSPF Version 2, Appendix C.6 Host route parame-
          ters"
      ::= { ospfHostEntry 1 }


    ospfHostTOS OBJECT-TYPE
        SYNTAX   TOSType
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The Type of Service of the route being config-
           ured."
       REFERENCE
          "OSPF Version 2, Appendix C.6 Host route parame-
          ters"
      ::= { ospfHostEntry 2 }


    ospfHostMetric OBJECT-TYPE
        SYNTAX   Metric
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "The Metric to be advertised."
       REFERENCE
          "OSPF Version 2, Appendix C.6 Host route parame-
          ters"
      ::= { ospfHostEntry 3 }

    ospfHostStatus OBJECT-TYPE
        SYNTAX   RowStatus
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "This variable displays the status of  the  en-
           try.  Setting it to 'invalid' has the effect of
           rendering it inoperative.  The internal  effect
           (row removal) is implementation dependent."
       ::= { ospfHostEntry 4 }


    ospfHostAreaID OBJECT-TYPE
        SYNTAX   AreaID
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The Area the Host Entry is to be found within.
           By  default, the area that a subsuming OSPF in-
           terface is in, or 0.0.0.0"

       REFERENCE
          "OSPF Version 2, Appendix C.2 Area parameters"
      ::= { ospfHostEntry 5 }

OSPF Interface Table ๐ŸŒธ

The Interface Table is the OSPF point of view on each interface, basically augmenting the ipAddrTable with OSPF-specific info ๐Ÿ“ Here's where it starts.

--  OSPF Interface Table

--      The OSPF Interface Table augments the ipAddrTable
--             with OSPF specific information.

    ospfIfTable OBJECT-TYPE
        SYNTAX   SEQUENCE OF OspfIfEntry
        MAX-ACCESS   not-accessible
        STATUS   current
        DESCRIPTION
           "The OSPF Interface Table describes the  inter-
           faces from the viewpoint of OSPF."
       REFERENCE
          "OSPF Version 2, Appendix C.3  Router  interface
          parameters"
      ::= { ospf 7 }


    ospfIfEntry OBJECT-TYPE
        SYNTAX   OspfIfEntry
        MAX-ACCESS   not-accessible
        STATUS   current
        DESCRIPTION
           "The OSPF Interface Entry describes one  inter-
           face from the viewpoint of OSPF."
       INDEX { ospfIfIpAddress, ospfAddressLessIf }
       ::= { ospfIfTable 1 }

okay so this is where the interface table really gets going ๐Ÿ’… every OSPF interface gets its own little profile, and the SEQUENCE below is the blueprint for a row in that table โœจ

OspfIfEntry ::=
    SEQUENCE {
        ospfIfIpAddress
            IpAddress,
        ospfAddressLessIf
            Integer32,
        ospfIfAreaId
            AreaID,
        ospfIfType
            INTEGER,
        ospfIfAdminStat
            Status,
        ospfIfRtrPriority
            DesignatedRouterPriority,
        ospfIfTransitDelay

            UpToMaxAge,
        ospfIfRetransInterval
            UpToMaxAge,
        ospfIfHelloInterval
            HelloRange,
        ospfIfRtrDeadInterval
            PositiveInteger,
        ospfIfPollInterval
            PositiveInteger,
        ospfIfState
            INTEGER,
        ospfIfDesignatedRouter
            IpAddress,
        ospfIfBackupDesignatedRouter
            IpAddress,
        ospfIfEvents
            Counter32,
        ospfIfAuthType
            INTEGER,
        ospfIfAuthKey
            OCTET STRING,
        ospfIfStatus
            RowStatus,
        ospfIfMulticastForwarding
            INTEGER,
        ospfIfDemand
            TruthValue
              }

    ospfIfIpAddress OBJECT-TYPE
        SYNTAX   IpAddress
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The IP address of this OSPF interface."
       ::= { ospfIfEntry 1 }

    ospfAddressLessIf OBJECT-TYPE
        SYNTAX   Integer32
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "For the purpose of easing  the  instancing  of
           addressed   and  addressless  interfaces;  This
           variable takes the value 0 on  interfaces  with
           IP  Addresses,  and  the corresponding value of
           ifIndex for interfaces having no IP Address."
       ::= { ospfIfEntry 2 }

    ospfIfAreaId OBJECT-TYPE
        SYNTAX   AreaID
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "A 32-bit integer uniquely identifying the area
           to  which  the  interface  connects.   Area  ID
           0.0.0.0 is used for the OSPF backbone."
       DEFVAL   { '00000000'H }    -- 0.0.0.0
       ::= { ospfIfEntry 3 }

    ospfIfType OBJECT-TYPE
        SYNTAX   INTEGER    {
                    broadcast (1),
                    nbma (2),
                    pointToPoint (3),
                    pointToMultipoint (5)
                  }
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "The OSPF interface type.

           By way of a default, this field may be intuited
           from the corresponding value of ifType.  Broad-
           cast LANs, such as  Ethernet  and  IEEE  802.5,
           take  the  value  'broadcast', X.25 and similar
           technologies take the value 'nbma',  and  links
           that  are  definitively point to point take the
           value 'pointToPoint'."
       ::= { ospfIfEntry 4 }


    ospfIfAdminStat OBJECT-TYPE
        SYNTAX   Status
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "The OSPF  interface's  administrative  status.
           The  value formed on the interface, and the in-
           terface will be advertised as an internal route
           to  some  area.   The  value 'disabled' denotes
           that the interface is external to OSPF."
       DEFVAL { enabled }
       ::= { ospfIfEntry 5 }

    ospfIfRtrPriority OBJECT-TYPE
        SYNTAX   DesignatedRouterPriority
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "The  priority  of  this  interface.   Used  in
           multi-access  networks,  this  field is used in
           the designated router election algorithm.   The
           value 0 signifies that the router is not eligi-
           ble to become the  designated  router  on  this
           particular  network.   In the event of a tie in
           this value, routers will use their Router ID as
           a tie breaker."
       DEFVAL { 1 }
       ::= { ospfIfEntry 6 }


    ospfIfTransitDelay OBJECT-TYPE
        SYNTAX   UpToMaxAge
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "The estimated number of seconds  it  takes  to
           transmit  a  link state update packet over this
           interface."
       DEFVAL { 1 }
       ::= { ospfIfEntry 7 }


    ospfIfRetransInterval OBJECT-TYPE
        SYNTAX   UpToMaxAge
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "The number of seconds between  link-state  ad-
           vertisement  retransmissions,  for  adjacencies
           belonging to this  interface.   This  value  is
           also used when retransmitting database descrip-
           tion and link-state request packets."
       DEFVAL { 5 }
       ::= { ospfIfEntry 8 }


    ospfIfHelloInterval OBJECT-TYPE
        SYNTAX   HelloRange
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "The length of time, in  seconds,  between  the
           Hello  packets  that the router sends on the in-
           terface.  This value must be the same  for  all
           routers attached to a common network."
       DEFVAL { 10 }
       ::= { ospfIfEntry 9 }


    ospfIfRtrDeadInterval OBJECT-TYPE
        SYNTAX   PositiveInteger
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "The number of seconds that  a  router's  Hello
           packets  have  not been seen before it's neigh-
           bors declare the router down.  This  should  be
           some  multiple  of  the  Hello  interval.  This
           value must be the same for all routers attached
           to a common network."
       DEFVAL { 40 }
       ::= { ospfIfEntry 10 }


    ospfIfPollInterval OBJECT-TYPE
        SYNTAX   PositiveInteger
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "The larger time interval, in seconds,  between
           the  Hello  packets  sent  to  an inactive non-
           broadcast multi- access neighbor."
       DEFVAL { 120 }
       ::= { ospfIfEntry 11 }


    ospfIfState OBJECT-TYPE
        SYNTAX   INTEGER    {
                    down (1),
                    loopback (2),
                    waiting (3),
                    pointToPoint (4),
                    designatedRouter (5),
                    backupDesignatedRouter (6),
                    otherDesignatedRouter (7)
                  }
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The OSPF Interface State."
       DEFVAL { down }
       ::= { ospfIfEntry 12 }


    ospfIfDesignatedRouter OBJECT-TYPE
        SYNTAX   IpAddress
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The IP Address of the Designated Router."
       DEFVAL   { '00000000'H }    -- 0.0.0.0
       ::= { ospfIfEntry 13 }


    ospfIfBackupDesignatedRouter OBJECT-TYPE
        SYNTAX   IpAddress
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The  IP  Address  of  the  Backup   Designated
           Router."
       DEFVAL   { '00000000'H }    -- 0.0.0.0
       ::= { ospfIfEntry 14 }

    ospfIfEvents OBJECT-TYPE
        SYNTAX   Counter32
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The number of times this  OSPF  interface  has
           changed its state, or an error has occurred."
       ::= { ospfIfEntry 15 }


    ospfIfAuthKey OBJECT-TYPE
        SYNTAX   OCTET STRING (SIZE (0..256))
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "The Authentication Key.  If the Area's Author-
           ization  Type  is  simplePassword,  and the key
           length is shorter than 8 octets, the agent will
           left adjust and zero fill to 8 octets.

           Note that unauthenticated  interfaces  need  no
           authentication key, and simple password authen-
           tication cannot use a key of more  than  8  oc-
           tets.  Larger keys are useful only with authen-
           tication mechanisms not specified in this docu-
           ment.

           When read, ospfIfAuthKey always returns an  Oc-
           tet String of length zero."
       REFERENCE
          "OSPF Version 2, Section 9  The  Interface  Data
          Structure"
      DEFVAL   { '0000000000000000'H }    -- 0.0.0.0.0.0.0.0
      ::= { ospfIfEntry 16 }

    ospfIfStatus OBJECT-TYPE
        SYNTAX   RowStatus
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "This variable displays the status of  the  en-
           try.  Setting it to 'invalid' has the effect of
           rendering it inoperative.  The internal  effect
           (row removal) is implementation dependent."
       ::= { ospfIfEntry 17 }


    ospfIfMulticastForwarding OBJECT-TYPE
        SYNTAX   INTEGER    {
                            blocked (1),        -- no multicast forwarding
                            multicast (2),        -- using multicast address
                            unicast (3)        -- to each OSPF neighbor
                  }
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "The way multicasts should  forwarded  on  this
           interface;  not  forwarded,  forwarded  as data
           link multicasts, or forwarded as data link uni-
           casts.   Data link multicasting is not meaning-
           ful on point to point and NBMA interfaces,  and
           setting ospfMulticastForwarding to 0 effective-
           ly disables all multicast forwarding."
       DEFVAL { blocked }
       ::= { ospfIfEntry 18 }


    ospfIfDemand OBJECT-TYPE
        SYNTAX   TruthValue
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "Indicates whether Demand OSPF procedures (hel-
           lo supression to FULL neighbors and setting the
           DoNotAge flag on proogated LSAs) should be per-
           formed on this interface."
       DEFVAL { false }
       ::= { ospfIfEntry 19 }


    ospfIfAuthType OBJECT-TYPE
        SYNTAX   INTEGER (0..255)
                    -- none (0),
                    -- simplePassword (1)
                    -- md5 (2)
                    -- reserved for specification by IANA (> 2)
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "The authentication type specified for  an  in-
           terface.   Additional  authentication types may
           be assigned locally."
       REFERENCE
          "OSPF Version 2, Appendix E Authentication"
      DEFVAL { 0 }        -- no authentication, by default
      ::= { ospfIfEntry 20 }

ngl the metric table is next and it's basically the "how expensive is this link" cheat sheet ๐Ÿงš the comments below are copied exactly, so the numbers are the real deal ๐Ÿ“

--  OSPF Interface Metric Table

--      The Metric Table describes the metrics to be advertised
--      for a specified interface at the various types of service.
--      As such, this table is an adjunct of the OSPF Interface
--      Table.

-- Types of service, as defined by RFC 791, have the ability
-- to request low delay, high bandwidth, or reliable linkage.

-- For the purposes of this specification, the measure of
-- bandwidth

--      Metric = 10^8 / ifSpeed

-- is the default value.  For multiple link interfaces, note
-- that ifSpeed is the sum of the individual link speeds.
-- This yields a number having the following typical values:

--      Network Type/bit rate   Metric

--      >= 100 MBPS                 1
--      Ethernet/802.3             10
--      E1                         48
--      T1 (ESF)                   65
--       64 KBPS                 1562
--       56 KBPS                 1785
--       19.2 KBPS               5208
--        9.6 KBPS              10416

okay bestie, this is where the metric table gets really fun ๐Ÿ’…

-- Routes that are not specified use the default (TOS 0) metric

    ospfIfMetricTable OBJECT-TYPE
        SYNTAX   SEQUENCE OF OspfIfMetricEntry
        MAX-ACCESS   not-accessible
        STATUS   current
        DESCRIPTION
           "The TOS metrics for  a  non-virtual  interface
           identified by the interface index."
       REFERENCE
          "OSPF Version 2, Appendix C.3  Router  interface
          parameters"
      ::= { ospf 8 }

    ospfIfMetricEntry OBJECT-TYPE
        SYNTAX   OspfIfMetricEntry
        MAX-ACCESS   not-accessible
        STATUS   current
        DESCRIPTION
           "A particular TOS metric for a non-virtual  in-
           terface identified by the interface index."
       REFERENCE
          "OSPF Version 2, Appendix C.3  Router  interface
          parameters"
      INDEX { ospfIfMetricIpAddress,
  ospfIfMetricAddressLessIf,
  ospfIfMetricTOS }
      ::= { ospfIfMetricTable 1 }

So the metric table is basically a per-interface list of TOS metrics, and each row is keyed by the IP address, the addressless index, and the TOS value ๐Ÿฆ‹. Anything without a specified route just falls back to the default TOS 0 metric, which is so giving "default glow-up" ๐ŸŒธ

OspfIfMetricEntry ::=
    SEQUENCE {
        ospfIfMetricIpAddress
            IpAddress,
        ospfIfMetricAddressLessIf
            Integer32,
        ospfIfMetricTOS
            TOSType,
        ospfIfMetricValue
            Metric,
        ospfIfMetricStatus
            RowStatus

              }

    ospfIfMetricIpAddress OBJECT-TYPE
        SYNTAX   IpAddress
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The IP address of this OSPF interface.  On row
           creation,  this  can  be  derived  from the in-
           stance."
       ::= { ospfIfMetricEntry 1 }

    ospfIfMetricAddressLessIf OBJECT-TYPE
        SYNTAX   Integer32
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "For the purpose of easing  the  instancing  of
           addressed   and  addressless  interfaces;  This
           variable takes the value 0 on  interfaces  with
           IP  Addresses, and the value of ifIndex for in-
           terfaces having no IP Address.   On  row  crea-
           tion, this can be derived from the instance."
       ::= { ospfIfMetricEntry 2 }


    ospfIfMetricTOS OBJECT-TYPE
        SYNTAX   TOSType
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The type of service metric  being  referenced.
           On  row  creation, this can be derived from the
           instance."
       ::= { ospfIfMetricEntry 3 }


    ospfIfMetricValue OBJECT-TYPE
        SYNTAX   Metric
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "The metric of using this type  of  service  on
           this interface.  The default value of the TOS 0
           Metric is 10^8 / ifSpeed."
       ::= { ospfIfMetricEntry 4 }

    ospfIfMetricStatus OBJECT-TYPE

        SYNTAX   RowStatus
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "This variable displays the status of  the  en-
           try.  Setting it to 'invalid' has the effect of
           rendering it inoperative.  The internal  effect
           (row removal) is implementation dependent."
       ::= { ospfIfMetricEntry 5 }

Okay so the entry is the row itself, with the IP address, the addressless index, the TOS type, the metric value, and a status column ๐ŸŽ€ The sneaky part is ospfIfMetricValue: the default TOS 0 metric is 10^8 / ifSpeed, so faster links end up with lower metrics, which is literally the vibe โœจ The status column is how you flip a row off by setting it to 'invalid', and what actually happens to the row after that (removal or not) is totally up to the implementation, so don't come for me if your vendor does something different ๐Ÿ’€

--  OSPF Virtual Interface Table

--      The Virtual Interface Table describes the virtual
--      links that the OSPF Process is configured to
--      carry on.

    ospfVirtIfTable OBJECT-TYPE
        SYNTAX   SEQUENCE OF OspfVirtIfEntry
        MAX-ACCESS   not-accessible
        STATUS   current
        DESCRIPTION
           "Information about this router's virtual inter-
           faces."
       REFERENCE
          "OSPF Version 2,  Appendix  C.4   Virtual  link
          parameters"
      ::= { ospf 9 }


    ospfVirtIfEntry OBJECT-TYPE
        SYNTAX   OspfVirtIfEntry
        MAX-ACCESS   not-accessible
        STATUS   current
        DESCRIPTION
           "Information about a single Virtual Interface."
       INDEX { ospfVirtIfAreaId, ospfVirtIfNeighbor }
       ::= { ospfVirtIfTable 1 }

Next up: the Virtual Interface Table ๐Ÿฆ‹ This one describes the virtual links the OSPF process is set up to carry on, so think of it as the VIP list for tunnels between routers ๐ŸŒˆ Each row is indexed by the transit area and the virtual neighbor, which is so iconic for organisation.

OspfVirtIfEntry ::=
    SEQUENCE {
        ospfVirtIfAreaId
            AreaID,
        ospfVirtIfNeighbor
            RouterID,
        ospfVirtIfTransitDelay
            UpToMaxAge,
        ospfVirtIfRetransInterval

            UpToMaxAge,
        ospfVirtIfHelloInterval
            HelloRange,
        ospfVirtIfRtrDeadInterval
            PositiveInteger,
        ospfVirtIfState
            INTEGER,
        ospfVirtIfEvents
            Counter32,
        ospfVirtIfAuthType
            INTEGER,
        ospfVirtIfAuthKey
            OCTET STRING,
        ospfVirtIfStatus
            RowStatus
              }

    ospfVirtIfAreaId OBJECT-TYPE
        SYNTAX   AreaID
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The  Transit  Area  that  the   Virtual   Link
           traverses.  By definition, this is not 0.0.0.0"
       ::= { ospfVirtIfEntry 1 }


    ospfVirtIfNeighbor OBJECT-TYPE
        SYNTAX   RouterID
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The Router ID of the Virtual Neighbor."
       ::= { ospfVirtIfEntry 2 }


    ospfVirtIfTransitDelay OBJECT-TYPE
        SYNTAX   UpToMaxAge
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "The estimated number of seconds  it  takes  to
           transmit  a link- state update packet over this
           interface."
       DEFVAL { 1 }
       ::= { ospfVirtIfEntry 3 }

    ospfVirtIfRetransInterval OBJECT-TYPE
        SYNTAX   UpToMaxAge
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "The number of seconds between  link-state  ad-
           vertisement  retransmissions,  for  adjacencies
           belonging to this  interface.   This  value  is
           also used when retransmitting database descrip-
           tion  and  link-state  request  packets.   This
           value  should  be well over the expected round-
           trip time."
       DEFVAL { 5 }
       ::= { ospfVirtIfEntry 4 }


    ospfVirtIfHelloInterval OBJECT-TYPE
        SYNTAX   HelloRange
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "The length of time, in  seconds,  between  the
           Hello  packets that the router sends on the in-
           terface.  This value must be the same  for  the
           virtual neighbor."
       DEFVAL { 10 }
       ::= { ospfVirtIfEntry 5 }


    ospfVirtIfRtrDeadInterval OBJECT-TYPE
        SYNTAX   PositiveInteger
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "The number of seconds that  a  router's  Hello
           packets  have  not been seen before it's neigh-
           bors declare the router down.  This  should  be
           some  multiple  of  the  Hello  interval.  This
           value must be the same for the  virtual  neigh-
           bor."
       DEFVAL { 60 }
       ::= { ospfVirtIfEntry 6 }


    ospfVirtIfState OBJECT-TYPE
        SYNTAX   INTEGER    {
                    down (1),            -- these use the same encoding
                    pointToPoint (4)     -- as the ospfIfTable

                  }
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "OSPF virtual interface states."
       DEFVAL   { down }
       ::= { ospfVirtIfEntry 7 }


    ospfVirtIfEvents OBJECT-TYPE
        SYNTAX   Counter32
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The number of state changes or error events on
           this Virtual Link"
       ::= { ospfVirtIfEntry 8 }

Here's the row layout ๐Ÿ“ Every column is listed in the SEQUENCE, then each one gets its own OBJECT-TYPE with a DESCRIPTION and a DEFVAL where one exists. Some hot takes on the timers:

  • Transit delay defaults to 1 second ๐Ÿ’–
  • Retransmit interval defaults to 5 seconds and the text says it should be well over the expected round-trip time ๐ŸŒธ
  • Hello interval defaults to 10 seconds and it must be the same for the virtual neighbor ๐Ÿซถ
  • Dead interval defaults to 60 seconds, should be some multiple of the Hello interval, and must match the virtual neighbor too ๐Ÿ˜ญ

The state column only has two values, down (1) and pointToPoint (4), and it's the same encoding as ospfIfTable, so it's giving consistency ๐Ÿ’… Its default is down, which is very on-brand for a link that hasn't been set up yet.

    ospfVirtIfAuthKey OBJECT-TYPE
        SYNTAX   OCTET STRING (SIZE(0..256))
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "If Authentication Type is simplePassword,  the
           device  will left adjust and zero fill to 8 oc-
           tets.

           Note that unauthenticated  interfaces  need  no
           authentication key, and simple password authen-
           tication cannot use a key of more  than  8  oc-
           tets.  Larger keys are useful only with authen-
           tication mechanisms not specified in this docu-
           ment.

           When  read,  ospfVifAuthKey  always  returns  a
           string of length zero."
       REFERENCE
          "OSPF Version 2, Section 9  The  Interface  Data
          Structure"
      DEFVAL   { '0000000000000000'H }    -- 0.0.0.0.0.0.0.0
      ::= { ospfVirtIfEntry 9 }


    ospfVirtIfStatus OBJECT-TYPE
        SYNTAX   RowStatus
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "This variable displays the status of  the  en-
           try.  Setting it to 'invalid' has the effect of
           rendering it inoperative.  The internal  effect
           (row removal) is implementation dependent."
       ::= { ospfVirtIfEntry 10 }


    ospfVirtIfAuthType OBJECT-TYPE
        SYNTAX   INTEGER (0..255)
                    -- none (0),
                    -- simplePassword (1)
                    -- md5 (2)
                    -- reserved for specification by IANA (> 2)
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "The authentication type specified for a virtu-
           al  interface.  Additional authentication types
           may be assigned locally."
       REFERENCE
          "OSPF Version 2, Appendix E Authentication"
      DEFVAL { 0 }        -- no authentication, by default
      ::= { ospfVirtIfEntry 11 }
๐Ÿ” Heads up, bestie: the auth key is an OCTET STRING of size 0 to 256, but for simple password it gets left-adjusted and zero-filled to 8 octets, and simple password can't use anything longer than 8 octets. Larger keys only make sense with auth mechanisms that aren't in this document. And when you read it back, ospfVifAuthKey always comes back as a zero-length string, so don't expect to see your secret in the output ๐Ÿ™ˆ

The auth type is an INTEGER (0..255), where none (0) is the default, simplePassword (1) and md5 (2) are named, and anything above 2 is reserved for IANA. Additional types can be assigned locally too, which is very customisable of them ๐Ÿงš

--  OSPF Neighbor Table

--      The OSPF Neighbor Table describes all neighbors in
--      the locality of the subject router.

    ospfNbrTable OBJECT-TYPE
        SYNTAX   SEQUENCE OF OspfNbrEntry
        MAX-ACCESS   not-accessible
        STATUS   current
        DESCRIPTION
           "A table of non-virtual neighbor information."
       REFERENCE
          "OSPF Version 2, Section 10  The  Neighbor  Data
          Structure"
      ::= { ospf 10 }


    ospfNbrEntry OBJECT-TYPE
        SYNTAX   OspfNbrEntry
        MAX-ACCESS   not-accessible
        STATUS   current
        DESCRIPTION

           "The information regarding a single neighbor."
       REFERENCE
          "OSPF Version 2, Section 10  The  Neighbor  Data
          Structure"
      INDEX { ospfNbrIpAddr, ospfNbrAddressLessIndex }
      ::= { ospfNbrTable 1 }

And last but not least, the Neighbor Table ๐Ÿ‘‘ It's a list of all the non-virtual neighbors in the subject router's locality, and each row is indexed by the neighbor's IP address and its addressless index. Main character energy, no notes ๐Ÿ’œ

okay so the neighbor entries are where the drama lives ๐Ÿ’… each row is one neighbor relationship, and the columns track everything from the address they use to what state the relationship is in ๐Ÿฆ‹

OspfNbrEntry ::=
    SEQUENCE {
        ospfNbrIpAddr
            IpAddress,
        ospfNbrAddressLessIndex
            InterfaceIndex,
        ospfNbrRtrId
            RouterID,
        ospfNbrOptions
            Integer32,
        ospfNbrPriority
            DesignatedRouterPriority,
        ospfNbrState
            INTEGER,
        ospfNbrEvents
            Counter32,
        ospfNbrLsRetransQLen
            Gauge32,
        ospfNbmaNbrStatus
            RowStatus,
        ospfNbmaNbrPermanence
            INTEGER,
        ospfNbrHelloSuppressed
            TruthValue
              }

    ospfNbrIpAddr OBJECT-TYPE
        SYNTAX   IpAddress
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The IP address this neighbor is using  in  its
           IP  Source  Address.  Note that, on addressless
           links, this will not be 0.0.0.0,  but  the  ad-
           dress of another of the neighbor's interfaces."
       ::= { ospfNbrEntry 1 }


    ospfNbrAddressLessIndex OBJECT-TYPE
        SYNTAX   InterfaceIndex
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "On an interface having an  IP  Address,  zero.
           On  addressless  interfaces,  the corresponding
           value of ifIndex in the Internet Standard  MIB.
           On  row  creation, this can be derived from the
           instance."
       ::= { ospfNbrEntry 2 }


    ospfNbrRtrId OBJECT-TYPE
        SYNTAX   RouterID
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "A 32-bit integer (represented as a type  IpAd-
           dress)  uniquely  identifying  the  neighboring
           router in the Autonomous System."
       DEFVAL   { '00000000'H }    -- 0.0.0.0
       ::= { ospfNbrEntry 3 }


    ospfNbrOptions OBJECT-TYPE
        SYNTAX   Integer32
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "A Bit Mask corresponding to the neighbor's op-
           tions field.

           Bit 0, if set, indicates that the  system  will
           operate  on  Type of Service metrics other than
           TOS 0.  If zero, the neighbor will  ignore  all
           metrics except the TOS 0 metric.

           Bit 1, if set, indicates  that  the  associated
           area  accepts and operates on external informa-
           tion; if zero, it is a stub area.

           Bit 2, if set, indicates that the system is ca-
           pable  of routing IP Multicast datagrams; i.e.,
           that it implements the Multicast Extensions  to
           OSPF.

           Bit 3, if set, indicates  that  the  associated
           area  is  an  NSSA.  These areas are capable of
           carrying type 7 external advertisements,  which
           are  translated into type 5 external advertise-
           ments at NSSA borders."
       REFERENCE
          "OSPF Version 2, Section 12.1.2 Options"
      DEFVAL { 0 }
      ::= { ospfNbrEntry 4 }


    ospfNbrPriority OBJECT-TYPE
        SYNTAX   DesignatedRouterPriority
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "The priority of this neighbor in the designat-
           ed router election algorithm.  The value 0 sig-
           nifies that the neighbor is not eligible to be-
           come  the  designated router on this particular
           network."
       DEFVAL { 1 }
       ::= { ospfNbrEntry 5 }


    ospfNbrState OBJECT-TYPE
        SYNTAX   INTEGER    {
                    down (1),
                    attempt (2),
                    init (3),
                    twoWay (4),
                    exchangeStart (5),
                    exchange (6),
                    loading (7),
                    full (8)
                  }
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The State of the relationship with this Neigh-
           bor."
       REFERENCE
          "OSPF Version 2, Section 10.1 Neighbor States"
      DEFVAL   { down }
      ::= { ospfNbrEntry 6 }


    ospfNbrEvents OBJECT-TYPE
        SYNTAX   Counter32
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION

           "The number of times this neighbor relationship
           has changed state, or an error has occurred."
       ::= { ospfNbrEntry 7 }


    ospfNbrLsRetransQLen OBJECT-TYPE
        SYNTAX   Gauge32
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The  current  length  of  the   retransmission
           queue."
       ::= { ospfNbrEntry 8 }


    ospfNbmaNbrStatus OBJECT-TYPE
        SYNTAX   RowStatus
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "This variable displays the status of  the  en-
           try.  Setting it to 'invalid' has the effect of
           rendering it inoperative.  The internal  effect
           (row removal) is implementation dependent."
       ::= { ospfNbrEntry 9 }


    ospfNbmaNbrPermanence OBJECT-TYPE
        SYNTAX   INTEGER    {
                    dynamic (1),        -- learned through protocol
                    permanent (2)       -- configured address
                  }
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "This variable displays the status of  the  en-
           try.   'dynamic'  and  'permanent' refer to how
           the neighbor became known."
       DEFVAL { permanent }
       ::= { ospfNbrEntry 10 }


    ospfNbrHelloSuppressed OBJECT-TYPE
        SYNTAX   TruthValue
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "Indicates whether Hellos are being  suppressed
           to the neighbor"
       ::= { ospfNbrEntry 11 }

okay next up is the virtual neighbor table ๐Ÿงš virtual links are set up in the virtual interface table, so this one is read-only, no edits allowed ๐Ÿ™ˆ

--  OSPF Virtual Neighbor Table

--      This table describes all virtual neighbors.
--      Since Virtual Links are configured in the
--      virtual interface table, this table is read-only.

    ospfVirtNbrTable OBJECT-TYPE
        SYNTAX   SEQUENCE OF OspfVirtNbrEntry
        MAX-ACCESS   not-accessible
        STATUS   current
        DESCRIPTION
           "A table of virtual neighbor information."
       REFERENCE
          "OSPF Version 2, Section 15  Virtual Links"
      ::= { ospf 11 }


    ospfVirtNbrEntry OBJECT-TYPE
        SYNTAX   OspfVirtNbrEntry
        MAX-ACCESS   not-accessible
        STATUS   current
        DESCRIPTION
           "Virtual neighbor information."
       INDEX { ospfVirtNbrArea, ospfVirtNbrRtrId }
       ::= { ospfVirtNbrTable 1 }

OspfVirtNbrEntry ::=
    SEQUENCE {
        ospfVirtNbrArea
            AreaID,
        ospfVirtNbrRtrId
            RouterID,
        ospfVirtNbrIpAddr
            IpAddress,
        ospfVirtNbrOptions
            Integer32,
        ospfVirtNbrState
            INTEGER,
        ospfVirtNbrEvents
            Counter32,
        ospfVirtNbrLsRetransQLen
            Gauge32,
        ospfVirtNbrHelloSuppressed
                TruthValue

              }

    ospfVirtNbrArea OBJECT-TYPE
        SYNTAX   AreaID
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The Transit Area Identifier."
       ::= { ospfVirtNbrEntry 1 }


    ospfVirtNbrRtrId OBJECT-TYPE
        SYNTAX   RouterID
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "A  32-bit  integer  uniquely  identifying  the
           neighboring router in the Autonomous System."
       ::= { ospfVirtNbrEntry 2 }


    ospfVirtNbrIpAddr OBJECT-TYPE
        SYNTAX   IpAddress
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The IP address this Virtual  Neighbor  is  us-
           ing."
       ::= { ospfVirtNbrEntry 3 }


    ospfVirtNbrOptions OBJECT-TYPE
        SYNTAX   Integer32
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "A Bit Mask corresponding to the neighbor's op-
           tions field.

           Bit 1, if set, indicates that the  system  will
           operate  on  Type of Service metrics other than
           TOS 0.  If zero, the neighbor will  ignore  all
           metrics except the TOS 0 metric.

           Bit 2, if set, indicates  that  the  system  is
           Network  Multicast  capable; ie, that it imple-
           ments OSPF Multicast Routing."
       ::= { ospfVirtNbrEntry 4 }

    ospfVirtNbrState OBJECT-TYPE
        SYNTAX   INTEGER    {
                    down (1),
                    attempt (2),
                    init (3),
                    twoWay (4),
                    exchangeStart (5),
                    exchange (6),
                    loading (7),
                    full (8)
                  }
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The state of the  Virtual  Neighbor  Relation-
           ship."
       ::= { ospfVirtNbrEntry 5 }


    ospfVirtNbrEvents OBJECT-TYPE
        SYNTAX   Counter32
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The number of  times  this  virtual  link  has
           changed its state, or an error has occurred."
       ::= { ospfVirtNbrEntry 6 }


    ospfVirtNbrLsRetransQLen OBJECT-TYPE
        SYNTAX   Gauge32
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The  current  length  of  the   retransmission
           queue."
       ::= { ospfVirtNbrEntry 7 }


    ospfVirtNbrHelloSuppressed OBJECT-TYPE
        SYNTAX   TruthValue
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "Indicates whether Hellos are being  suppressed
           to the neighbor"
       ::= { ospfVirtNbrEntry 8 }

and now we're heading into the link state database, external ๐ŸŒธ this table has the same format as the LSDB table, but only holds external LSAs, so they only show up once for the router instead of once in every non-stub area ๐Ÿซถ

--  OSPF Link State Database, External

--      The Link State Database contains the Link State
--      Advertisements from throughout the areas that the
--      device is attached to.

--             This table is identical to the OSPF LSDB Table in
--      format, but contains only External Link State
--             Advertisements.  The purpose is to allow external
--      LSAs to be displayed once for the router rather
--      than once in each non-stub area.

    ospfExtLsdbTable OBJECT-TYPE
        SYNTAX   SEQUENCE OF OspfExtLsdbEntry
        MAX-ACCESS   not-accessible
        STATUS   current
        DESCRIPTION
           "The OSPF Process's Links State Database."
       REFERENCE
          "OSPF Version 2, Section 12  Link  State  Adver-
          tisements"
      ::= { ospf 12 }


    ospfExtLsdbEntry OBJECT-TYPE
        SYNTAX   OspfExtLsdbEntry
        MAX-ACCESS   not-accessible
        STATUS   current
        DESCRIPTION
           "A single Link State Advertisement."
       INDEX { ospfExtLsdbType, ospfExtLsdbLsid, ospfExtLsdbRouterId }
       ::= { ospfExtLsdbTable 1 }
OspfExtLsdbEntry ::=
    SEQUENCE {
        ospfExtLsdbType
            INTEGER,
        ospfExtLsdbLsid
            IpAddress,
        ospfExtLsdbRouterId
            RouterID,
        ospfExtLsdbSequence
            Integer32,
        ospfExtLsdbAge
            Integer32,
        ospfExtLsdbChecksum
            Integer32,
        ospfExtLsdbAdvertisement

            OCTET STRING
              }

    ospfExtLsdbType OBJECT-TYPE
        SYNTAX   INTEGER    {
                    asExternalLink (5)
                  }
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The type  of  the  link  state  advertisement.
           Each  link state type has a separate advertise-
           ment format."
       REFERENCE
          "OSPF Version 2, Appendix A.4.1 The  Link  State
          Advertisement header"
      ::= { ospfExtLsdbEntry 1 }


    ospfExtLsdbLsid OBJECT-TYPE
        SYNTAX   IpAddress
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The Link State ID is an LS Type Specific field
           containing either a Router ID or an IP Address;
           it identifies the piece of the  routing  domain
           that is being described by the advertisement."
       REFERENCE
          "OSPF Version 2, Section 12.1.4 Link State ID"
      ::= { ospfExtLsdbEntry 2 }


    ospfExtLsdbRouterId OBJECT-TYPE
        SYNTAX   RouterID
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The 32 bit number that uniquely identifies the
           originating router in the Autonomous System."
       REFERENCE
          "OSPF Version 2, Appendix C.1 Global parameters"
      ::= { ospfExtLsdbEntry 3 }

--  Note that the OSPF Sequence Number is a 32 bit signed
--  integer.  It starts with the value '80000001'h,
--  or -'7FFFFFFF'h, and increments until '7FFFFFFF'h
--  Thus, a typical sequence number will be very negative.

    ospfExtLsdbSequence OBJECT-TYPE
        SYNTAX   Integer32
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The sequence number field is a  signed  32-bit
           integer.   It  is used to detect old and dupli-
           cate link state advertisements.  The  space  of
           sequence  numbers  is  linearly  ordered.   The
           larger the sequence number the more recent  the
           advertisement."
       REFERENCE
          "OSPF Version  2,  Section  12.1.6  LS  sequence
          number"
      ::= { ospfExtLsdbEntry 4 }


    ospfExtLsdbAge OBJECT-TYPE
        SYNTAX   Integer32    -- Should be 0..MaxAge
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "This field is the age of the link state adver-
           tisement in seconds."
       REFERENCE
          "OSPF Version 2, Section 12.1.1 LS age"
      ::= { ospfExtLsdbEntry 5 }


    ospfExtLsdbChecksum OBJECT-TYPE
        SYNTAX   Integer32
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "This field is the  checksum  of  the  complete
           contents  of  the  advertisement, excepting the
           age field.  The age field is excepted  so  that
           an   advertisement's  age  can  be  incremented
           without updating the  checksum.   The  checksum
           used  is  the same that is used for ISO connec-
           tionless datagrams; it is commonly referred  to
           as the Fletcher checksum."
       REFERENCE
          "OSPF Version 2, Section 12.1.7 LS checksum"
      ::= { ospfExtLsdbEntry 6 }


    ospfExtLsdbAdvertisement OBJECT-TYPE

        SYNTAX   OCTET STRING (SIZE(36))
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The entire Link State Advertisement, including
           its header."
       REFERENCE
          "OSPF Version 2, Section 12  Link  State  Adver-
          tisements"
      ::= { ospfExtLsdbEntry 7 }


--  OSPF Use of the CIDR Route Table

ospfRouteGroup           OBJECT IDENTIFIER ::= { ospf 13 }

-- The IP Forwarding Table defines a number of objects for use by
-- the routing protocol to externalize its information.  Most of
-- the variables (ipForwardDest, ipForwardMask, ipForwardPolicy,
-- ipForwardNextHop, ipForwardIfIndex, ipForwardType,
-- ipForwardProto, ipForwardAge, and ipForwardNextHopAS) are
-- defined there.

-- Those that leave some discretion are defined here.

-- ipCidrRouteProto is, of course, ospf (13).

-- ipCidrRouteAge is the time since the route was first calculated,
-- as opposed to the time since the last SPF run.

-- ipCidrRouteInfo is an OBJECT IDENTIFIER for use by the routing
-- protocol.  The following values shall be found there depending
-- on the way the route was calculated.

ospfIntraArea      OBJECT IDENTIFIER ::= { ospfRouteGroup 1 }
ospfInterArea      OBJECT IDENTIFIER ::= { ospfRouteGroup 2 }
ospfExternalType1  OBJECT IDENTIFIER ::= { ospfRouteGroup 3 }
ospfExternalType2  OBJECT IDENTIFIER ::= { ospfRouteGroup 4 }

-- ipCidrRouteMetric1 is, by definition, the primary routing
-- metric.  Therefore, it should be the metric that route
-- selection is based on.  For intra-area and inter-area routes,
-- it is an OSPF metric.  For External Type 1 (comparable value)
-- routes, it is an OSPF metric plus the External Metric.  For
-- external Type 2 (non-comparable value) routes, it is the
-- external metric.

-- ipCidrRouteMetric2 is, by definition, a secondary routing
-- metric.  Therefore, it should be the metric that breaks a tie
-- among routes having equal metric1 values and the same
-- calculation rule.  For intra-area, inter-area routes, and
-- External Type 1 (comparable value) routes, it is unused.  For
-- external Type 2 (non-comparable value) routes, it is the metric
-- to the AS border router.

-- ipCidrRouteMetric3, ipCidrRouteMetric4, and ipCidrRouteMetric5 are
-- unused.

--
--      The OSPF Area Aggregate Table
--
--      This table replaces the OSPF Area Summary Table, being an
--      extension of that for CIDR routers.

    ospfAreaAggregateTable OBJECT-TYPE
        SYNTAX   SEQUENCE OF OspfAreaAggregateEntry
        MAX-ACCESS   not-accessible
        STATUS   current
        DESCRIPTION
           "A range of IP addresses  specified  by  an  IP
           address/IP  network  mask  pair.   For example,
           class B address range of X.X.X.X with a network
           mask  of  255.255.0.0 includes all IP addresses
           from X.X.0.0  to  X.X.255.255.   Note  that  if
           ranges  are configured such that one range sub-
           sumes  another  range  (e.g.,   10.0.0.0   mask
           255.0.0.0  and  10.1.0.0 mask 255.255.0.0), the
           most specific match is the preferred one."
       REFERENCE
          "OSPF Version 2, Appendix C.2  Area parameters"
      ::= { ospf 14 }


    ospfAreaAggregateEntry OBJECT-TYPE
        SYNTAX   OspfAreaAggregateEntry
        MAX-ACCESS   not-accessible
        STATUS   current
        DESCRIPTION
           "A range of IP addresses  specified  by  an  IP
           address/IP  network  mask  pair.   For example,
           class B address range of X.X.X.X with a network
           mask  of  255.255.0.0 includes all IP addresses
           from X.X.0.0  to  X.X.255.255.   Note  that  if
           ranges are range configured such that one range
           subsumes another  range  (e.g.,  10.0.0.0  mask
           255.0.0.0  and  10.1.0.0 mask 255.255.0.0), the
           most specific match is the preferred one."
       REFERENCE
          "OSPF Version 2, Appendix C.2  Area parameters"
      INDEX { ospfAreaAggregateAreaID, ospfAreaAggregateLsdbType,
              ospfAreaAggregateNet, ospfAreaAggregateMask }
      ::= { ospfAreaAggregateTable 1 }


OspfAreaAggregateEntry ::=
    SEQUENCE {
        ospfAreaAggregateAreaID
            AreaID,
        ospfAreaAggregateLsdbType
            INTEGER,
        ospfAreaAggregateNet
            IpAddress,
        ospfAreaAggregateMask
            IpAddress,
        ospfAreaAggregateStatus
            RowStatus,
        ospfAreaAggregateEffect
            INTEGER
              }

    ospfAreaAggregateAreaID OBJECT-TYPE
        SYNTAX   AreaID
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The Area the Address Aggregate is to be  found
           within."
       REFERENCE
          "OSPF Version 2, Appendix C.2 Area parameters"
      ::= { ospfAreaAggregateEntry 1 }


    ospfAreaAggregateLsdbType OBJECT-TYPE
        SYNTAX   INTEGER    {
                    summaryLink (3),
                    nssaExternalLink (7)
                  }
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The type of the Address Aggregate.  This field
           specifies  the  Lsdb type that this Address Ag-
           gregate applies to."
       REFERENCE

          "OSPF Version 2, Appendix A.4.1 The  Link  State
          Advertisement header"
      ::= { ospfAreaAggregateEntry 2 }


    ospfAreaAggregateNet OBJECT-TYPE
        SYNTAX   IpAddress
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The IP Address of the Net or Subnet  indicated
           by the range."
       REFERENCE
          "OSPF Version 2, Appendix C.2 Area parameters"
      ::= { ospfAreaAggregateEntry 3 }


    ospfAreaAggregateMask OBJECT-TYPE
        SYNTAX   IpAddress
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The Subnet Mask that pertains to  the  Net  or
           Subnet."
       REFERENCE
          "OSPF Version 2, Appendix C.2 Area parameters"
      ::= { ospfAreaAggregateEntry 4 }


    ospfAreaAggregateStatus OBJECT-TYPE
        SYNTAX   RowStatus
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "This variable displays the status of  the  en-
           try.  Setting it to 'invalid' has the effect of
           rendering it inoperative.  The internal  effect
           (row removal) is implementation dependent."
       ::= { ospfAreaAggregateEntry 5 }


    ospfAreaAggregateEffect OBJECT-TYPE
        SYNTAX   INTEGER    {
                    advertiseMatching (1),
                    doNotAdvertiseMatching (2)
                  }
        MAX-ACCESS   read-create
        STATUS   current
        DESCRIPTION
           "Subnets subsumed by ranges either trigger  the
           advertisement  of  the indicated aggregate (ad-
           vertiseMatching), or result in the subnet's not
           being advertised at all outside the area."
       DEFVAL   { advertiseMatching }
       ::= { ospfAreaAggregateEntry 6 }


-- conformance information

ospfConformance OBJECT IDENTIFIER ::= { ospf 15 }

ospfGroups      OBJECT IDENTIFIER ::= { ospfConformance 1 }
ospfCompliances OBJECT IDENTIFIER ::= { ospfConformance 2 }

-- compliance statements

    ospfCompliance MODULE-COMPLIANCE
        STATUS  current
        DESCRIPTION
           "The compliance statement "
       MODULE  -- this module
       MANDATORY-GROUPS {
                    ospfBasicGroup,
                    ospfAreaGroup,
                    ospfStubAreaGroup,
                    ospfIfGroup,
                    ospfIfMetricGroup,
                    ospfVirtIfGroup,
                    ospfNbrGroup,
                    ospfVirtNbrGroup,
                    ospfAreaAggregateGroup
           }
       ::= { ospfCompliances 1 }

okay so the external LSDB entry is giving full table-row energy ๐Ÿ’…โœจ each field gets its own OBJECT-TYPE, its own REFERENCE back to the OSPF Version 2 text, and its own little ::= { ospfExtLsdbEntry N } tag so the numbering stays neat ๐ŸŽ€

the sequence number note is literally so dramatic ๐Ÿ˜ญ it starts at the '80000001'h vibe (aka -'7FFFFFFF'h), counts up to '7FFFFFFF'h, and so a typical number ends up very negative ๐ŸŒ™ iykyk

the CIDR route table bit is where it gets fun ๐Ÿฆ‹ the big route objects come from the IP Forwarding Table, and this module only fills in the spots that leave some wiggle room. ipCidrRouteProto is ospf (13), and ipCidrRouteAge counts from when the route was first calculated, not from the last SPF run ๐Ÿงš

the metrics are where the drama is ๐Ÿ”ฅ metric1 is the main one, so route selection leans on it. metric2 is the tiebreaker, but only for external Type 2 routes, where it's the metric to the AS border router ๐Ÿ‘‘ metric3 through metric5 are just unused, no cap ๐Ÿ’€

the area aggregate table is a total glow-up ๐ŸŒธ it replaces the old Area Summary Table and extends it for CIDR routers. when ranges overlap, the most specific match wins, so 10.1.0.0 mask 255.255.0.0 beats 10.0.0.0 mask 255.0.0.0 every time ๐Ÿ’–

and the status and effect objects are the cherry on top ๐Ÿ“ ospfAreaAggregateStatus is read-create and setting it to 'invalid' makes the entry inoperative, while ospfAreaAggregateEffect defaults to advertiseMatching, so the subnets either get their aggregate advertised or stay hidden outside the area ๐Ÿ™ˆ

last but not least, the conformance section wraps up the whole module ๐Ÿซถ the compliance statement lists nine mandatory groups, from ospfBasicGroup all the way to ospfAreaAggregateGroup, so every implementation has to bring the whole squad ๐Ÿ’œ

-- units of conformance

    ospfBasicGroup    OBJECT-GROUP
        OBJECTS {
                    ospfRouterId,
                    ospfAdminStat,
                    ospfVersionNumber,
                    ospfAreaBdrRtrStatus,
                    ospfASBdrRtrStatus,
                    ospfExternLsaCount,
                    ospfExternLsaCksumSum,
                    ospfTOSSupport,
                    ospfOriginateNewLsas,
                    ospfRxNewLsas,
                    ospfExtLsdbLimit,
                    ospfMulticastExtensions,
                    ospfExitOverflowInterval,
                    ospfDemandExtensions
        }
        STATUS  current
        DESCRIPTION
           "These objects are required for OSPF systems."
       ::= { ospfGroups 1 }


    ospfAreaGroup    OBJECT-GROUP
        OBJECTS {
                    ospfAreaId,
                    ospfImportAsExtern,
                    ospfSpfRuns,
                    ospfAreaBdrRtrCount,
                    ospfAsBdrRtrCount,
                    ospfAreaLsaCount,
                    ospfAreaLsaCksumSum,
                    ospfAreaSummary,
                    ospfAreaStatus
        }
        STATUS  current
        DESCRIPTION
           "These objects are required  for  OSPF  systems
           supporting areas."
       ::= { ospfGroups 2 }


    ospfStubAreaGroup    OBJECT-GROUP
        OBJECTS {
                    ospfStubAreaId,
                    ospfStubTOS,
                    ospfStubMetric,
                    ospfStubStatus,
                    ospfStubMetricType
        }
        STATUS  current
        DESCRIPTION
           "These objects are required  for  OSPF  systems
           supporting stub areas."
       ::= { ospfGroups 3 }

    ospfLsdbGroup    OBJECT-GROUP
        OBJECTS {
                    ospfLsdbAreaId,
                    ospfLsdbType,
                    ospfLsdbLsid,
                    ospfLsdbRouterId,
                    ospfLsdbSequence,
                    ospfLsdbAge,
                    ospfLsdbChecksum,
                    ospfLsdbAdvertisement
        }
        STATUS  current
        DESCRIPTION
           "These objects are required  for  OSPF  systems
           that display their link state database."
       ::= { ospfGroups 4 }


    ospfAreaRangeGroup    OBJECT-GROUP
        OBJECTS {
                    ospfAreaRangeAreaId,
                    ospfAreaRangeNet,
                    ospfAreaRangeMask,
                    ospfAreaRangeStatus,
                    ospfAreaRangeEffect
        }
        STATUS  obsolete
        DESCRIPTION
           "These objects are required for  non-CIDR  OSPF
           systems that support multiple areas."
       ::= { ospfGroups 5 }


    ospfHostGroup    OBJECT-GROUP
        OBJECTS {
                    ospfHostIpAddress,
                    ospfHostTOS,
                    ospfHostMetric,
                    ospfHostStatus,
                    ospfHostAreaID
        }
        STATUS  current
        DESCRIPTION
           "These objects are required  for  OSPF  systems
           that support attached hosts."
       ::= { ospfGroups 6 }

    ospfIfGroup    OBJECT-GROUP
        OBJECTS {
                    ospfIfIpAddress,
                    ospfAddressLessIf,
                    ospfIfAreaId,
                    ospfIfType,
                    ospfIfAdminStat,
                    ospfIfRtrPriority,
                    ospfIfTransitDelay,
                    ospfIfRetransInterval,
                    ospfIfHelloInterval,
                    ospfIfRtrDeadInterval,
                    ospfIfPollInterval,
                    ospfIfState,
                    ospfIfDesignatedRouter,
                    ospfIfBackupDesignatedRouter,
                    ospfIfEvents,
                    ospfIfAuthType,
                    ospfIfAuthKey,
                    ospfIfStatus,
                    ospfIfMulticastForwarding,
                    ospfIfDemand
        }
        STATUS  current
        DESCRIPTION
           "These objects are required for OSPF systems."
       ::= { ospfGroups 7 }


    ospfIfMetricGroup    OBJECT-GROUP
        OBJECTS {
                    ospfIfMetricIpAddress,
                    ospfIfMetricAddressLessIf,
                    ospfIfMetricTOS,
                    ospfIfMetricValue,
                    ospfIfMetricStatus
        }
        STATUS  current
        DESCRIPTION
           "These objects are required for OSPF systems."
       ::= { ospfGroups 8 }


    ospfVirtIfGroup    OBJECT-GROUP
        OBJECTS {
                    ospfVirtIfAreaId,
                    ospfVirtIfNeighbor,
                    ospfVirtIfTransitDelay,
                    ospfVirtIfRetransInterval,
                    ospfVirtIfHelloInterval,
                    ospfVirtIfRtrDeadInterval,
                    ospfVirtIfState,
                    ospfVirtIfEvents,
                    ospfVirtIfAuthType,
                    ospfVirtIfAuthKey,
                    ospfVirtIfStatus
        }
        STATUS  current
        DESCRIPTION
           "These objects are required for OSPF systems."
       ::= { ospfGroups 9 }


    ospfNbrGroup    OBJECT-GROUP
        OBJECTS {
                    ospfNbrIpAddr,
                    ospfNbrAddressLessIndex,
                    ospfNbrRtrId,
                    ospfNbrOptions,
                    ospfNbrPriority,
                    ospfNbrState,
                    ospfNbrEvents,
                    ospfNbrLsRetransQLen,
                    ospfNbmaNbrStatus,
                    ospfNbmaNbrPermanence,
                    ospfNbrHelloSuppressed
        }
        STATUS  current
        DESCRIPTION
           "These objects are required for OSPF systems."
       ::= { ospfGroups 10 }


    ospfVirtNbrGroup    OBJECT-GROUP
        OBJECTS {
                    ospfVirtNbrArea,
                    ospfVirtNbrRtrId,
                    ospfVirtNbrIpAddr,
                    ospfVirtNbrOptions,
                    ospfVirtNbrState,
                    ospfVirtNbrEvents,
                    ospfVirtNbrLsRetransQLen,
                    ospfVirtNbrHelloSuppressed
        }
        STATUS  current
        DESCRIPTION

           "These objects are required for OSPF systems."
       ::= { ospfGroups 11 }


    ospfExtLsdbGroup    OBJECT-GROUP
        OBJECTS {
                    ospfExtLsdbType,
                    ospfExtLsdbLsid,
                    ospfExtLsdbRouterId,
                    ospfExtLsdbSequence,
                    ospfExtLsdbAge,
                    ospfExtLsdbChecksum,
                    ospfExtLsdbAdvertisement
        }
        STATUS  current
        DESCRIPTION
           "These objects are required  for  OSPF  systems
           that display their link state database."
       ::= { ospfGroups 12 }


    ospfAreaAggregateGroup    OBJECT-GROUP
        OBJECTS {
                    ospfAreaAggregateAreaID,
                    ospfAreaAggregateLsdbType,
                    ospfAreaAggregateNet,
                    ospfAreaAggregateMask,
                    ospfAreaAggregateStatus,
                    ospfAreaAggregateEffect
        }
        STATUS  current
        DESCRIPTION
           "These objects are required for OSPF systems."
       ::= { ospfGroups 13 }

END

4. OSPF Traps โœจ

OSPF is basically event-driven ๐ŸŒธ. An event can be an OSPF interface's link-level status changing, an OSPF timer expiring, or an OSPF protocol packet showing up. A lot of what OSPF does in response to those events changes the routing topology. Once topologies get big and messy, it's really hard to figure out where a topology change or a weird routing path came from by polling tons of routers, so the other option is to tell a network manager about potentially critical OSPF events using SNMP traps ๐Ÿฆ‹.

This section defines a set of traps, objects and mechanisms to enhance the ability to manage IP internetworks which use OSPF as its IGP. It is an optional but useful extension to the OSPF MIB ๐Ÿ’œ.

4.1. Format Of Trap Definitions

Section 7 has the trap definitions ๐Ÿ“.

4.2. Approach

The mechanism for sending traps is straight-forward ๐ŸŽ€. When an exception event occurs, the application notifies the local agent, who sends a trap to the appropriate SNMP management stations. The message includes the trap type and may include a list of trap specific variables. A new object is defined in section 3.2 that will allow a network manager to enable or disable particular OSPF traps. Section 5 gives the trap definitions, which includes the variable lists. The router ID of the originator of the trap is included in the variable list so that the network manager may easily determine the source of the trap ๐Ÿ”ฅ.

To limit the frequency of OSPF traps, the following additional mechanisms are suggested ๐Ÿซถ.

4.3. Ignoring Initial Activity

Okay so most of the critical events happen when OSPF gets turned on on a router ๐ŸŒˆ. That's when the designated router gets elected and neighbor adjacencies get formed. During this initial period, a flood of traps would be unnecessary since the events are totally expected ๐Ÿ™ˆ. To avoid unnecessary traps, a router should not originate expected OSPF interface related traps until two of that interface's dead timer intervals have elapsed. The expected OSPF interface traps are ospfIfStateChange, ospfVirtIfStateChange, ospfNbrStateChange, ospfVirtNbrStateChange, ospfTxRetranmit and ospfVirtIfTxRetransmit. Additionally, ospfMaxAgeLsa and ospfOriginateLsa traps should not be originated until two dead timer intervals have elapsed, where the dead timer interval used should be the dead timer with the smallest value โณ.

4.4. Throttling Traps

The mechanism for throttling the traps is similar to the mechanism explained in RFC 1224 [11], section 5 ๐Ÿงš. The basic idea is that there is a sliding window in seconds and an upper bound on the number of traps that may be generated within this window. Unlike RFC 1224, traps are not sent to inform the network manager that the throttling mechanism has kicked in ๐Ÿ™…โ€โ™€๏ธ.

A single window should be used to throttle all OSPF trap types, except for the ospfLsdbOverflow and the ospfLsdbApproachingOverflow trap, which should not be throttled ๐Ÿ‘‘. For example, if the window time is 3, the upper bound is 3, and the events that would cause trap types 1,3,5 and 7 occur within a 3 second period, the type 7 trap should not be generated ๐Ÿ’€.

Appropriate values are 7 traps with a window time of 10 seconds โœจ.

4.5. One Trap Per OSPF Event

Several of the traps defined in section 5 are generated as the result of finding an unusual condition while parsing an OSPF packet or while processing a timer event ๐Ÿ“. There may be more than one unusual condition detected while handling the event. For example, a link-state update packet may contain several retransmitted link-state advertisements (LSAs), or a retransmitted database description packet may contain several database description entries. To limit the number of traps and variables, OSPF should generate at most one trap per OSPF event ๐Ÿ’…. Only the variables associated with the first unusual condition should be included with the trap. Similarly, if more than one type of unusual condition is encountered while parsing the packet, only the first event will generate a trap ๐Ÿ˜ญ.

4.6. Polling Event Counters ๐Ÿ’–

okay so lots of the tables in the OSPF MIB have these generalized event counters ๐Ÿ“Š and bestie, the traps we just talked about in this section are how you get the juicy specifics ๐Ÿ” A network manager can poll those counters and then turn on a specific OSPF trap once a particular counter starts climbing weirdly ๐Ÿšจ that's the move ๐Ÿ’…

Here's the tea on how the event counters line up with the trap types from section 5 ๐Ÿฆ‹

         Counter32                   Trap Type
  -----------------------   ------------------------
  ospfOriginateNewLsas       ospfOriginateLsa
  ospfIfEvents               ospfIfStateChange
                             ospfConfigError
                             ospfIfAuthFailure
                             ospfRxBadPacket
                             ospfTxRetransmit
  ospfVirtIfEvents           ospfVirtIfStateChange
                             ospfVirtIfConfigError
                             ospfVirtIfAuthFailure
                             ospfVirtIfRxBadPacket
                             ospfVirtIfTxRetransmit
  ospfNbrEvents              ospfNbrStateChange
  ospfVirtNbrEvents          ospfVirtNbrStateChange
  ospfExternLSACount         ospfLsdbApproachingOverflow
  ospfExternLSACount         ospfLsdbOverflow

5. OSPF Trap Definitions ๐ŸŽ€

okay the MIB module is next and it's giving full main character energy ๐Ÿ‘‘ here it is, copied exactly ๐Ÿซถ

OSPF-TRAP-MIB DEFINITIONS ::= BEGIN

    IMPORTS
            MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, IpAddress
                FROM SNMPv2-SMI
            MODULE-COMPLIANCE, OBJECT-GROUP
                FROM SNMPv2-CONF
            ospfRouterId, ospfIfIpAddress, ospfAddressLessIf, ospfIfState,
            ospfVirtIfAreaId, ospfVirtIfNeighbor, ospfVirtIfState,
            ospfNbrIpAddr, ospfNbrAddressLessIndex, ospfNbrRtrId,
            ospfNbrState, ospfVirtNbrArea, ospfVirtNbrRtrId, ospfVirtNbrState,
            ospfLsdbType, ospfLsdbLsid, ospfLsdbRouterId, ospfLsdbAreaId,
            ospfExtLsdbLimit, ospf
                FROM OSPF-MIB;

    ospfTrap MODULE-IDENTITY
           LAST-UPDATED "9501201225Z" -- Fri Jan 20 12:25:50 PST 1995
           ORGANIZATION "IETF OSPF Working Group"
           CONTACT-INFO
           "                      Fred Baker
           Postal:                Cisco Systems
                                  519 Lado Drive
                                  Santa Barbara, California 93111
           Tel:                   +1 805 681 0115
           E-Mail:                fred@cisco.com

                                  Rob Coltun
           Postal:                RainbowBridge Communications
           Tel:                   (301) 340-9416
           E-Mail:                rcoltun@rainbow-bridge.com"
       DESCRIPTION
          "The MIB module to describe traps for  the  OSPF
          Version 2 Protocol."
      ::= { ospf 16 }

-- Trap Support Objects

--         The following are support objects for the OSPF traps.

ospfTrapControl OBJECT IDENTIFIER ::= { ospfTrap 1 }
ospfTraps OBJECT IDENTIFIER ::= { ospfTrap 2 }

    ospfSetTrap OBJECT-TYPE
        SYNTAX   OCTET STRING (SIZE(4))
        MAX-ACCESS   read-write
        STATUS   current
        DESCRIPTION
           "A four-octet string serving as a bit  map  for
           the trap events defined by the OSPF traps. This
           object is used to enable and  disable  specific
           OSPF   traps   where  a  1  in  the  bit  field
           represents enabled.  The right-most bit  (least
           significant) represents trap 0."
       ::= { ospfTrapControl 1 }


    ospfConfigErrorType OBJECT-TYPE
        SYNTAX   INTEGER   {
                    badVersion (1),
                    areaMismatch (2),
                    unknownNbmaNbr (3), -- Router is Dr eligible
                    unknownVirtualNbr (4),
                    authTypeMismatch(5),
                    authFailure (6),
                    netMaskMismatch (7),
                    helloIntervalMismatch (8),
                    deadIntervalMismatch (9),
                    optionMismatch (10) }
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "Potential types  of  configuration  conflicts.
           Used  by the ospfConfigError and ospfConfigVir-
           tError traps."
   ::= { ospfTrapControl 2 }


    ospfPacketType OBJECT-TYPE
        SYNTAX   INTEGER   {
                    hello (1),
                    dbDescript (2),
                    lsReq (3),
                    lsUpdate (4),
                    lsAck (5) }
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION

           "OSPF packet types."
   ::= { ospfTrapControl 3 }


    ospfPacketSrc OBJECT-TYPE
        SYNTAX   IpAddress
        MAX-ACCESS   read-only
        STATUS   current
        DESCRIPTION
           "The IP address of an inbound packet that  can-
           not be identified by a neighbor instance."
       ::= { ospfTrapControl 4 }

5. OSPF Trap Definitions (keep going) ๐Ÿ“ฃ

okay so this is where the router actually yells at you ๐Ÿ“ฃ these are the trap definitions, and each one is a little alarm for something happening in OSPF. the MIB text is code, so it stays word-for-word in the blocks below ๐Ÿ’…

Interface State Change ๐Ÿฆ‹

ospfIfStateChange fires when a non-virtual interface changes state. it's for when the state goes backwards (like Dr to Down) or lands on a final state like Point-to-Point, DR Other, Dr, or Backup โœจ

-- Traps


    ospfIfStateChange NOTIFICATION-TYPE
        OBJECTS {
                    ospfRouterId, -- The originator of the trap
                    ospfIfIpAddress,
                    ospfAddressLessIf,
                    ospfIfState   -- The new state
                  }
        STATUS             current
        DESCRIPTION
           "An ospfIfStateChange trap signifies that there
           has been a change in the state of a non-virtual
           OSPF interface. This trap should  be  generated
           when  the interface state regresses (e.g., goes
           from Dr to Down) or progresses  to  a  terminal
           state  (i.e.,  Point-to-Point, DR Other, Dr, or
           Backup)."
   ::= { ospfTraps 16 }

Virtual Interface State Change ๐ŸŒธ

ospfVirtIfStateChange is the same energy, but for virtual interfaces. it covers regressing (like Point-to-Point going to Down) and progressing to Point-to-Point. the description text says "ospfIfStateChange" in it, which is kept exactly as written ๐Ÿ™ˆ

    ospfVirtIfStateChange NOTIFICATION-TYPE
        OBJECTS {
                    ospfRouterId, -- The originator of the trap
                    ospfVirtIfAreaId,
                    ospfVirtIfNeighbor,
                    ospfVirtIfState  -- The new state
                  }
        STATUS             current
        DESCRIPTION
           "An ospfIfStateChange trap signifies that there
           has  been a change in the state of an OSPF vir-
           tual interface.

           This trap should be generated when  the  inter-
           face  state  regresses  (e.g., goes from Point-
           to-Point to Down) or progresses to  a  terminal
           state (i.e., Point-to-Point)."
   ::= { ospfTraps 1 }

Neighbor State Change ๐Ÿ’œ

ospfNbrStateChange is about neighbors on non-virtual interfaces. it fires when a neighbor goes backwards (Attempt or Full down to 1-Way or Down) or moves forward to 2-Way or Full. on non-broadcast multi-access and broadcast networks, the designated router is the one that sends it. and if a DR goes to Down, that gets reported by ospfIfStateChange instead ๐Ÿซถ

    ospfNbrStateChange NOTIFICATION-TYPE
        OBJECTS {
                    ospfRouterId, -- The originator of the trap
                    ospfNbrIpAddr,
                    ospfNbrAddressLessIndex,
                    ospfNbrRtrId,
                    ospfNbrState  -- The new state
                  }
        STATUS             current
        DESCRIPTION
           "An  ospfNbrStateChange  trap  signifies   that
           there  has been a change in the state of a non-
           virtual OSPF neighbor.   This  trap  should  be
           generated  when  the  neighbor  state regresses
           (e.g., goes from Attempt or Full  to  1-Way  or
           Down)  or progresses to a terminal state (e.g.,
           2-Way or Full).  When an  neighbor  transitions
           from  or  to Full on non-broadcast multi-access
           and broadcast networks, the trap should be gen-
           erated  by the designated router.  A designated
           router transitioning to Down will be  noted  by
           ospfIfStateChange."
   ::= { ospfTraps 2 }

Virtual Neighbor State Change ๐Ÿงš

ospfVirtNbrStateChange is the virtual version. it fires when the neighbor regresses (Attempt or Full down to 1-Way or Down) or progresses to Full โœจ

    ospfVirtNbrStateChange NOTIFICATION-TYPE
        OBJECTS {
                    ospfRouterId, -- The originator of the trap
                    ospfVirtNbrArea,
                    ospfVirtNbrRtrId,
                    ospfVirtNbrState  -- The new state
                  }
        STATUS             current
        DESCRIPTION
           "An ospfIfStateChange trap signifies that there
           has  been a change in the state of an OSPF vir-
           tual neighbor.  This trap should  be  generated
           when  the  neighbor state regresses (e.g., goes
           from Attempt or  Full  to  1-Way  or  Down)  or
           progresses to a terminal state (e.g., Full)."
   ::= { ospfTraps 3 }

Interface Config Error ๐ŸŽ€

ospfIfConfigError is for when a packet shows up on a non-virtual interface from a router whose config parameters clash with yours. the option mismatch event only triggers this trap if it actually stops an adjacency from forming ๐Ÿ™…โ€โ™€๏ธ

    ospfIfConfigError NOTIFICATION-TYPE
        OBJECTS {
                    ospfRouterId, -- The originator of the trap
                    ospfIfIpAddress,
                    ospfAddressLessIf,
                    ospfPacketSrc,  -- The source IP address
                    ospfConfigErrorType, -- Type of error
                    ospfPacketType
                  }
        STATUS             current
        DESCRIPTION
           "An ospfIfConfigError  trap  signifies  that  a
           packet  has  been received on a non-virtual in-
           terface  from  a  router  whose   configuration
           parameters  conflict  with this router's confi-
           guration parameters.  Note that the  event  op-
           tionMismatch  should  cause  a  trap only if it
           prevents an adjacency from forming."
                  ::= { ospfTraps 4 }

Virtual Interface Config Error ๐ŸŒท

ospfVirtIfConfigError is the virtual-interface cousin. same rule: a packet from a router with conflicting config, and optionMismatch only counts if it blocks the adjacency ๐Ÿ’…

    ospfVirtIfConfigError NOTIFICATION-TYPE
        OBJECTS {
                    ospfRouterId, -- The originator of the trap
                    ospfVirtIfAreaId,
                    ospfVirtIfNeighbor,
                    ospfConfigErrorType, -- Type of error
                    ospfPacketType
                  }
        STATUS             current
        DESCRIPTION
           "An ospfConfigError trap signifies that a pack-
           et  has  been  received  on a virtual interface
           from a router  whose  configuration  parameters
           conflict   with   this  router's  configuration
           parameters.  Note that the event optionMismatch
           should  cause a trap only if it prevents an ad-
           jacency from forming."
   ::= { ospfTraps 5 }

Interface Auth Failure ๐Ÿ”

ospfIfAuthFailure fires when a packet arrives on a non-virtual interface from a router whose authentication key or authentication type doesn't match yours ๐Ÿšจ

    ospfIfAuthFailure NOTIFICATION-TYPE
        OBJECTS {
                    ospfRouterId, -- The originator of the trap
                    ospfIfIpAddress,
                    ospfAddressLessIf,
                    ospfPacketSrc,  -- The source IP address
                    ospfConfigErrorType, -- authTypeMismatch or

                                         -- authFailure
                    ospfPacketType
                  }
        STATUS             current
        DESCRIPTION
           "An ospfIfAuthFailure  trap  signifies  that  a
           packet  has  been received on a non-virtual in-
           terface from a router whose authentication key
           or  authentication  type  conflicts  with  this
           router's authentication key  or  authentication
           type."
   ::= { ospfTraps 6 }

Virtual Interface Auth Failure ๐Ÿฆ„

ospfVirtIfAuthFailure is the same auth drama, but on a virtual interface โœจ

    ospfVirtIfAuthFailure NOTIFICATION-TYPE
        OBJECTS {
                    ospfRouterId, -- The originator of the trap
                    ospfVirtIfAreaId,
                    ospfVirtIfNeighbor,
                    ospfConfigErrorType, -- authTypeMismatch or
                                         -- authFailure
                    ospfPacketType
                  }
        STATUS             current
        DESCRIPTION
           "An ospfVirtIfAuthFailure trap signifies that a
           packet has been received on a virtual interface
           from a router whose authentication key  or  au-
           thentication  type conflicts with this router's
           authentication key or authentication type."
   ::= { ospfTraps 7 }

Interface Rx Bad Packet ๐Ÿ—‘๏ธ

ospfIfRxBadPacket fires when an OSPF packet comes in on a non-virtual interface and can't be parsed ๐Ÿ™ƒ

    ospfIfRxBadPacket NOTIFICATION-TYPE
        OBJECTS {
                    ospfRouterId, -- The originator of the trap
                    ospfIfIpAddress,
                    ospfAddressLessIf,
                    ospfPacketSrc,  -- The source IP address
                    ospfPacketType
                  }
        STATUS             current
        DESCRIPTION
           "An ospfIfRxBadPacket trap  signifies  that  an
           OSPF  packet has been received on a non-virtual
           interface that cannot be parsed."
   ::= { ospfTraps 8 }

Virtual Interface Rx Bad Packet ๐Ÿฆ‹

ospfVirtIfRxBadPacket is the virtual-interface version of the unparseable-packet alarm ๐Ÿ’™

    ospfVirtIfRxBadPacket NOTIFICATION-TYPE
        OBJECTS {
                    ospfRouterId, -- The originator of the trap
                    ospfVirtIfAreaId,
                    ospfVirtIfNeighbor,
                    ospfPacketType
                  }
        STATUS             current
        DESCRIPTION
           "An ospfRxBadPacket trap signifies that an OSPF
           packet has been received on a virtual interface
           that cannot be parsed."
   ::= { ospfTraps 9 }

Tx Retransmit ๐Ÿ”

ospfTxRetransmit fires when an OSPF packet gets retransmitted on a non-virtual interface. every packet that could be retransmitted is tied to an LSDB entry, and the LS type, LS ID, and Router ID are how you find that entry ๐Ÿ”

    ospfTxRetransmit NOTIFICATION-TYPE
        OBJECTS {
                    ospfRouterId, -- The originator of the trap
                    ospfIfIpAddress,
                    ospfAddressLessIf,
                    ospfNbrRtrId, -- Destination
                    ospfPacketType,
                    ospfLsdbType,
                    ospfLsdbLsid,
                    ospfLsdbRouterId
                  }
        STATUS             current
        DESCRIPTION
           "An ospfTxRetransmit  trap  signifies  than  an
           OSPF  packet  has  been retransmitted on a non-
           virtual interface.  All packets that may be re-
           transmitted  are associated with an LSDB entry.
           The LS type, LS ID, and Router ID are  used  to
           identify the LSDB entry."
   ::= { ospfTraps 10 }

Virtual Tx Retransmit ๐ŸŒˆ

ospfVirtIfTxRetransmit is the retransmit trap for virtual interfaces. same LSDB-entry lookup, just on a virtual link ๐Ÿ’ซ

    ospfVirtIfTxRetransmit NOTIFICATION-TYPE
        OBJECTS {
                    ospfRouterId, -- The originator of the trap
                    ospfVirtIfAreaId,
                    ospfVirtIfNeighbor,
                    ospfPacketType,
                    ospfLsdbType,
                    ospfLsdbLsid,
                    ospfLsdbRouterId
                  }
        STATUS             current
        DESCRIPTION
           "An ospfTxRetransmit  trap  signifies  than  an
           OSPF packet has been retransmitted on a virtual
           interface.  All packets that may be retransmit-
           ted  are  associated with an LSDB entry. The LS
           type, LS ID, and Router ID are used to identify
           the LSDB entry."
   ::= { ospfTraps 11 }

Originate LSA ๐ŸŒŸ

ospfOriginateLsa fires when this router originates a new LSA. it does not fire for simple refreshes (those happen every 30 minutes), only when an LSA gets (re)originated because of a topology change. and LSAs being flushed because they hit MaxAge aren't included either ๐Ÿ™…โ€โ™€๏ธ

    ospfOriginateLsa NOTIFICATION-TYPE
        OBJECTS {
                    ospfRouterId, -- The originator of the trap
                    ospfLsdbAreaId,  -- 0.0.0.0 for AS Externals
                    ospfLsdbType,
                    ospfLsdbLsid,
                    ospfLsdbRouterId
                  }
        STATUS             current
        DESCRIPTION
           "An ospfOriginateLsa trap signifies that a  new
           LSA  has  been originated by this router.  This
           trap should not be invoked for simple refreshes
           of  LSAs  (which happesn every 30 minutes), but
           instead will only be invoked  when  an  LSA  is
           (re)originated due to a topology change.  Addi-
           tionally, this trap does not include LSAs  that
           are  being  flushed  because  they have reached
           MaxAge."
   ::= { ospfTraps 12 }

MaxAge LSA โฐ

ospfMaxAgeLsa fires when one of the LSAs in the router's link-state database has aged out to MaxAge ๐Ÿ•ฐ๏ธ

    ospfMaxAgeLsa NOTIFICATION-TYPE
        OBJECTS {
                    ospfRouterId, -- The originator of the trap
                    ospfLsdbAreaId,  -- 0.0.0.0 for AS Externals
                    ospfLsdbType,
                    ospfLsdbLsid,
                    ospfLsdbRouterId
                  }
        STATUS             current
        DESCRIPTION
           "An ospfMaxAgeLsa trap signifies  that  one  of
           the LSA in the router's link-state database has
           aged to MaxAge."
   ::= { ospfTraps 13 }

LSDB Overflow ๐Ÿšจ

ospfLsdbOverflow fires when the number of LSAs in the router's link-state database goes past ospfExtLsdbLimit ๐Ÿ˜ฑ

    ospfLsdbOverflow NOTIFICATION-TYPE
        OBJECTS {
                    ospfRouterId, -- The originator of the trap
                    ospfExtLsdbLimit
                  }
        STATUS             current
        DESCRIPTION
           "An ospfLsdbOverflow trap  signifies  that  the
           number of LSAs in the router's link-state data-
           base has exceeded ospfExtLsdbLimit."
   ::= { ospfTraps 14 }

LSDB Approaching Overflow ๐Ÿซฃ

ospfLsdbApproachingOverflow is the early warning. it fires when the number of LSAs in the link-state database goes past ninety percent of ospfExtLsdbLimit ๐Ÿ“

    ospfLsdbApproachingOverflow NOTIFICATION-TYPE
        OBJECTS {
                    ospfRouterId, -- The originator of the trap
                    ospfExtLsdbLimit
                  }
        STATUS             current
        DESCRIPTION
           "An ospfLsdbApproachingOverflow trap  signifies
           that  the  number of LSAs in the router's link-
           state database has exceeded ninety  percent  of
           ospfExtLsdbLimit."
   ::= { ospfTraps 15 }

Trap Conformance ๐ŸŽ€

okay the last bit is the conformance info. this just sets up the trap conformance branch and its groups and compliances, so the MIB knows where to file everything ๐Ÿ—‚๏ธ

-- conformance information

ospfTrapConformance OBJECT IDENTIFIER ::= { ospfTrap 3 }

ospfTrapGroups      OBJECT IDENTIFIER ::= { ospfTrapConformance 1 }
ospfTrapCompliances OBJECT IDENTIFIER ::= { ospfTrapConformance 2 }
-- compliance statements

    ospfTrapCompliance MODULE-COMPLIANCE
        STATUS  current
        DESCRIPTION
           "The compliance statement "
       MODULE  -- this module
       MANDATORY-GROUPS { ospfTrapControlGroup }


        GROUP       ospfTrapControlGroup
        DESCRIPTION
           "This group is optional but recommended for all
           OSPF systems"

       ::= { ospfTrapCompliances 1 }


-- units of conformance

    ospfTrapControlGroup    OBJECT-GROUP
        OBJECTS {
                           ospfSetTrap,
                           ospfConfigErrorType,
                           ospfPacketType,
                           ospfPacketSrc
        }
        STATUS  current
        DESCRIPTION
           "These objects are required  to  control  traps
           from OSPF systems."
       ::= { ospfTrapGroups 1 }


END

6. Acknowledgements ๐ŸŽ€

This doc was cooked up by the OSPF Working Group ๐Ÿ’…๐ŸŒธ

7. References ๐Ÿ“š

  • [1] Cerf, V., "IAB Recommendations for the Development of Internet Network Management Standards", RFC 1052, NRI, April 1988.
  • [2] Cerf, V., "Report of the Second Ad Hoc Network Management Review Group", RFC 1109, NRI, August 1989.
  • [3] Rose M., and K. McCloghrie, "Structure and Identification of Management Information for TCP/IP-based internets", STD 16, RFC 1155, Performance Systems International, Hughes LAN Systems, May 1990.
  • [4] McCloghrie K., and M. Rose, "Management Information Base for Network Management of TCP/IP-based internets", RFC 1156, Hughes LAN Systems, Performance Systems International, May 1990.
  • [5] Case, J., Fedor, M., Schoffstall, M., and J. Davin, "Simple Network Management Protocol", STD 15, RFC 1157, SNMP Research, Performance Systems International, Performance Systems International, MIT Laboratory for Computer Science, May 1990.
  • [6] Rose M., Editor, "Management Information Base for Network Management of TCP/IP-based internets: MIB-II", STD 17, RFC 1213, Performance Systems International, March 1991.
  • [7] Information processing systems - Open Systems Interconnection - Specification of Abstract Syntax Notation One (ASN.1), International Organization for Standardization, International Standard 8824, December 1987.
  • [8] Information processing systems - Open Systems Interconnection - Specification of Basic Encoding Rules for Abstract Notation One (ASN.1), International Organization for Standardization, International Standard 8825, December 1987.
  • [9] Rose, M., and K. McCloghrie, Editors, "Concise MIB Definitions", STD 16, RFC 1212, Performance Systems International, Hughes LAN Systems, March 1991.
  • [10] Rose, M., Editor, "A Convention for Defining Traps for use with the SNMP", RFC 1215, Performance Systems International, March 1991.
  • [11] Steinberg, L., "Techniques for Managing Asynchronously Generated Alerts", RFC 1224, IBM Corporation, May 1991.
  • [12] Moy, J., "Multicast Extensions to OSPF", RFC 1584, Proteon, Inc., September 1993.

8. Security Considerations ๐Ÿšจ

Security issues are not discussed in this memo. ๐Ÿ’€ Be careful out there, bestie, and keep your eyes open for anything the memo doesn't cover. ๐Ÿ™ˆ

9. Authors' Addresses ๐Ÿ’Œ

Fred Baker
cisco Systems, Inc.
519 Lado Drive
Santa Barbara, CA 93111

Phone: (805) 681-0115
EMail: fred@cisco.com


Rob Coltun
RainbowBridge Communications

Phone: (301) 340-9416
EMail: rcoltun@rainbow-bridge.com
๐Ÿ“ฆ where this page comes from