Previous

Content

Next 


2.10.- OSPF Standard Header

 
The OSPF standard header is depicted below:

Following with a brief field description:
Version # Set to 2, the version number of the protocol as documented in this specification.  

Packet Type

The type of the packet; i.e., Link-state Update or Hello Packet.
 

Packet Length

Total length, including the standard header.
 

Router ID

Router identification of the packet's originator.
 

Area ID

The OSPF area that the packet is being sent into.
 
Checksum
Standard IP 16-bit one's complement checksum of the entire packet, excluding the 64-bit authentication field.
 
AuType and Authentication
AuType indicates the type of authentication procedure in use. The 64-bit field is then used by the chosen authentication procedure.
 
Sending protocol packets
The IP destination address for the packet is selected as follows:
  1. On physical P2P networks, the IP-destination address (IP-dest) is always set to the addess AllSPFRouters.
     
  2. On all other network types (including VLs), the mayority of OSPF packets are sent unicast, i.e., directly to the other end of the adjacency. Then, the IP-dest is just the other end neighbor's IP address. The only packets not sent as unicast are on broadcast networks: in these cases we have:
     
     
    • Hello packets are sent to the multicast destination AllSPFRouters.
    • DR and BDR's link-state update and link-state ack packets are sent to the multicast destination AllSPFRouters.
    • All other router's link-state update and link-state ack packets are sent to the multicast address AllDRouters.
    • Retransmissions of link-state update packets are sent always directly to the neighbor.
     
The IP source address should be set to the IP address of the sending interface. On unnumbered P2P networks the IP source should be set to any of the other IP addresses belonging to the router. For this reason, there must be at least one IP address assigned to the router.
Receiving protocol packets
Whenever a protocol packet is received by the router it is marked with the interface it was received on.  In order for the packet to be accepted at the IP level, it must pass a number of tests, even before the packet is passed to OSPF for processing. The tests are:
  1. The IP checksum must be correct.
  2. The packet's IP destination address must be the IP address of the receiving interface, or one of the multicast addresses AllSPFRouters or AllDRouters.
  3. The IP protocol specified must be OSPF (#89).
  4. Locally originated packets should not be passed on to OSPF. Then, the source IP address should be examine to make sure this is not a multicast packet that the router itself generated.
 

Next, the OSPF packet header is verified. The fields in the header must match those configured for the receiving interface. If they do not, the packet should be discarded. Verifications are:
  1. The version number field must specify protocol version 2.
  2. The Area ID must either:
     
    1. Match the Area ID of the receiving interface. In this case, the packet has been sent over a single hop. Therefore, the packet's IP source address is required to be the same network as the receiving interface.
    2. Indicate the backbone. In this case, the packet has been sent over a virtual link. The receiving router must be an area border router, and the Router ID specified in the packet must be the other end of a configured virtual link.
     
  3. Packets whose IP destination is AllDRouters should only be accepted if the state of the receiving interface is DR or BDR.
  4. The AuType specified in the packet must match the AuType specified for the associated area.
  5. The packet must be authenticated.

If the packet type is Hello, it should then be further processed by the Hello protocol. All other packet types are sent/received only on adjacencies; i.e., must have been sent by one of the router's active neighbors. If the receiving interface connects to a broadcast network, P2MP network or NBMA network, the sender is identified by the IP source address found in the packet;s IP header. If the receiving interface connects to a P2P network or a virtual link, the sender is identified by the Router ID found in the packet's OSPF header.


   


Previous

Content

Next