Figure 276 OSPF packet format
IP header
OSPF packet header
OSPF packet header
OSPF packets are classified into five types that have the same packet header, as
shown below.
Figure 277 OSPF packet header
0
Version
Version: OSPF version number, which is 2 for OSPFv2.
■
Type: OSPF packet type from 1 to 5, corresponding with hello, DD, LSR, LSU
■
and LSAck respectively.
Packet length: Total length of the OSPF packet in bytes, including the header
■
Router ID: ID of the advertising router
■
Area ID: ID of the area where the advertising router resides
■
Checksum: Checksum of the message
■
Autype: Authentication type from 0 to 2, corresponding with
■
non-authentication, simple (plaintext) authentication and MD5 authentication
respectively.
Authentication: Information determined by authentication type, which is not
■
defined for authentication type 0, password information for authentication
type 1, information about Key ID, MD5 authentication data length and
sequence number for authentication type 2.
n
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 neighbors to find and maintain
neighbor relationships and to elect DR/BDR, including information about values of
timers, DR, BDR and neighbors already known. The format is shown below:
Number of LSAs
7
15
Type
Router ID
Area ID
Checksum
Authentication
Authentication
Introduction to OSPF
LSA header
LSA Data
Packet length
AuType
927
31