##
Ethernet, MAC & ARP
Layer 2 moves frames between devices on the same network using MAC addresses. Switches learn them; ARP maps them to IPs.
// Ethernet II frame
Dest MAC
6 B
Src MAC
6 B
Type / Len
2 B
Payload
46–1500 B
FCS
4 B
// MAC address anatomy — 48 bits
00:1A:2B
OUI · 24 bits · vendor
3C:4D:5E
NIC · 24 bits · device
The first byte carries two flags: I/G (bit 0 — unicast vs multicast) and U/L (bit 1 — global vs locally administered). 48 bits = 12 hex digits.
// key facts
- MAC = 48 bits: 24-bit OUI (vendor) + 24-bit device
- Broadcast MAC = FF:FF:FF:FF:FF:FF
- Switch learns source MACs into the CAM table
- Unknown unicast & broadcast are flooded out all ports
- ARP resolves IP → MAC (broadcast request, unicast reply)
- 1 switch port = 1 collision domain · 1 VLAN = 1 broadcast domain
// ARP — resolving IPv4 to MAC
“Who has 10.0.0.5? Tell 10.0.0.1”
▶ broadcast · FF:FF:FF:FF:FF:FF
“10.0.0.5 is at 00:1A:2B:3C:4D:5E”
◀ unicast reply
The mapping is cached in the ARP table for a few minutes. IPv6 has no ARP — it uses NDP (Neighbor Solicitation / Advertisement over ICMPv6).
! Cisco IOS — MAC & ARP tables
show mac address-table
show mac address-table dynamic
show ip arp
clear arp-cache
# Linux / host
ip neigh show # modern (replaces arp)
arp -a # classic, all platforms
ip -s neigh flush all # clear the cache