Networking & IoT · Interview question

What's the difference between a MAC address and an IP address?

A strong answer

A MAC address is a 48-bit hardware address tied to a specific network interface, used by the Ethernet (Link, layer 2) layer for delivery within a single local network, it's flat (no hierarchy beyond the manufacturer OUI prefix) and normally fixed in the hardware. An IP address is a logical layer-3 address used to route between networks across the internet; it's hierarchical (network portion + host portion via the subnet mask) and is assigned by configuration or DHCP, so it can change as a device moves between networks. The two work together: to send a packet, the device uses the destination IP to decide where it's going (same subnet or via the gateway), then uses ARP to resolve the next hop's IP to a MAC address, and the frame is addressed to that MAC for the local hop, so across a multi-hop path the IP addresses stay end-to-end constant while the source/destination MACs change at every link. In short: MAC = local hardware delivery on one link, IP = end-to-end logical routing across networks.

What a weak answer sounds like

You know the answer. Do you know what gets you dinged?

Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.

From the lesson

Ethernet Basics

The dominant link layer: MAC addresses and frame format, the MAC-vs-PHY split (and how MCUs pair an on-chip MAC with an external PHY over RMII), and how switches forward by MAC.

More Ethernet Basics questions

Browse all 472 interview questions
What's the difference between a MAC address and an IP address? | EmbeddedPrep.io