What is the difference between a MAC address and an IP address?
EasyConceptNetwork Basics & Devices
Answer
A MAC (Media Access Control) address is a 48-bit hardware address assigned to a network interface by its manufacturer and used to deliver frames within one local network. An IP (Internet Protocol) address is a logical address assigned by software that identifies a host across networks and is used to route packets end to end.
- MAC addresses work at the data link layer (layer 2); IP addresses work at the network layer (layer 3).
- A MAC address is written as six hexadecimal pairs, such as
3C:22:FB:10:4A:07, and its first three bytes identify the manufacturer. An IPv4 address is written as four decimal numbers, such as192.168.1.10. - A MAC address normally stays the same wherever the device goes, while the IP address changes when the device joins a different network. ARP (Address Resolution Protocol) maps an IP address to a MAC address on the local network.
Example: Think of posting a parcel. The IP address is the final delivery address written on the parcel; it stays the same for the whole journey. The MAC address is like the name of the next courier hub the parcel is handed to, so it changes at every hop as each router forwards the packet inside a new frame.