If the terms "IP address" and "MAC address" send your head into a spin, don't worry; they're relatively easy terms to understand. In fact, it's not too unlike the postal service that you're already used to!

Let's explore the difference between a MAC address and an IP address and what each does.

What Is an IP Address?

An Internet Protocol (IP) address is a unique set of numbers that identifies a device connected to the internet. To understand where this address comes from, we have to understand a bit about how the internet works.

In simple terms, the internet consists of separate networks that are connected together. Each network is called an Internet Service Provider (ISP), and if you purchase a service from an ISP, you can connect to that ISP's network. You can then access the other networks connected to your ISP.

Every ISP has a pool of IP addresses that they manage, and when you purchase its service, you're assigned an IP address. When data from the internet needs to reach you, the ISP's network sees that your unique IP address is the destination, then routes that data to you.

There are two kinds of IP addresses:

  • IPv4, which looks like four sets of numbers separated by periods, each number within the range of 0 to 255.
    • e.g. 54.221.192.241
  • IPv6, which looks like eight sets of four-character strings separated by colons, each string containing numbers and lowercase letters.
    • e.g. 0:0:0:0:0:ffff:36dd:c0f1

Even though there are 4.3 billion total possible addresses using IPv4, they're pretty much all taken and are running out. That's why the world is migrating to IPv6, of which there are over 320 undecillion(!) total possible IPv6 addresses. In case you don't know what an undecillion is, it looks like this:

            340,282,366,920,938,463,463,374,607,431,768,211,456
    

That should be more than enough to handle every device that humanity makes as a whole!

What Is a MAC Address?

A Media Access Control (MAC) address identifies a unique "network interface" in a device. While IP addresses are assigned by ISPs and can be re-assigned as devices connect and disconnect, MAC addresses are tied to a physical adapter and are assigned by manufacturers.

A MAC address is a 12-digit string where each digit can be any number from 0 to 9 or a letter between A and F. For readability sake, the string is divided into chunks. There are three common formats, the first being the most common and preferred:

  1. 68:7F:74:12:34:56
  2. 68-7F-74-12-34-56
  3. 687.F74.123.456

The first six digits (called the "prefix") represent the adapter's manufacturer, while the last six digits represent the unique identification number for that specific adapter. The MAC address contains no information about which network a device is connected to.

To learn more about structure and nuances, see our post on the intricacies of MAC addresses.

What Is the Use of IP Addresses and MAC Addresses?

The IP address is used to transport data from one network to another network using the TCP/IP protocol. The MAC address is used to deliver the data to the right device on a network.

Someone delivering a package

Let's say you want to send a package to your good friend John Smith. John's name isn't unique enough as an identifier, so we can't just send a package labeled "John Smith" and expect it to arrive.

However, what if we incorporated his ancestry (i.e., his "manufacturer") into his name?  If we did that, he'd be called "John Smith, son of Edward, son of George, son of..." Go far back enough, and it becomes unique. This is what a MAC address is like.

While this would be enough to get your package to John, you can't just tell the post office to send it to "John Smith, son of Edward, son of George, son of..." Even though it uniquely identifies him, it'd be a pain for the post office to find him. That's why you need his home address.

But the home address itself isn't enough on its own, either. You'll need your good friend John's name too, so you don't confuse the whole Smith family on who the package is for when it arrives.

As such, the home address acts as the IP address; it's where the target is. The MAC address is like your friend John Smith's name: it's who (or what) the target is.

Comparing IP and MAC Addresses to a Postal Service

So, let's break down our postal example into technical terms. Your router/modem has a unique IP address assigned by your ISP. This is like how John Smith's home has an address assigned to it by the postal service.

Every device on a router has a unique MAC address, much like how everyone in John Smith's home has an identifying name. The IP address gets the data to your router, like a deliveryman putting the package on John Smith's doorstep.

Then, using the name on the label, John Smith can get his package, much like how a MAC address identifies which device is which.

The Importance of MAC Addresses

Mac addresses allow you to filter devices on modern routers: you can tell your router to deny access to specific MAC addresses (i.e., specific physical devices) or only allow certain MAC addresses to connect.

You can't do the same with IP addresses because routers assign internal IP addresses to devices as they connect and recycle them when devices disconnect.

That's why your smartphone could have an internal IP address of 192.168.0.1 in the morning but 192.168.0.3 when you come home from work. As such, you can't filter a device using its IP address because it's always changing.

Another nifty use for MAC addresses is triggering Wake-on-LAN. Ethernet adapters can accept a "magic packet" that causes the device to turn on, even if it's shut down.

The magic packet can be sent from anywhere on the same network, and the MAC address of the receiving device's Ethernet adapter is how the magic packet knows where to go.

Where IP and MAC Addresses Fall Short

Remember how an IP address denotes the connection of a device to an ISP? Well, what happens if a second device connects to the main device and funnels all of their web activity through it? The second device's activities appear to be the main devices to the rest of the web.

That's basically how you hide your IP address from others. While there's nothing inherently wrong with doing this, it can lead to security problems. For example, a malicious hacker who smartly hides behind several proxies can make it difficult for authorities to track him down.

Another quirk is that IP addresses can be traced. For example, with enough power, someone can see where you live with your IP address.

And there's also the potential issue of IP conflicts, where two or more devices share the same IP address. This mostly happens within a local network.

As for MAC addresses, there's really only one problem to know about: it's surprisingly easy to change a device's MAC address. This defeats the purpose of a manufacturer-assigned unique identifier since anyone can "spoof" another's MAC address. It also renders features like MAC filtering almost useless.

IP and MAC Addressed Decrypted

Despite their flaws, IP and MAC addresses are still useful and important, so they won't be going away anytime soon. Hopefully, you now understand what they are, how they work, and why we need them.

Now that you know what an IP address is, do you know your computer's own address? If you need to fetch it for some reason, don't worry; it's usually very easy to find, regardless of which operating system you use.

Image Credit: ronstik/Shutterstock