Suggest an editImprove this articleRefine the answer for “What is a MAC address?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**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. **Key point:** it is a 48-bit identifier that switches use to deliver frames within a local network.Shown above the full answer for quick recall.Answer (EN)Image**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 | Criterion | MAC | IP | |---|---|---| | Layer | L2 | L3 | | Purpose | Identifying a device on the local network | Routing between networks | | Format | 48 bits, hex | IPv4: 32 bits, IPv6: 128 bits | | Assigned by | The manufacturer | The administrator / DHCP | | Changes | Usually no | Yes | 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 headerFor the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.