IP Addresses

What is the unique identifier for a device on a network?

The MAC address is the closest thing to a unique identifier for a device on a network. Learn its format, where it comes from, its limits, and how to find it.

On this page
  1. The MAC address is the usual answer
  2. What the digits mean
  3. Where the MAC address stops being unique
  4. The IP address is the network-level identifier
  5. How to find a device’s MAC address
  6. Which identifier to use

The MAC address is the usual answer

For a device on a local network, the closest thing to a unique identifier is its MAC address. The manufacturer sets the MAC address on the network adapter, and it is usually written as six pairs of hexadecimal digits, such as 00:1A:2B:3C:4D:5E. A computer’s wired port and its Wi-Fi radio each have their own MAC address, so a laptop with both can show two.

What the digits mean

The first three pairs form an organizationally unique identifier (OUI). The IEEE assigns OUIs to manufacturers, and the manufacturer assigns the last three pairs to each adapter. This means the first half of the address can often show who made the network card, though it does not show the exact model. A bit in the first byte also shows whether the address was assigned by a manufacturer or set locally by software or an administrator.

Where the MAC address stops being unique

A MAC address is unique in the sense that it is meant to be. In practice, there are a few limits:

  • It only has meaning on the local network segment. Routers rewrite the addressing at each hop, so the MAC address does not reach a server on the internet.
  • Software or an administrator can change it. Many phones and laptops also use randomized addresses on Wi-Fi.
  • Virtual machines get their addresses from the hypervisor that runs them, and copied or faulty hardware can produce duplicates.
  • MAC filtering on a router is a weak access control, because an address can be copied.

The IP address is the network-level identifier

To send data across networks, a device also needs an IP address. IP addresses are assigned, and they can change when a device reconnects. Within a single network, the IP address identifies the device at the network layer. For how that works, see “what is an IP address and how does it work in a computer network?”

How to find a device’s MAC address

  • Windows: open Command Prompt and run getmac /v to list each adapter, or run ipconfig /all and read the Physical Address line.
  • Linux: run ip link show and look for the link/ether line under each interface.
  • Router: the connected devices list on the router’s admin page usually shows MAC addresses next to IP addresses and device names.

Linux users who want a wider set of tools can start with “what are the best networking tools for linux?”

Which identifier to use

If you need to identify a device to the router or to another device on the same local network, the MAC address and IP address together usually do the job. If you need the device’s address for traffic on the wider internet, the address that matters is the public IP address of the router, because most home devices sit behind NAT and do not have a public address of their own.

The complete guide to ip addresses

What Is the Unique Identification Number of a Computer on a Network?
Read the guide

Keep exploring

Guides from other topics

All topics →