What is a MAC address?
A MAC address (Media Access Control address) is a unique hardware address of a network device, used at the data link layer (L2) to deliver data within a local network.
Put simply: A MAC address is the "physical address" of a network card, by which devices find each other on the same network.
Why a MAC address is needed
A MAC address is needed to:
- understand who the frame is intended for
- deliver data from one device to another within a LAN
- let the switch know which port to send the frame to
Without MAC addresses the data link layer could not deliver data by address.
What a MAC address looks like
A MAC address is usually:
- length: 48 bits (6 bytes)
- written in hexadecimal form
Example:
00:1A:2B:3C:4D:5E
or
00-1A-2B-3C-4D-5E
What a MAC address consists of
A MAC address is logically split into two parts:
1. The first 3 bytes: the OUI
- the manufacturer identifier
- shows which company made the device
2. The last 3 bytes: a unique number
- assigned by the manufacturer
- unique within that OUI
As a result, a MAC address is unique worldwide (under normal circumstances).
Where a MAC address is used
A MAC address:
- is used in Ethernet and Wi-Fi frames
- works only within a single local network
- is not passed through routers (each segment gets a new frame)
Important points for an interview
- A MAC address:
- belongs to the data link layer
- does not replace an IP address
- MAC:
- is used for delivering frames
- IP is for routing between networks
Can a MAC address be changed?
Yes.
- in software (MAC spoofing)
- often used for testing, privacy, or bypassing restrictions
But:
- the factory MAC address is still "burned into" the device
Simple analogy
A house in a residential complex:
- the MAC address is the apartment number
- the IP address is the city's postal address
Short version for an interview
A MAC address is a unique hardware address of a network interface, used at the data link layer to deliver frames between devices on a single local network.
Short Answer
Interview readyA concise answer to help you respond confidently on this topic during an interview.