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?

2 Answers 2


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. Commented Jan 10, 2016 at 5:21
  • 2
    @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. Commented Oct 31, 2018 at 17:30

I don't have a source for it, but I'm pretty sure that the Ethernet creators wanted to let hardware devices decide as soon as possible whether they wanted to receive a frame or not - remember that early Ethernet used a shared bus which means each frame is received by every node in the network and Ethernet has always been hardware-based.

The destination MAC in front also comes in handy for switching, but that was invented many years later than Ethernet.

In contrast, IP is a protocol that was conceived as running in software. A packet is "somehow" received (IP doesn't care) and only then it is processed by the IP stack. It simply doesn't matter where the destination address is located.

Of course, today a lot of IP processing goes on in hardware as well, but when it was designed that wasn't really imaginable.

  • I certainly remember discussing hardware switching algorithms for ethernet circa 1985, and we considered the destination-first ordering a distinct advantage for implementation in devices such as programmable array logic where each bit of storage was valuable. I'm sure the ethernet designers would have been conscious of any possibility of a benefit.
    – jonathanjo
    Commented Dec 18, 2019 at 19:57
  • 1
    @jonathanjo Are you sure that was 1985? The PALs and GALs back then would've filled quite a large board for a (small) switch. The first commercial switch came 1990 from Kalpana and it used modular ports that where similar to NICs.
    – Zac67
    Commented Dec 18, 2019 at 23:02
  • I had a pair of Kalpana switches that we bought before Cisco swallowed the company. They would do 10 Mbps full duplex, had VLANs, and I think it was three interfaces dedicated to channeling that I used to connect the switches to each other. If I remember correctly, each had 10 interfaces.
    – Ron Maupin
    Commented Dec 19, 2019 at 3:29
  • 1
    Can't say that I've worked with them but the very first switch was the EPS-700 I can't find a photo for. The successor EPS-1500's back can be seen here: edugeek.net/attachments/forums/general-chat/…
    – Zac67
    Commented Dec 19, 2019 at 8:03
  • 1
    @jonathanjo Very impressive, I made my first steps with TTL chips back then. ;-)
    – Zac67
    Commented Dec 19, 2019 at 13:58

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.