I don't understand what is the need of IP address when each machine has it's own unique MAC address. Can't it be used to identify a node on a network uniquely without the need of IP address ?


IP addresses are explicitly not designed to be bound by hardware where as MAC addresses are. MAC addresses can be changed temporarily most of the time but each device is supposed to have a globally unique factory assigned MAC address.

Furthermore, MAC is specific to Ethernet, and while it is now the defacto Layer 2 encapsulation method, it wasn't always the case and you never know if something better will come along in the future.

Quite simply, it is a lot easier and very little overhead to do the same thing for people inside your network segment as outside your network segment.

Some other possible reasons:

  • You may want to use IP's to help remember what something is (the router ends with .1 kind of stuff)
  • You may want to run two networks on one segment that do not talk to each other (you can do that with IP via Subnets)
  • MAC addresses are not easy to remember.

MAC addresses are used to send Ethernet frames between two stations in the same local area network. Each station has a unique MAC address that is used to identify who is the sender (source address) and who is the receiver (destination address). But Ethernet frames can't travel between networks. One computer in a local network never sees the MAC of a computer which is on another network.

IP addresses are used to send IP packets to another station over the Internet, which is a collection of networks (hence the name "inter networks", from where Internet is derived). Contrary to MAC addresses, IP frames aren't limited to the local network. While travelling around the world, IP packets pass through many smaller networks, many of them using Ethernet (like inside your home or office LAN). When it is the case, the network stack puts the IP packet inside an Ethernet frame, using the MAC address to send to the next stop (what we call 'next hop'). The gateway strips the Ethernet header, rocering the original IP packet, and forwards it over the next network, until it reaches the destination.

References: https://superuser.com/questions/544155/why-do-we-need-ip-addresses-to-communicate-within-the-local-network-segment http://www.quora.com/What-is-the-difference-between-IP-address-and-MAC-address-and-how-they-are-used

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