100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace

What is a MAC Address?

Learn what a MAC address is, its format, how switches use it, and how it differs from an IP address — with networking interview Q&A.

easyQ8 of 224 in Computer Networks Est. time: 5 minsLast updated:
Open Code Lab

Expected Interview Answer

A MAC (Media Access Control) address is a 48-bit hardware identifier burned into a network interface card by its manufacturer, used to identify a device uniquely on a local network segment at the Data Link layer (Layer 2).

A MAC address is written as six pairs of hexadecimal digits (e.g., 00:1A:2B:3C:4D:5E), where the first three pairs identify the manufacturer (the OUI) and the rest identify the specific device. Unlike an IP address, which can change as a device moves networks, a MAC address is tied to the physical interface and is used for local delivery — switches use MAC addresses to forward Ethernet frames to the correct port within a LAN. When communication needs to cross networks, IP addresses handle routing while MAC addresses handle the final local hop, resolved through ARP. Some devices support MAC randomization for privacy, which temporarily overrides the burned-in address.

  • Uniquely identifies a network interface at Layer 2
  • Lets switches forward frames to the correct local port
  • Stable identifier tied to hardware, unlike a reassignable IP
  • Enables local delivery resolved via ARP alongside IP routing

AI Mentor Explanation

A MAC address is like the serial number engraved on a specific bat by its manufacturer — it identifies that exact piece of equipment regardless of which ground it is used on, unlike the player’s jersey number which can be reassigned season to season. A kit manager scanning the bat’s serial number to hand it to the right player mirrors a switch reading a MAC address to deliver a frame to the right port. The bat’s identity never changes even if the player’s team does.

Step-by-Step Explanation

  1. Step 1

    Manufacture

    A MAC address is burned into the network interface card at the factory, with a vendor-specific OUI prefix.

  2. Step 2

    Local identification

    Devices on the same LAN use MAC addresses to identify each other at Layer 2.

  3. Step 3

    Frame forwarding

    A switch learns which MAC address sits on which port and forwards Ethernet frames accordingly.

  4. Step 4

    ARP resolution

    When only an IP address is known, ARP resolves it to the corresponding MAC address for local delivery.

What Interviewer Expects

  • Correct definition: Layer 2, hardware-tied, 48-bit identifier
  • Knows the format (six hex octet pairs) and OUI prefix
  • Distinguishes MAC (local, Layer 2) from IP (routable, Layer 3)
  • Understands switches use MAC addresses to forward frames

Common Mistakes

  • Confusing a MAC address with an IP address
  • Thinking MAC addresses are used for internet-wide routing
  • Not knowing ARP is what resolves IP to MAC locally
  • Assuming a MAC address can never be spoofed or randomized

Best Answer (HR Friendly)

A MAC address is like a permanent hardware serial number for your device’s network card — it is set by the manufacturer and used to identify your device on the local network, such as your home Wi-Fi or office LAN. It is different from an IP address, which can change; the MAC address stays tied to the physical hardware.

Code Example

Viewing and looking up MAC addresses
# Show this machine's MAC addresses (Linux)
ip link show

# Example output:
# eth0: link/ether 00:1a:2b:3c:4d:5e brd ff:ff:ff:ff:ff:ff

# View the ARP table mapping local IPs to MAC addresses
arp -a

Follow-up Questions

  • What is ARP and how does it relate to MAC addresses?
  • What is a switch’s MAC address table and how does it learn entries?
  • What is MAC address spoofing and why is it a security concern?
  • How does MAC randomization affect Wi-Fi privacy?

MCQ Practice

1. At which OSI layer does a MAC address operate?

MAC addresses are Data Link layer (Layer 2) identifiers used for local frame delivery.

2. How many bits make up a standard MAC address?

A MAC address is 48 bits, written as six hexadecimal octet pairs.

3. What protocol resolves an IP address to a MAC address on a LAN?

ARP (Address Resolution Protocol) maps a known IP address to its corresponding MAC address.

Flash Cards

What is a MAC address?A 48-bit hardware identifier burned into a network interface, used at Layer 2.

MAC address format?Six hexadecimal octet pairs, e.g. 00:1A:2B:3C:4D:5E.

MAC vs IP address?MAC is a fixed hardware ID for local delivery; IP is a routable, reassignable address.

What resolves IP to MAC?ARP (Address Resolution Protocol) on the local network.

1 / 4

Continue Learning