Understanding MAC Addresses: Layer 2 Fundamentals
A MAC address is a 48-bit hardware address burned into a network interface card (NIC), used for local delivery of frames on a Layer 2 network.
What is a MAC Address?
A **Media Access Control (MAC) address** is a physical hardware address used at Layer 2 (Data Link Layer) of the OSI model. It is 48 bits long and usually represented in hexadecimal format (e.g., 00:1A:2B:3C:4D:5E). It guarantees unique identification for devices on a local network segment.
Structure of a MAC Address
The 48-bit MAC address is divided into two halves. The first 24 bits represent the **Organizationally Unique Identifier (OUI)**, which identifies the hardware manufacturer (like Cisco, Intel, or Apple). The last 24 bits are uniquely assigned by the manufacturer to the specific NIC.
How Switches Use MAC Addresses
Layer 2 switches build a **MAC Address Table** by inspecting the source MAC addresses of incoming frames. When a switch receives a frame, it looks at the destination MAC address and forwards the frame only out of the specific port associated with that MAC, reducing collisions.
❓ Frequently Asked Questions
Can a MAC address be changed?
While physically burned into the NIC, software can temporarily 'spoof' or change the MAC address presented to the network.
What is the broadcast MAC address?
The broadcast MAC address is all Fs: FF:FF:FF:FF:FF:FF.
Does a router use MAC addresses?
Yes, routers use MAC addresses to forward frames locally, but they rewrite the source and destination MACs at every hop.