OSPF Packet Formats Routing TCP IP

The OSPF packet consists of multiple encapsulations, and deconstructing one is like peeling an onion. As shown in Figure 9.46, the outside of the onion is the IP header. Cisco’s maximum OSPF packet size is 1500 octets. Encapsulated within the IP header is one of five OSPF packet types. Each packet type begins with an OSPF packet header, whose format is the same for all packet types. The OSPF packet data following the header varies according to the packet type. Each packet type will have a number of type-specific fields, followed by more data. The data contained in a Hello packet will be a list of neighbors. LS Request packets will contain a series of fields describing the requested LSAs. LS Update packets will contain a list of LSAs, as shown in Figure 9.46. These LSAs in turn have their own headers and type-specific data fields. Database Description and LS Acknowledgment packets will contain a list of LSA headers.

Figure 9.46. An OSPF packet is composed of a series of encapsulations.

Figure 9.46. An OSPF packet is composed of a series of encapsulations.

Note that OSPF packets are exchanged only between neighbors on a network. They are never routed beyond the network on which they originate.

Figure 9.47 shows an analyzer capture of an IP header for a packet carrying OSPF data, indicated by the protocol number of 89. OSPF packets are sent with a TTL of 1, as can be seen here. Since an OSPF packet should never be routed past an immediate neighbor, setting the TTL to 1 helps to ensure that the packet never travels more than a single hop. Some routers run processes that prioritize packets according to the Precedence bits (Weighted Fair Queuing and Weighted Random Early Detection, for example). OSPF sets the Precedence bits to Internetwork Control (110b), as shown in Figure 9.47, so that these processes will give a high priority to OSPF packets.

Continue reading here: The Packet Header

Was this article helpful?