Skip to main content

What is a MAC address?

A MAC address (Media Access Control address) is a unique physical address of a network interface, used to identify a device on data link layer (L2) networks, primarily Ethernet and Wi-Fi.

Short wording for an interview:

A MAC address is a 48-bit unique identifier of a network card, used by switches to deliver frames within a local network.

It is assigned to the network interface (NIC).


The format and structure of a MAC address

A MAC address consists of 48 bits, written as 6 bytes in hexadecimal form:

Examples:

00:1A:2B:3C:4D:5E A4-B1-C1-09-3F-77 001A.2B3C.4D5E

Groups of 2 hex characters: that is 1 byte.


The structure of a MAC address

A MAC address is divided into two parts:

1. OUI (Organizationally Unique Identifier)

The first 3 bytes (24 bits): the network device manufacturer.

Examples:

  • Intel: 00:1B:21
  • Cisco: 00:1A:A2
  • Apple: F0:18:98
  • Xiaomi: 70:11:24

2. NIC-specific / Device ID

The last 3 bytes: a unique device number assigned by the manufacturer.


What types of MAC addresses exist

1. Unicast MAC

A regular individual address. Used to deliver a frame to a specific device.

2. Multicast MAC

Starts with 01:00:5E (for IPv4 multicast) Used for group delivery.

3. Broadcast MAC

Address:

FF:FF:FF:FF:FF:FF

Received by all devices in the subnet.


Where a MAC address is used

1. Switches

A switch creates a MAC address table and forwards frames according to it:

  • knows which MAC is behind which port
  • sends the frame only where it is needed (unicast)

2. ARP (Address Resolution Protocol)

ARP maps an IP address → a MAC address That is: "whoever has this IP, gets it by MAC."

3. Wi-Fi and Ethernet

Any data transmission on a LAN uses MAC addresses.


MAC vs IP: key differences

CriterionMACIP
LayerL2L3
PurposeIdentifying a device on the local networkRouting between networks
Format48 bits, hexIPv4: 32 bits, IPv6: 128 bits
Assigned byThe manufacturerThe administrator / DHCP
ChangesUsually noYes

IP is needed for moving data between networks (routing), MAC: for transmitting frames within one network (switching).


Can a MAC address be changed?

Yes, on many devices the MAC can be:

  • spoofed
  • temporarily replaced in the driver
  • changed in the OS (Linux, Windows, macOS)

But the factory MAC remains in the NIC's firmware.


Where to look up a MAC address

Windows

ipconfig /all

Linux / macOS

ip link show

On routers: in the web interface or in the CLI.


Important properties of a MAC address

  • Unique within the local network
  • The switch learns MACs from frames (learning)
  • Not used by routers to forward packets
  • Mandatory in Ethernet and Wi-Fi
  • The size of the Ethernet frame depends on the MAC addresses in the header

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.