Skip to content

Latest commit

 

History

History
82 lines (60 loc) · 3.52 KB

File metadata and controls

82 lines (60 loc) · 3.52 KB

Understanding MAC Addresses

1. What is a MAC Address?

A MAC address (Media Access Control address) is like the serial number of your network card.
Every device that connects to a network your phone, laptop, printer, or router has one.

It lives at the data link layer (Layer 2) of the OSI model and is used to identify devices inside a local network (LAN).
Think of it as the "name tag" your device wears when talking to other devices on the same network.


2. Structure of a MAC Address

A MAC address is 48 bits long (6 bytes) and is usually written as six pairs of hexadecimal numbers.

Common Formats

Notation Example
Standard (colon) 00:1A:2B:3C:4D:5E
Windows (hyphen) 00-1A-2B-3C-4D-5E
Cisco (dot) 001A.2B3C.4D5E

Breaking It Down

  • OUI (Organizationally Unique Identifier): The first 3 bytes (00:1A:2B) → identifies the manufacturer.
  • Device Identifier: The last 3 bytes (3C:4D:5E) → unique to the device.

👉 Example: If the OUI is registered to Apple, then the device is likely an iPhone, MacBook, or another Apple product.


3. Special Types of MAC Addresses

Not all MAC addresses are unique device IDs some are special-purpose:

Type Address Meaning
Broadcast FF:FF:FF:FF:FF:FF Sent to all devices on the local network. Example: ARP request "Who has 192.168.1.10?"
Multicast 01:00:5E:xx:xx:xx Sent to a group of devices (e.g., streaming video to multiple clients).
Unicast Any normal MAC Sent directly to one device.

4. Why Do We Need MAC Addresses?

  • Local Communication: Within a LAN, devices don’t talk directly using IP addresses they use MAC addresses.
  • ARP Resolution: When you type ping 192.168.1.5, your computer asks, “Which MAC address belongs to this IP?” via ARP.
  • Network Security: Some Wi-Fi networks use MAC filtering to allow/deny specific devices.
  • Switching: Ethernet switches learn which MAC addresses live on which ports to forward traffic efficiently.

5. MAC Address in Action (Example)

Imagine Host A wants to send data to Host B in the same LAN:

  1. Host A knows Host B’s IP but not its MAC.
  2. Host A sends a broadcast ARP request to FF:FF:FF:FF:FF:FF.
  3. Host B replies with its MAC address.
  4. Host A now sends frames directly to Host B using its MAC.

6. MAC Address Spoofing

Although MAC addresses are "burned" into hardware, many operating systems let you change (spoof) them.

Why spoof?

  • To bypass MAC-based access control.
  • To impersonate another device on the network.
  • For privacy (hide your real device identity when connecting to Wi-Fi).

⚠️ Important: Because spoofing is possible, MAC addresses shouldn’t be trusted as the only security measure.


7. Key Takeaways

  • A MAC address is a unique hardware identifier for devices on a local network.
  • It’s 48 bits long, written in hexadecimal notation.
  • There are special addresses like broadcast (FF:FF:FF:FF:FF:FF) and multicast.
  • It’s crucial for local communication, ARP, and switching.
  • Can be spoofed, so it’s useful but not foolproof for security.

8. Further Reading