Skip to main content

IP vs MAC address: the difference and why both exist

VDS / VPS · 13.10.2026 · 5 min read
Illustration for “IP vs MAC address: the difference and why both exist”

In network adapter settings, right next to the IP address there is always another set of characters — the MAC address. They solve different tasks, and confusing the two makes it harder to understand why a device is visible on a local network but unreachable from the internet, or the other way around. Understanding the difference noticeably simplifies diagnosing network problems — from address conflicts to DHCP oddities.

What an IP address and a MAC address are

An IP address is a logical address assigned to a device within a particular network, and it can change on every connection. The basic addressing concepts are covered in the article about IPv4 addresses. A MAC address is a physical identifier of a network card that the manufacturer burns into the hardware at the factory, and under normal conditions it does not change for the whole life of the device.

How IP and MAC differ

The difference becomes clearer if you compare both addresses by their key traits.

TraitIP addressMAC address
OSI model layerNetwork (3)Data link (2)
Who assigns itRouter or administratorHardware manufacturer
Can it be changedYes, on reconnectionUsually no, burned into firmware
Format192.168.1.500:1A:2B:3C:4D:5E

How IP and MAC work together: the ARP protocol

Inside one local network devices talk not by IP but by MAC: data link layer frames are addressed by the physical address. To learn the MAC address of a neighbor by its IP, devices use the ARP protocol — a device sends a broadcast request asking "who owns this IP" and gets back the MAC, which it then keeps in a local table for a while.

Request:  who owns 192.168.1.1? tell me your MAC
Reply:    192.168.1.1 is at 00:1A:2B:3C:4D:5E
ARP table: 192.168.1.1 -> 00:1A:2B:3C:4D:5E (entry kept for a while)

Structure of a MAC address

A MAC address consists of six pairs of hexadecimal digits separated by a colon or a dash. The first three pairs identify the network card manufacturer, the last three form a unique serial number of a particular device from that manufacturer. You can see your network interface's MAC address together with its IP and routes using commands covered in detail in the article about configuring ip route on Linux.

Why both addresses are needed at once

The MAC address handles delivering a frame inside one network segment, while the IP address handles routing a packet between different networks, all the way to another continent. A router changes the sender's and receiver's MAC addresses at every hop, but the IP addresses of the end hosts inside the packet stay the same until NAT comes into play, which is described in detail in the article about NAT. Without MAC the network could not deliver a frame to a neighboring device, and without IP there would be no way to say which network a frame should even be sent to. That is exactly why, when troubleshooting, it helps to check both layers separately: a routing error looks different from a neighbor being unreachable inside one segment.

What to do: how to find your IP and MAC

You can check both addresses of your device without installing any extra software.

  1. On Linux run the ip addr command — it shows both the interface IP address and its MAC (the link/ether field).
  2. On Windows use the ipconfig /all command — the MAC address is labeled as the "physical address".
  3. To see the MAC of neighboring devices on your network, run arp -a after contacting them.
  4. If a device's IP changes on every reboot while its MAC stays the same, that is expected behavior, not a fault.

Frequently asked questions

Can a network card's MAC address be changed?

Technically yes — the operating system allows spoofing the MAC address in software, which is called MAC spoofing and is used, for example, to bypass address-based binding. The physical address burned into the hardware firmware at the factory does not change and is restored after a settings reset.

Why does a router show the same MAC for different IPs?

This happens when several IP addresses are configured on the same router network interface, or when an ARP request was made before the old table entry expired. One network interface indeed has one MAC regardless of how many IP addresses are assigned to it.

Is a MAC address needed for a website hosted on a VDS?

Site visitors never see or need the server's MAC address directly — the browser reaches it by domain name and IP address. The MAC address matters inside the data center network: switches need it to deliver frames to the exact physical port behind which the server sits.

Was this article helpful?
← Back to Knowledge Base Ask Support