In computer networking, MAC addressing and ARP (Address Resolution Protocol) work together to enable communication within a local network (LAN). While IP addresses operate at the Network Layer (Layer 3), MAC addresses function at the Data Link Layer (Layer 2) and are essential for physical device identification.
A MAC (Media Access Control) address is a unique 48-bit hardware identifier assigned to a network interface card (NIC) by the manufacturer.
Example: 00:1A:2B:3C:4D:5E (6 hexadecimal byte pairs)
| Section | Meaning |
|---|---|
| First 3 Bytes | OUI (Organizationally Unique Identifier – Manufacturer ID) |
| Last 3 Bytes | NIC-specific value (unique to the device) |
FF:FF:FF:FF:FF:FF (sent to all devices on LAN)ARP maps IP addresses to MAC addresses within a local network. It helps devices discover each other when only IP info is known.
192.168.1.5)| Field | Description |
|---|---|
| Hardware Type | Usually Ethernet (1) |
| Protocol Type | IPv4 (0x0800) |
| Operation | 1 = Request, 2 = Reply |
| Sender MAC | MAC of sender |
| Sender IP | IP of sender |
| Target MAC | MAC of target (0 in request) |
| Target IP | IP of target |
| Command | Platform | Description |
|---|---|---|
arp -a |
Windows | Show ARP table |
ip neighbour |
Linux | Display neighbor/ARP cache |
arp -d <IP> |
Windows | Delete ARP entry manually |
ip neigh flush all |
Linux | Clear ARP cache |
| Issue | Description |
|---|---|
| ARP Spoofing | Attacker sends false ARP replies to reroute traffic |
| Man-in-the-Middle | Exploiting ARP to intercept communication |
| Defense | Use Static ARP, Dynamic ARP Inspection (DAI), Switch Port Security |
| Feature | MAC Address | IP Address |
|---|---|---|
| Layer | Layer 2 (Data Link) | Layer 3 (Network) |
| Format | 48-bit Hex (e.g., 00:1A:2B:3C) |
32-bit or 128-bit (IPv4/IPv6) |
| Assigned by | Manufacturer | Admin / DHCP |
| Scope | Local Network | Internetwork (global) |
| Static/Dynamic | Usually static | Often dynamic |
💡 MAC addresses uniquely identify devices on a local link, while ARP bridges the gap between Layer 2 (MAC) and Layer 3 (IP), enabling seamless LAN communication.