MAC Address (Media Access Control Address) Basics
The MAC Address is a physical address used to identify a device in network communication. It is a key identifier used at the Data Link Layer (Layer 2) of the previously discussed OSI 7-Layer Model.
1. Structure and Characteristics of a MAC Address
① Structure: 48-bit Hexadecimal
A MAC address consists of 48 bits and is usually represented in hexadecimal notation. It is typically divided into six octets (two-digit groups) separated by colons (:) or hyphens (-).
- Notation Example:
00:1A:2B:3C:4D:5Eor00-1A-2B-3C-4D-5E
② OUI and Unique Identifier
The 48 bits are divided into two main parts:
- OUI (Organizationally Unique Identifier): The first 24 bits. A unique code assigned by the IEEE to the manufacturer of the network card (NIC).
- Unique Identifier: The last 24 bits. A serial number assigned by the manufacturer to the specific NIC.
This structure guarantees the global uniqueness of every MAC address.
③ Physical Address
A MAC address is burned-in to the hardware itself and remains constant unless the Network Interface Card (NIC) is changed. (While software-based changes, or Spoofing, are possible, the fundamental address is fixed).
2. Role of the MAC Address
The MAC address operates at the Data Link Layer (Layer 2) and is primarily used for communication between devices within the same network segment (Local Area Network, LAN).
- Frame Delivery: When encapsulating a data packet (Layer 3) into an Ethernet Frame (Layer 2), the MAC address of the source and destination are included to ensure the data is correctly delivered to the adjacent switch or router.
- ARP (Address Resolution Protocol): Used to translate a Layer 3 IP address into a Layer 2 MAC address.
3. IP Address vs. MAC Address (Comparison)
Both MAC and IP addresses identify devices, but they serve different purposes and operate at different layers.
| Feature | MAC Address | IP Address (IPv4/IPv6) |
|---|---|---|
| Layer | Data Link Layer (Layer 2) | Network Layer (Layer 3) |
| Nature | Physical Address (Hardware Address) | Logical Address (Logical Address) |
| Uniqueness | Globally unique (Assigned by Manufacturer) | Can change based on network environment (Assigned by Administrator/DHCP) |
| Scope | Primarily within the Local Area Network (LAN) | Across the Wide Area Network (WAN) and the entire Internet |