5

A TCP/UDP header (Layer 4) lists the Source Port, then the Destination Port:

TCP and UDP Header

An IP header (Layer 3) lists the Source IP, then the Destination IP:

IPv4 Header

An Ethernet header (L2) and a WiFi Header (L2) lists the Destination MAC then the Source MAC:

Ethernet and WiFi Header

My question

Is there a reason for the switching of the Source and Destination in the L2 headers? If so, what is the reason?

5

The roots of the two technologies just are not really related.

When Bob Metcalfe, et al. were creating ethernet, they were not working with Vint Cerf, et al. who were creating IP. These were two completely separate efforts. When ethernet was created, it was not at all clear that IP would become dominant, and ethernet was just one of several LAN technologies that was vying for attention. IP didn't get on ethernet for a relatively long period of time because IP was originally connecting universities across the country using WAN technologies.

Eventually, the market forces preferred the two technologies, and they ended up the dominant technologies in their respective niches, but, although they were both conceived (1970s) and born around the same time period (ethernet in 1980, and RFC 791 in 1981), they actually didn't have much to do with each other until the 1990s, and they are still maintained by completely separate standards organizations.

  • 1
    One important aspect to the L2 ordering with the destination MAC first is the lower latency to read bits earlier in the frame and perform cut through switching. The order is less important in higher layer protocols. – generalnetworkerror Jan 10 '16 at 5:21
  • @generalnetworkerror I doubt cut through switching was a motivation when Ethernet was defined, but ease of filtering received packets at the NIC may well have been. – Peter Green Oct 31 '18 at 17:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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