• Post author:Bhaskar Soni
  • Post published:
  • Post category:Networking
  • Post comments:0 Comments
  • Reading time:3 mins read

A MAC (Media Access Control) address is a hardware identifier assigned to a network interface. Switches use it to deliver frames to the right device on a local network. This guide explains the MAC address format, the main MAC address types, how it differs from an IP address and how privacy features change it.

MAC address types

Why we need MAC addresses

IP addresses get data to the right network. Once data arrives on the local network, however, devices communicate in frames at layer 2, and frames are addressed by MAC address. A switch learns which MAC address sits on which port and forwards frames only where needed.

MAC address format

A MAC address is 48 bits long, usually written as six pairs of hexadecimal digits:

  • 00:1A:2B:3C:4D:5E (Linux and macOS style)
  • 00-1A-2B-3C-4D-5E (Windows style)
  • 001A.2B3C.4D5E (Cisco style)
MAC address format: OUI and device-specific part

The first three bytes form the OUI (Organizationally Unique Identifier), which identifies the manufacturer. The last three bytes are assigned by the manufacturer to each interface.

Two bits in the first byte have special meaning:

  • The I/G bit shows whether the address is individual (unicast) or group (multicast).
  • The U/L bit shows whether the address is universally administered (set by the manufacturer) or locally administered (set by software).

Types of MAC addresses

TypeMeaningExample
UnicastOne specific interface00:1A:2B:3C:4D:5E
MulticastA group of interfaces01:00:5E:xx:xx:xx for IPv4 multicast
BroadcastEvery device on the local networkFF:FF:FF:FF:FF:FF

Frames sent to the broadcast address reach every device in the same broadcast domain or VLAN. ARP requests, for example, use broadcast.

MAC address vs IP address

MAC addressIP address
OSI layerLayer 2 (data link)Layer 3 (network)
Length48 bits32 bits (IPv4) or 128 bits (IPv6)
ScopeLocal network onlyEnd-to-end across networks
Assigned byManufacturer or OSDHCP or administrator
Changes when moving networks?Usually notYes

ARP links the two in IPv4: it finds the MAC address that belongs to an IP address on the local network. IPv6 uses Neighbor Discovery for the same job. See IPv4 and IPv6 explained.

How to find your MAC address

  • Windows: ipconfig /all or getmac.
  • Linux: ip link.
  • macOS: ifconfig or System Settings > Network.
  • Cisco switch: show mac address-table lists learned addresses.

MAC randomisation

To protect privacy, modern phones and laptops use a random MAC address for each Wi-Fi network. Therefore, network teams cannot always rely on MAC addresses to identify devices, for example in DHCP reservations or captive portals.

MAC addresses and security

  • MAC spoofing: attackers can change their MAC address easily, so MAC filtering alone is weak security.
  • MAC flooding: attackers fill a switch’s MAC table so it floods traffic; port security limits addresses per port.
  • ARP spoofing: attackers send fake ARP replies to intercept traffic; Dynamic ARP Inspection helps prevent it.

For switch protection, see network switch configuration.

Sources

Need help with network security? We test routers, firewalls, ACLs and segmentation as part of our VAPT services and hardening audits. Contact us for a quote.

Post author avatar

Bhaskar Soni

Bhaskar Soni is a Security Engineer and the founder of Youngster Company, based in Ahmedabad, Gujarat. He works hands-on with Linux server hardening, vulnerability assessment and penetration testing (VAPT), ISO 27001 compliance and OSINT investigations. He writes practical, tested guides for IT professionals and Indian businesses, and every article on this site is written or reviewed by him.

Leave a Reply