Skip to main content

Why IP address when MAC exists

Short answer

MAC addresses are flat, local, and not routable; IP addresses are hierarchical and identify a host's position across networks. Routers need IP prefixes to aggregate routes, while ARP maps IP to MAC for the final local delivery.

Though we have MAC address, why do we use IP address to represent the host in networks? Explain your answer.

A MAC address identifies a network interface on one local link, while an IP address identifies the host's position in the whole internetwork. Both are needed because MAC addresses cannot be used for routing.

  1. Flat, no hierarchy. A MAC address (48 bits) is burned in by the manufacturer and has no information about location. A router would need one entry for every host in the world. An IP address has a network part and a host part, so one entry covers a whole network.
  2. Local scope only. MAC addresses are used only inside one LAN segment; at every hop a router removes the old frame header and builds a new frame with new MAC addresses.
  3. Independent of technology. Networks use Ethernet, Wi-Fi, PPP, etc., which have different address formats. IP gives one uniform logical address.
  4. Mobility and replacement. If a NIC is replaced, the MAC address changes; if a host moves to another network, its MAC stays the same but its location changes. An IP address is assigned to match the network the host is on, so it can be changed as needed.
  5. Efficient routing and aggregation. IP prefixes (for example 192.168.1.0/24) can be summarised into larger blocks.

ARP maps IP to MAC for the last hop: IP finds the network, MAC delivers the frame inside it.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Networks and Security chapter 4 questions →