OSPF packet formats

OSPF packets are directly encapsulated into IP packets. OSPF uses the IP protocol number 89. The format of an OSPF LSU packet is shown in Figure 24.

Figure 24: OSPF packet format

OSPF packet header

OSPF packets are classified into five types that have the same packet header.

Figure 25: OSPF packet header

Major fields of the OSPF packet header are as follows:


[NOTE: ]

NOTE:

MD5 authentication data is added following an OSPF packet rather than contained in the Authentication field.


Hello packet

A router sends hello packets periodically to find and maintain neighbor relationships, and to elect the DR or BDR, including information about values of timers, DR, BDR, and neighbors that are already known.

Figure 26: Hello packet format

Major fields of the hello packet are as follows:

DD packet

Two routers exchange database description (DD) packets, describing their LSDBs for database synchronization. A DD packet contains only the headers of LSAs to reduce traffic.

Figure 27: DD packet format

Major fields of the DD packets are as follows:

LSR packet

After exchanging DD packets, two routers know which LSAs of the peer are missing from the local LSDB. Then, they send (link state request) LSR packets to request the missing LSAs. An LSR packet contains the brief of the missing LSAs.

Figure 28: LSR packet format

Major fields of the LSR packets are as follows:

LSU packet

LSU (Link State Update) packets are used to send the requested LSAs to the peer. Each packet carries a collection of LSAs.

Figure 29: LSU packet format

LSAck packet

Link State Acknowledgment (LSAck) packets are used to acknowledge received LSU packets. An LSAack packet carries the headers of LSAs to be acknowledged.

Figure 30: LSAck packet format

LSA header format

All LSAs have the same header.

Figure 31: LSA header format

Major fields of the LSA header are as follows:

LSAs formats

Figure 32: Router LSA format

Major fields of the Router LSA are as follows:

Figure 33: Network LSA format

Major fields of the Network LSA are as follows:

Figure 34: Summary LSA format

Major fields of the Summary LSA are as follows:


[NOTE: ]

NOTE:

A Type-3 LSA can be used to advertise a default route if the link state ID and network mask are set to 0.0.0.0.


Figure 35: AS external LSA format

Major fields of the AS external LSA are as follows:

Figure 36: NSSA external LSA format