Mac Addresses vs IP Addresses
When you work with a network, there are a lot of addresses that pop up. The two you’ll see more than any other are IP addresses and MAC addresses. What do these things really mean?
Let’s take a minute to learn about them in detail.
What Is a MAC Address?
To begin with, MAC address actually stands for “media access control address.” This is an address that is assigned to physical devices by their manufacturers. More specifically, networking devices are assigned a MAC address before they are shipped.
To put that in perspective, your computer or smartphone has the ability to join a network, which means it has a networking device interfaced into it. Effectively, your computer or phone has its own specific MAC address, and that address cannot be changed on a whim.
But, if you changed the networking device within your phone or computer (such as swapping a networking card in a PC), then that would effectively change the MAC address associated with the greater device. This emphasizes that it’s the component of your phone that allows it to join a network that has a specific MAC address.
In terms of networking, the MAC address operates in Layer 2 of the OSI model. That means the MAC address is used to identify the physical location of a device on a network.
What Is an IP Address?
IP addresses are just as important, but they operate in very different ways. IP stands for “internet protocol,” and that already tells you a lot. These addresses exist specifically to help devices find each other across the internet.
Because of this, IP addresses are assigned by internet service providers (ISPs). The IP address is a purely logical address, and that means the ISP can change your IP address as often as necessary to make things work. In fact, it’s a normal practice to change IP addresses often.
Because IP addresses are purely logical, they operate in Layer 3 of the OSI model.
It’s also worth noting that there are two kinds of IP addresses: IPv4 and IPv6. IPv4 is an older format, and when it was slated to run out of unique addresses (as more and more devices joined the internet). IPv6 compensates by creating many, many more viable IP addresses that ISPs can use to connect the greater internet.
How Do They Compare?
That explains the basics of each type of address, but seeing how they work together and how they specifically differ can clarify how we think about them.
In Terms of a Network
One easy way to think about these two types of addresses is by how they identify network devices. The MAC address defines a single device inside of a network. So, each phone, laptop, tablet, etc. on your home network has its own MAC address.
Meanwhile, the IP address helps define where your network is located in the vast internet. When your phone tries to connect to a server to stream a video, the IP address connects that video source to your modem. Your modem then finds your specific phone (really it’s your router doing this job) on the local network via the MAC address.
How They Are Written
Another clear distinction comes in the form of address formats.
A MAC address uses hexadecimal digits in a specific arrangement of six pairs. It looks like 00-00-00-00-00-00, where the 0s could be any hexadecimal digit.
Meanwhile, IP addresses come in two formats.
IPv4 addresses only use numerical digits in the form x.x.x.x. Each value can range from 0 to 255. So, you could have 0.0.0.0 as a valid IP address. You could also have 255.255.255.255. Anything in between also works.
IPv6 is more common for ISP designations these days, and these addresses also use hexadecimal. The format consists of 8 sets of 4 digits, which looks like xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx.
The Internet Process
To put all of this together, we can consider a sample internet action and see where each address plays its role.
Let’s say you load up a website in order to read an article that explains how MAC and IP addresses work. In order to load the website, your device has to connect to a web server. To establish that connection, the web server needs to know your IP address, and your device needs to know the server’s IP address.
That exchange is made, and the server can send the article to your network. That information will first go to your modem via its IP address. Then, a router will determine where your device is located within the local network using MAC addresses. The router will send the information to your device’s MAC address, and you can read the article.
That’s how it works.
Additional Learning Center Resources