IP Addresses

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

A computer on a network has no single official ID. Its MAC address is the closest hardware identifier, and its IP address is its network address.

On this page
  1. The short answer
  2. The MAC address
  3. The IP address
  4. How the two work together
  5. Other identifiers a computer may have
  6. Why “unique” needs qualifiers
  7. How to find both addresses

The short answer

A computer on a network does not have one official “unique identification number.” It has several identifiers, and each one works at a different level. For most people, the two that matter are the MAC address, a hardware identifier, and the IP address, which is the address the computer uses on the network. This guide explains each one, how they work together, and where the word “unique” needs a qualifier.

The MAC address

The media access control (MAC) address is a number assigned to a network adapter, the part of the computer that connects to a wired or wireless network. It is usually written as six pairs of hexadecimal digits, such as 00:1A:2B:3C:4D:5E. The first three pairs identify the manufacturer, and the manufacturer assigns the last three.

On a single local network, MAC addresses are meant to be unique, and they usually are. A MAC address only has meaning on the local network segment. Routers rewrite the addressing at each hop, so a MAC address does not follow a packet across the internet.

Some phones and laptops also use randomized MAC addresses on Wi-Fi. In that case, the address the system shows may not match the one the manufacturer set.

The IP address

An IP address is the address a computer uses to send and receive data across a network. IPv4 addresses are 32-bit numbers written as four decimal numbers separated by dots, such as 192.168.1.20. IPv6 addresses are longer, 128-bit numbers written in hexadecimal.

Unlike a MAC address, an IP address is assigned. A DHCP server, which is often built into a home router, hands out addresses automatically, and the address can change when a computer reconnects. An address set by hand is called static.

Many IPv4 addresses are private, meaning they are reserved for use inside a network. These include 10.0.0.0 to 10.255.255.255, 172.16.0.0 to 172.31.255.255, and 192.168.0.0 to 192.168.255.255. Many homes and offices use the same ranges, so a private address is unique only within its own network. A common question is “how do I find my 192.168 IP address?” which usually comes up when someone needs to log in to a router or share files on the local network.

How the two work together

On an IPv4 local network, a computer that knows another device’s IP address still needs that device’s MAC address to deliver data on the local segment. It uses the Address Resolution Protocol (ARP) to ask which device owns the IP address, and the device replies with its MAC address. IPv6 does a similar job using Neighbor Discovery.

For background on where each identifier sits, “what is L1, L2, L3, and L4 in networking?” is a useful starting point. MAC addresses belong to layer 2, and IP addresses belong to layer 3.

Other identifiers a computer may have

  • Hostname: a name such as office-pc. People use it in place of an IP address, and the name is turned into an address by DNS, a hosts file, or local name services.
  • Machine ID: many Linux systems store a unique machine ID in /etc/machine-id. System software uses it, and it is not a network address.
  • Serial number: the manufacturer assigns it for warranty and asset tracking. It is not used to route traffic.

Why “unique” needs qualifiers

No single number is unique in every situation.

  • IP addresses are unique within one network, not across the whole internet, because private ranges repeat.
  • Many devices on a home network share one public IP address through network address translation (NAT). The router does this translation. For more on that device, see “what device is used to connect different networks?”
  • MAC addresses are meant to be unique, but duplicates can happen with faulty or cloned hardware, and software can change them.

So the useful answer depends on the question. To tell devices apart on a local network, people usually look at the MAC address and the IP address together.

How to find both addresses

On Windows, open Command Prompt and run ipconfig /all. The Physical Address line shows the MAC address, and the IPv4 Address line shows the IP address. The getmac /v command also lists the MAC address of each adapter.

On Linux, run ip addr show. The link/ether line shows the MAC address, and the inet line shows the IPv4 address. Running hostname prints the computer’s name on either system.

For more commands like these, see “what are 10 common network commands?”

Keep exploring

Guides from other topics

All topics →