Appendix D. Required Statistics
An OSPF implementation must provide a minimum set of statistics indicating the operational state of the protocol. These statistics must be accessible to the user; this will probably be accomplished through some sort of network management interface.
It is hoped that these statistics will aid in the debugging of the implementation, and in the analysis of the protocol's performance.
The statistics can be broken into two broad categories. The first consists of what we will call logging messages. These are messages produced in real time, with generally a single message produced as the result of a single protocol event. Such messages are also commonly referred to as traps.
The second category will be referred to as cumulative statistics. These are counters whose value have collected over time, such as the count of link state retransmissions over the last hour. Also falling into this category are dumps of the various routing data structures.
D.1. Logging messages
A logging message should be produced on every significant protocol event. The major events are listed below. Most of these events indicate a topological change in the routing domain. However, some number of logging messages can be expected even when the routing domain remains intact for long periods of time. For example, link state originations will still happen due to the link state refresh timer firing.
Any of the messages that refer to link state advertisements should print the area associated with the advertisement. There is no area associated with AS external link advertisements.
The following list of logging messages indicate topological changes in the routing domain:
T1 The state of a router interface changes. Interface state changes are documented in Section 9.3. In general, they will cause new link state advertisements to be originated. The logging message produced should include the interface's IP address (or other name), interface type (virtual link, etc.) and old and new state values (as documented in Section 9.1). T2 The state of a neighbor changes. Neighbor state changes are documented in Section 10.3. The logging message produced should include the neighbor IP address, and old and new state values.
T3 The (Backup) Designated Router has changed on one of the attached networks. See Section 9.4. The logging message produced should include the network IP address, and the old and new (Backup) Designated Routers.
T4 The router is originating a new instance of a link state advertisement. The logging message produced should indicate the LS type, Link State ID and Advertising Router associated with the advertisement (see Section 12.4).
T5 The router has received a new instance of a link state advertisement. The router receives these in Link State Update packets. This will cause recalculation of the routing table. The logging message produced should indicate the advertisement's LS type, Link State ID and Advertising Router. The message should also include the neighbor from whom the advertisement was received.
T6 An entry in the routing table has changed (see Section 11). The logging message produced should indicate the Destination type, Destination ID, and the old and new paths to the destination.
The following logging messages may indicate that there is a network configuration error:
C1 A received OSPF packet is rejected due to errors in its IP/OSPF header. The reasons for rejection are documented in Section 8.2. They include OSPF checksum failure, authentication failure, and inability to match the source with an active OSPF neighbor. The logging message produced should include the IP source and destination addresses, the router ID in the OSPF header, and the reason for the rejection.
C2 An incoming Hello packet is rejected due to mismatches between the Hello's parameters and those configured for the receiving interface (see Section 10.5). This indicates a configuration problem on the attached network. The logging message should include the Hello's source, the receiving interface, and the non-matching parameters.
C3 An incoming Database Description packet, Link State Request Packet, Link State Acknowledgment Packet or Link State Update packet is rejected due to the source neighbor being in the wrong state (see Sections 10.6, 10.7, 13.7 , and 13 respectively). This can be normal when the identity of the network's Designated Router changes, causing momentary disagreements over the validity of adjacencies. The logging message should include the source neighbor, its state, and the packet's type.
C4 A Database Description packet has been retransmitted. This may mean that the value of RxmtInterval that has been configured for the associated interface is too small. The logging message should include the neighbor to whom the packet is being sent.
The following messages can be caused by packet transmission errors, or software errors in an OSPF implementation:
E1 The checksum in a received link state advertisement is incorrect. The advertisement is discarded (see Section 13). The logging message should include the advertisement's LS type, Link State ID and Advertising Router (which may be incorrect). The message should also include the neighbor from whom the advertisement was received.
E2 During the aging process, it is discovered that one of the link state advertisements in the database has an incorrect checksum. This indicates memory corruption or a software error in the router itself. The router should be dumped and restarted.
The following messages are an indication that a router has restarted, losing track of its previous LS sequence number. Should these messages continue, it may indicate the presence of duplicate Router IDs:
R1 Two link state advertisements have been seen, whose LS type, Link State ID, Advertising Router and LS sequence number are the same, yet with differing LS checksums. These are considered to be different instances of the same advertisement. The instance with the larger checksum is accepted as more recent (see Section 12.1.7, 13.1). The logging message should include the LS type, Link State ID, Advertising Router, LS sequence number and the two differing checksums.
R2 Two link state advertisements have been seen, whose LS type, Link State ID, Advertising Router, LS sequence number and LS checksum are the same, yet can be distinguished by their LS age fields. This means that one of the advertisement's LS age is MaxAge, or the two LS age fields differ by more than MaxAgeDiff. The logging message should include the LS type, Link State ID, Advertising Router, LS sequence number and the two differing ages. R3 The router has received an instance of one of its self-originated advertisements, that is considered to be more recent. This forces the router to originate a new advertisement (see Section 13.4). The logging message should include the advertisement's LS type, Link State ID, and Advertising Router along with the neighbor from whom the advertisement was received.
R4 An acknowledgment has been received for an instance of an advertisement that is not currently contained in the router's database (see Section 13.7). The logging message should detail the instance being acknowledged and the database copy (if any), along with the neighbor from whom the acknowledgment was received.
R5 An advertisement has been received through the flooding procedure that is LESS recent the the router's current database copy (see Section 13). The logging message should include the received advertisement's LS type, Link State ID, Advertising Router, LS sequence number, LS age and LS checksum. Also, the message should display the neighbor from whom the advertisement was received.
The following messages are indication of normal, yet infrequent protocol events. These messages will help in the interpretation of some of the above messages:
N1 The Link state refresh timer has fired for one of the router's self-originated advertisements (see Section 12.4). A new instance of the advertisement must be originated. The message should include the advertisement's LS type, Link State ID and Advertising Router.
N2 One of the advertisements in the router's link state database has aged to MaxAge (see Section 14). At this point, the advertisement is no longer included in the routing table calculation, and is reflooded. The message should list the advertisement's LS type, Link State ID and Advertising Router.
N3 An advertisement of age MaxAge has been flushed from the router's database. This occurs after the advertisement has been acknowledged by all adjacent neighbors. The message should list the advertisement's LS type, Link State ID and Advertising Router.
D.2. Cumulative statistics
These statistics display collections of the routing data structures. They should be able to be obtained interactively, through some kind of network management facility. All the following statistics displays, with the exception of the area list, routing table and the AS external links, are specific to a single area. As noted in Section 4, most OSPF protocol mechanisms work on each area separately.
The following statistics displays should be available:
- A list of all the areas attached to the router, along with the authentication type to use for the area, the number of router interfaces attaching to the area, and the total number of nets and routers belonging to the area. For example, consider the router RT3 pictured in Figure 15. It has interfaces to two separate areas, Area 1 and the backbone (Area 0). Table 20 then indicates that the backbone is using a simple password for authentication, and that Area 1 is not using any authentication. The number of nets includes IP networks, subnets, and hosts (this is the reason for 2 backbone nets -- they are the host routes corresponding to the serial line between backbone routers RT6 and RT10).
Area ID # ifcs AuType # nets # routers
______________________________________________
0 1 1 2 7
1 2 0 4 4
Table 20: Sample OSPF area display.
- A list of all the router's interfaces to an area, along with their addresses, output cost, current state, the (Backup) Designated Router for the attached network, and the number of neighbors currently associated with the interface. Some number of these neighbors will have become adjacent, the number of these is noted in the display also. Again consider router RT3 in Figure 15. Table 21 below indicates that RT4 has been selected as Designated Router for network N3, and router RT1 has been selected as Backup. Adjacencies have been established to both of these routers. There are no routers besides RT3 attached to network N4, so it becomes DR, yet still advertises the network as a stub in its router links advertisements.
Ifc IP address state cost DR Backup # nbrs # adjs
__________________________________________________________________________
192.1.1.3 DR other 1 192.1.1.4 192.1.1.1 3 2
192.1.4.3 DR 2 192.1.4.3 none 0 0
Table 21: Sample OSPF interface display.
- The list of neighbors associated with a particular interface. Each neighbor's IP address, router ID, state, and the length of the three link state advertisement queues (see Section 10) to the neighbor is displayed. Suppose router RT4 is the Designated Router for network N3, and router RT1 is the Backup Designated router. Suppose also that the adjacency between router RT3 and RT1 has not yet fully formed. The display of router RT3's neighbors (associated with its interface to network N3) may then look like Table 22. The display indicates that RT3 and RT1 are still in the database exchange procedure, Router RT3 has more Database Description packets to send to RT1, and RT1 has at least one link state advertisement that RT3 doesn't. Also, there is a single link state advertisement that has been flooded, but not acknowledged, to each neighbor that participates in the flooding procedure (state >= Exchng). (In the following examples we assume that a router's Router ID is assigned to be its smallest IP interface address).
Nbr IP address Router ID state LS rxmt len DB summ len LS req len
____________________________________________________________________________
192.1.1.1 192.1.1.1 Exchng 1 10 1
192.1.1.2 192.1.1.2 2-Way 0 0 0
192.1.1.4 192.1.1.4 Full 1 0 0
Table 22: Sample OSPF neighbor display.
- A list of the area's link state database. This is the same in all of the routers attached to the area. It is composed of that area's router links, network links, and summary links advertisements. Also, the AS external link advertisements are a part of all the areas' databases. The link state database for Area 1 in Figure 15 might look like Table 23 (compare this with Figure 7). Assume the the Designated Router for network N3 is router RT4, as above. Both routers RT3 and RT4 are originating summary link advertisements into Area 1, since they are area border routers. Routers RT5 and RT7 are AS external routers. Their location must be described in summary links advertisements. Also, their AS external link advertisements are flooded throughout the entire AS. Router RT3 can locate its self-originated advertisements by looking for its own router ID (192.1.1.3) in advertisements' Advertising Router fields. The LS sequence number, LS age, and LS checksum fields indicate the advertisement's instance. Their values are stored in the advertisement's link state header; we have not bothered to make up values for the example.
LS type Link State ID Advertising Router LS seq no LS age LS checksum
_______________________________________________________________________________
1 192.1.1.1 192.1.1.1 * * *
1 192.1.1.2 192.1.1.2 * * *
1 192.1.1.3 192.1.1.3 * * *
1 192.1.1.4 192.1.1.4 * * *
_______________________________________________________________________________
2 192.1.1.4 192.1.1.4 * * *
_______________________________________________________________________________
3 Ia,Ib 192.1.1.3 * * *
3 N6 192.1.1.3 * * *
3 N7 192.1.1.3 * * *
3 N8 192.1.1.3 * * *
3 N9-N11,H1 192.1.1.3 * * *
3 Ia,Ib 192.1.1.4 * * *
3 N6 192.1.1.4 * * *
3 N7 192.1.1.4 * * *
3 N8 192.1.1.4 * * *
3 N9-N11,H1 192.1.1.4 * * *
4 RT5 192.1.1.3 * * *
4 RT7 192.1.1.3 * * *
4 RT5 192.1.1.4 * * *
4 RT7 192.1.1.4 * * *
_______________________________________________________________________________
4 N12 RT5's ID * * *
4 N13 RT5's ID * * *
4 N14 RT5's ID * * *
4 N12 RT7's ID * * *
LS type Link State ID Advertising Router LS seq no LS age LS checksum
_______________________________________________________________________________
4 N15 RT7's ID * * *
Table 23: Sample OSPF link state database display.
- The contents of any particular link state advertisement. For example, a listing of the router links advertisement for Area 1, with LS type = 1 and Link State ID = 192.1.1.3 is shown in Section 12.4.1.
- A listing of the entire routing table. Several examples are shown in Section 11. The routing table is calculated from the combined databases of each attached area (see Section 16). It may be desirable to sort the routing table by Type of Service, or by destination, or a combination of the two.