Why do we need MAC address? [duplicate]

I have read that if we are using NAT, router knows where to send the incoming packets in the local network based on TCP/UDP port information. If this information can be used to uniquely identify each machine on a local network, then why is MAC address needed?


You need to be able to identify a connection at all levels of the network stack.

The mac address ONLY identifies the LAN adapter in the ethernet layer (Layer 2 Simplified OSI model).
The IP address (TCP and/or UDP) ONLY works in the IP layer (Layer 3).

Not all communication using IP goes via ethernet. IP can be send over other Layer2 layers where there are no MAC-addresses.
And Ethernet can carry other Layer3 traffic, besides IP, which don't use IP-addresses at all.

In case of IP over ethernet you need BOTH identifiers, simply because both the layers involved require each their own ID system.


A MAC Address is a physical signature that exists on every hardware that can connect to a network. It is also always unique. It's basically a low level unique id for your network device.

Now, you cannot communicate knowing only the port information because multiple devices could listen/send to the same port.

It it the base of communication in a network! Since MAC addresses are unique, there are often used to limit access in wireless network for example.

You can read this if you want to understand a bit more : http://www.howtogeek.com/169540/what-exactly-is-a-mac-address-used-for/


MAC is required for a couple of reasons, the biggest of which is that IP addresses are not (necessarily) unique.

Before a computer has an IP address, it typically requests one on the network by using a service called DHCP. At this point, the computer sends a broadcast message to the entire network saying “Hey, I don't have an IP address. My unique identifier is <MAC>. Can a DHCP server assign me one so that I can communicate on the network?”

In addition to that, routers and switches use MAC address tables to figure out what devices lie on what ports. This is used to intelligently move packets to the right port. It’s easier to use MAC address than IP address because a network card can have more then one IP address assigned to it at once, so it’s more efficient to store the MAC instead.

There are other uses too. It’s often used as a unique identifier for licensing purposes, and as part of a random seed for entropy purposes.