fbpx

A MAC address is a physical address unique to your computer.

Think of it like this: you want to send a letter to your friend so you put your friend’s mailing address on the envelope. This is good enough at first. But right before the post office puts your letter in your friend’s mailbox, the address gets changed to you friend’s fingerprint instead.

This is because computers don’t have a simple mailbox where letters and other messages can be delivered until somebody goes to check the mail.

But why switch from an address to a fingerprint in the first place?

The reason is because there are different layers to the communication. I won’t go into all the details, but in 1984 there was a standard document that was published called the Open Systems Interconnection Reference Model, or just the OSI model for short. This document describes a design that consists of seven layers. Each layer is responsible for specific functionality. And in order to get something running such as browsing the internet, you need pieces from each of these seven layers.

I’ve already described IP which exists in layer 3 of this document and both TCP and UDP which can both be found in layer 4. I didn’t want to go right into this document because it would seem too much like a bunch of theory. But now that you understand a few distributed computing concepts, it’s time to describe where everything fits in the OSI model.

Listen to the full episode for a description of the first four layers as well as why MAC addresses are needed and how they fit into the OSI model. Or you can also read the full transcript below.

Transcript

I explained IP addresses in episode 158. You should also listen to episodes 159 and 160 before this episode. An IP address is a virtual address because it can change. When communicating with other computers, we need something that won’t change. Something that’s unique.

Think of it like this: you want to send a letter to your friend so you put your friend’s mailing address on the envelope. This is good enough at first. But right before the post office puts your letter in your friend’s mailbox, the address gets changed to you friend’s fingerprint instead.

This is because computers don’t have a simple mailbox where letters and other messages can be delivered until somebody goes to check the mail.

But why switch from an address to a fingerprint in the first place?

The reason is because there are different layers to the communication. I won’t go into all the details, but in 1984 there was a standard document that was published called the Open Systems Interconnection Reference Model, or just the OSI model for short. This document describes a design that consists of seven layers. Each layer is responsible for specific functionality. And in order to get something running such as browsing the internet, you need pieces from each of these seven layers.

I’ve already described IP which exists in layer 3 of this document and both TCP and UDP which can both be found in layer 4. I didn’t want to go right into this document because it would seem too much like a bunch of theory. But now that you understand a few distributed computing concepts, it’s time to describe where everything fits in the OSI model.

Let’s start with layer one. This is the physical layer. Now I know. I started out this episode saying that a MAC address is a physical address. That’s a different kind of physical. Layer one is concerned about really physical things such as the wires connecting your computer to the internet. Or if you connect wirelessly, then the first layer is concerned with things such as the frequency of the radio waves and how they’re formed. With wires, this layer is concerned about voltages and currents.

We live in a noisy world. And I’m not talking about all the extra noise I hear these days in New York from car horns and police sirens. I’m talking about interference from other electronic devices. Just think of a room full of hundreds of people each with their own cell phones. Each mobile phone is sending out electromagnetic waves and these pass through each other just like multiple ripples formed when you throw several rocks into some water. Layer one already has enough to worry about without all this extra complexity. And this is why multiple layers exist. They allow us to think about things and design systems by focusing on a narrow range of problems at a time. Otherwise, it would all be too much for our human minds to comprehend.

Layer two is called the data link layer. And it picks up where layer one stops. All that interference and multiple devices fall into this layer. This is still a very low level layer and we’re a long way from web pages. At this layer, we’re mainly interested in just keeping things separate and detecting simple errors. It comes down to making sure that the computers and devices have a reliable way to identify each other and send basic information.

We haven’t gotten to operating system network configurations yet or IP addresses. That’s what I meant by those things being virtual. This layer is still very much tied to the physical layer one. And we need a physical way to identify each machine and device. That’s where MAC addressed come in.

A MAC address stands for a media access control address. It’s something that’s unique with each network card either wired or wifi. Each network card manufacturer coordinates with standard organizations to make sure that each manufacturer has their own unique identity that they then add a device specific unique identity. Putting these unique pieces together means that no two network cards in the world should have the same identity. This is like your friend’s fingerprint in the opening example.

When you plug your computer into a wired network connection or when your wifi card establishes a connection with the wireless access point, then the MAC address is used to tell one device from another.

Imagine if you’re in a crowded room and want to talk to somebody. It’s going to be almost impossible to hold a conversation with this person if you have no idea which person you’re trying to talk to, right? That’s why MAC addresses are needed.

Layer three is the network layer and this layer’s job is to handle delivery of packets of information called datagrams. A datagram is really just a variable length collection of data. I don’t mean that one piece of data can change it’s length but that different pieces of data can be different lengths. I mentioned datagrams in the previous episode mainly because the word was used in the name of the protocol. Don’t get confused, UDP is not part of this layer three. IP or internet protocol is a good example of what might be found in this layer.

And I should mention that the OSI model can be used to describe designs other than internet communication. Things such as MAC addresses, IP, TCP, and UDP all fit into the OSI model but are not the only things the model describes. They are what I’m focusing on in this series of episodes.

Layer four is called the transport layer and this is all about making sure that some level of quality exists. That’s why both TCP and UDP can be found in this layer.

Make sure to listen to the past episodes beginning with episode 158 to get the most out of this explanation. I’ll describe the other layers in the OSI model in a future episode.

For now, I’ll end with one final thing about MAC addresses. I mentioned earlier that they can’t change. That they’re defined by the network card manufacturers and baked into the card itself. That’s normally correct. But the address can sometimes be overridden by software or configuration changes to be something else. A good example of this is if you ever need to run a virtual machine. This is where you run a software program on your computer that creates another computer. This extra computer thinks it’s real but it’s really all under the control of software. Your real computer is called the host. And the other computer is called a virtual computer. You can even have several virtual computers all running at the same time on one host computer as long as the host has enough memory and processing power to support multiple computers.

Okay, what does this have to do with MAC addresses? Well, in this case, there are no physical network cards for these virtual computers. It’s all software even though each virtual computer thinks it has a real network card with a real MAC address. The MAC addresses need to be created out of nothing really but they still need to be unique.