Networking handbook · Chapter 18

MAC addresses

A device sending to a server across a router usually places the router’s MAC address on its outgoing Ethernet frame. Understanding which recipient each address names prevents a common inventory and gateway configuration error.

In this guide13 sections

Introduction

A device sending to a server across a router usually places the router’s MAC address on its outgoing Ethernet frame. Understanding which recipient each address names prevents a common inventory and gateway configuration error.

Interpret a 48-bit identifier

Six octets become twelve hexadecimal digits. The address 02:00:00:00:00:2A has the same value as 0200.0000.002a. Keep the octets in their displayed order when moving between those formats.

In the first displayed octet, the low-order bit distinguishes an individual address (zero) from a group address (one). The next bit distinguishes globally administered (zero) from locally administered (one) under the conventional IEEE interpretation. FF:FF:FF:FF:FF:FF is the Ethernet broadcast destination.

Decide which neighbor to address

The IP routing decision comes first. For an on-link destination, the next hop is typically the destination itself. For a remote destination, the next hop is normally the chosen gateway. ARP can resolve an IPv4 next hop to its link address. IPv6 Neighbor Discovery serves the analogous purpose using ICMPv6.

A host neighbor cache maps a network-layer address to link-layer information for a neighbor. A switch forwarding database maps a learned MAC to a port in a bridging context. A valid entry in one table does not populate the other by definition.

Keep interface identity in context

MAC addresses generally apply within a link or bridged domain. At a routed boundary the forwarded packet gains a new link header, with the outgoing interface as source and the selected next hop as destination.

An interface may use a locally assigned address or change addresses under a privacy policy. A globally administered prefix can identify an allocation holder, but it is insufficient evidence of device model, ownership or user identity.

Diagram

  1. Host 192.0.2.26
  2. Gateway IP 192.0.2.1
  3. Resolve gateway MAC
  4. Frame to gateway · packet to server
The local frame names the next hop. The enclosed IPv4 packet names the remote server throughout this ordinary routed example.

Worked examples

Choose the MAC for an off-subnet server

  1. A host at 192.0.2.26/24 sends to 198.51.100.8. These addresses fall in different /24 blocks, and the host’s route selects 192.0.2.1.
  2. The host finds gateway 192.0.2.1 at 02:00:00:00:00:01. It writes that value into the frame destination while keeping 198.51.100.8 as the IP destination.
  3. The gateway receives and removes the local frame. On its next Ethernet link it constructs another frame for the next hop.

MAC Address Format Converter: Move an address from a switch table into an inventory

  1. Start with 0200.005e.1001. Joining the three groups gives the twelve digits 0200005e1001.
  2. Split those digits into octets: 02, 00, 00, 5e, 10 and 01. The colon form is 02:00:00:5e:10:01.
  3. Inspect the first octet, 02 = 00000010. Its least significant bit is zero (individual address). The next bit is one (locally administered).

Reference table

MAC addresses reference
First octetLow two bitsConventional interpretation
0000Individual, globally administered
0101Group, globally administered
0210Individual, locally administered
0311Group, locally administered

Configuration example

  • For a virtual appliance needing a fixed locally administered unicast address, allocate a unique value in its bridged domain and record the VLAN alongside it. Duplicate addresses can cause learning entries to move between ports.
  • For an off-subnet service, document the gateway IP as the neighbor dependency. Preserve the server’s own IP or DNS name separately in the application configuration.

Common mistakes

  • Searching the local ARP cache for every remote server when the local host resolves only its selected next hop.
  • Treating text case or punctuation differences as proof that two MACs belong to different interfaces.

Frequently asked questions

Is a multicast MAC the same as a broadcast MAC?

Both have the group bit set. Broadcast addresses all stations in the broadcast domain, while a multicast address identifies a group.

Can two separate LANs contain the same locally assigned MAC?

Yes, while their bridging domains remain separate. A future layer-two connection can bring them into conflict, so record allocation scope.

Does a MAC address identify a device everywhere on the internet?

No. MAC addresses are link-layer identifiers used on a local link. Routers remove and replace link headers as packets move between links.

What do the first-octet bits indicate?

The least significant bit of the first octet indicates individual versus group addressing, and the next bit indicates universally versus locally administered addressing.

Are MAC addresses always permanent and globally unique?

No. Interfaces can use locally administered or randomized values, and configuration or virtualization can create duplicates. Treat a MAC address as local configuration evidence, not identity proof.

Why can one Wi-Fi device show different MAC addresses?

Operating systems may use private or randomized MAC addresses for different Wi-Fi networks or sessions. The value can change without the physical interface changing.

What does the group bit in a MAC address indicate?

The low bit of the first octet distinguishes an individual address from a group address. An Ethernet broadcast address is a group address delivered broadly on its local segment.

What is a locally administered MAC address?

It is a value whose first-octet local bit indicates local assignment rather than the globally administered format. Software, virtualization, or privacy features can set such an address.

Does a MAC address survive a router hop?

No. The router emits a new link-layer frame on the next link, with addresses appropriate to that local hop.

Is an OUI lookup enough to identify a device owner?

No. The prefix may indicate an allocation or vendor record, but locally administered, randomized, virtual, or reassigned addresses can make such identification misleading.

What is an OUI?

An Organizationally Unique Identifier is a prefix allocated for identifying a block of link-layer addresses. A matching prefix does not prove current ownership or device identity.

How can the group bit be recognized?

It is the least significant bit of the first octet. In common hexadecimal notation, an odd first-octet value has that bit set and denotes a group address.

Can a MAC address be changed by software?

Many operating systems and virtual interfaces permit a locally administered address to be configured. Network policy should not rely on a MAC value as a strong authentication secret.

What is the difference between a MAC address and an IP address?

A MAC address is a link-layer identifier used on a local link, while an IP address identifies a network-layer endpoint or interface for routed delivery.

Why might a MAC lookup show a manufacturer that does not match a device?

The address may be randomized, virtualized, locally assigned, reassigned, or part of a prefix shared by a vendor. A prefix database is only a clue.

Further learning and references