4

When designing the OSPF protocol, the designers choose to place it on top of the IP layer but why isnt it used above the data link layer? what would be the drawbacks?

1
  • 1
    Likely, the most important reason was the decision to primarily use multicast - by using IP multicast, OSPF is more flexible to adapt to various data link layer protocols. However, historical trivia and homework are explicitly off topic here, see the help center.
    – Zac67
    Commented Sep 11, 2022 at 17:54

1 Answer 1

7

OSPF is an application that exchanges layer-3 routing information with its OSPF neighbors. To do that, it has its own transport protocol (protocol 89) that uses IP to communicate with its neighbors.

It all fits within the network stack. The OSPF application uses a layer-4 transport protocol that uses a layer-3 network protocol that uses whichever layer-2 data-link protocols are on the various layer-1 interfaces of a router.

Your idea would require OSPF to know about all the layer-2 data-link protocols, of which there are many (HDLC, PPP, frame relay, ATM, ethernet, token ring, FDDI, Wi-Fi, etc.), and there may be more in the future. The various data-link protocols use a variety of addressing (48-bit MAC, 64-bit MAC, DLCI, VPI/VCI, etc.) or no addressing (HDLC, PPP, etc.). Also, every OSPF router must know about all the routers and routes in its area. That requires layer-3 addressing for routers in the area that are not directly connected to the router because layer-2 addressing is not valid beyond the layer-2 domain, while an OSPF area may contain multiple layer-2 domains.

The point of the network stack is that it uses abstraction and encapsulation to hide details. OSPFv2 only needs to know about IPv4. When IPv6 was added, a new OSPF version was required. OSPFv3 only needs to know about IPv4 and IPv6. There are many data-link protocols, and they have changed over time, so we would have needed many different OSPF versions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.