Mac – Why are Ethernet/MAC addresses needed

ethernetip addressmac addressnetworking

I don't understand why Ethernet MAC addresses are needed. Can't all computers just be connected to the unified network and use IP addresses to communicate?

For example, there is a following mechanism in the Ethernet:

  1. Computer with IP 192.168.1.1 (X.1) wants to send a packet to 192.168.1.2 (X.2)
  2. X.1 uses ARP to get the MAC of X.2
  3. To do so, X.1 needs to send a packet to all computers in the network; only one will answer
  4. X.1 gets a MAC and sends the packet

Wouldn't it be simpler just to do just a one step:

  1. X.1 sends a packet to all computers in the network; only X.2 will process it, others will ignore it

The complementary question would be: Why are IP addresses needed, if all devices have unique MAC addresses?

Best Answer

The different networking layers are there to allow them to be swapped for different technologies.

The two layers you are talking about here are layers 2 and 3. Layer 2 in this scenario is Ethernet - from which MAC addresses arise, and Layer 3 is IP.

Ethernet only works at the local level, between network devices connected to a broadcast network "datalink", whereas IP is a routable protocol and so can target devices on remote networks.

The requirements of each of these are different. Ethernet specifies a family of technologies that allow packets to be sent and received between network devices, whereas IP defines a protocol that allow packets of data to traverse multiple networks.

Neither is reliant on the other, which is what give networking its flexibility. For example, you may choose to connect to your internet service using IP over ethernet, but in your internal network, you might choose to use IP over... paper. Where someone writes down the contents of each packet and physically walks it over to another machine and types it in. Clearly this would not be particularly fast, but it would still be IP provided the person carrying around the bits of paper respecting IP routing rules.

In the real world there are different datalink protocols that you are already using two different ones (although their addressing schemes are the same): 802.3 - ethernet, and 802.11 - wifi.

IP doesn't care what the underlying layer is.

Equally, IP can be swapped out for different network layer protocols (provided it happens for all participants). Such as ATM.

While there is nothing directly preventing the creation of a protocol that encompasses both layer 2 and layer 3, it would be less flexible, and so less attractive, and so unlikely to be used.