☼
⌃
☰

Media Access Control Address

Table of Contents

Media Access Control Address

A MAC address (Media Access Control address) is a unique identifier assigned to network interfaces for communication on the physical network segment.

It operates at the Data Link Layer (Layer 2) of the OSI model.

MAC addresses are used to ensure that data is directed to the correct device within a local network.

Format of a MAC Address

  • Length: A MAC address is 48 bits long, typically represented as 12 Hexadecimal digits.
  • Representation: MAC addresses are usually written in one of the following formats:
    • 00:1A:2B:3C:4D:5E (colon-separated)
    • 001A.2B3C.4D5E (dot-separated)
    • 00-1A-2B-3C-4D-5E (hyphen-separated)
  • Structure:
    • First 24 bits: The first half of a MAC address is the Organizationally Unique Identifier (OUI), assigned to the manufacturer of the network device.
    • Last 24 bits: The second half is a unique identifier assigned by the manufacturer to the specific device.

Types of MAC Addresses

  • Unicast: A MAC address that identifies a single network interface. Unicast addresses are used to send data to one specific device on the network.
  • Multicast: A MAC address that identifies a group of devices. Devices that share a multicast MAC address can receive the same frame.
  • Broadcast: A MAC address that targets all devices on the network segment (FF:FF:FF:FF:FF:FF). Frames sent to this address are received by every device in the broadcast domain.

Key Features

  • Hardware Address: MAC addresses are embedded into the hardware (specifically the Network Interface Card, or NIC) by the manufacturer, making them generally fixed and unique to each device.
  • Local Significance: MAC addresses are used for communication within the same local network segment (Layer 2) and are not used for routing across networks (Layer 3).
  • Permanent Addressing: Although MAC addresses are hardware-based, they can be changed or "spoofed" by software in certain circumstances.

MAC Address Vs IP Address

  • Layer: MAC addresses function at Layer 2 (Layer 2).
  • Scope: MAC addresses are used for communication within the local ​network, while IP addresses enable communication across different networks.
  • Uniqueness: MAC addresses are globally unique, assigned by manufacturers, while IP addresses are typically assigned by network administrators or via DHCP.

Use Cases

  • Ethernet Networks: MAC addresses are essential for devices to communicate within Ethernet networks.
  • ARP (Address Resolution Protocol): Address Resolution Protocol maps IP addresses to MAC addresses to facilitate communication between Layer 2 and Layer 3.
  • Security: MAC addresses are sometimes used in security measures like MAC filtering, where only devices with specific MAC addresses can access the network.

MAC Address Spoofing

MAC addresses can be spoofed or changed through software.

This practice can be used for legitimate purposes, such as testing network security or bypassing MAC-based access controls, but it can also be used for malicious intent, such as impersonating another device.