From the course: CompTIA Network+ (N10-009) Cert Prep

The MAC address

- Frames are a fantastic way to make data move around. The problem is is how do frames know how to get to the right computer? So if you take a look at a network, what we have here is a hub. Now on this hub, if I'm sending data, it's coming in from the white cable. When it gets inside the hub, the hub is what we call a repeater. It takes the signal that comes in from one of the ports and then it recreates multiple copies of that and sends it out on all of the other connected cables. So it literally takes one signal and repeats it out to as many connections as you have. Now that creates a big problem. The challenge we have here is I've got a network, alright? So this is going to be four computers that are connected to a single hub. The challenge that we have is that, let's say that this purple computer wants to talk to the green computer. What's going to be taking place is that when this purple computer sends out a frame, it gets sent into the hub, and the hub, remember repeats it out to all of the connections. So everybody gets an example of that frame. Now that frame isn't for everybody, it's just for the green computer. So we need some way to address each of the frames so that even though everybody gets it, only the green computer is actually going to read the frame and use it. These other two guys, when that frame comes in, they're going to see that it's not for them and then they'll just wipe it out or consume it, so it never goes past the network card. So in order to do that, I want to make an analogy of a network card as a tray. So this for me, I'm having a little fun here, is a network card. This ugly old vacuum tube from my shop vac is the RJ45, the wired connection into it. So when a frame comes in, it literally plops down and the network card looks at it. Now the problem is there's nothing that identifies it and says it's for this network card, for this particular machine. And that's where something called a MAC address comes into play. In order to appreciate a MAC address, we're going to have to take a look at a computer. So what I'm going to do is fire up my Windows computer and let's take a direct, close personal look at a MAC address. So here I am in Windows 10, and what I'm going to do is I'm going to fire up PowerShell. Now a lot of people, they're like, oh, PowerShell, why can't we just use a command prompt? You can, all right. What I'm about to do works equally well in a command prompt or in PowerShell. I just like PowerShell, so let's just do it here. So I'm first want to teach you an incredibly important command that you're going to use like crazy and it's called IP config. So I-P-C-O-N-F-I-G. Now if I type it by itself, we're going to get some kind of information, but I want you to type it a special way. What you're going to do is type ipconfig slash all just like that. Now, when we type that, we can see all the information there is about all of our different network cards. Now, this is the card I'm interested in cuz this is the one I'm actually connecting to the network on, it's just a regular old ethernet nick. And what I want you to look at is right here, you see this? So we have 12 numbers here broken up into pairs. So there are six pairs. This is our MAC address. So this is the unique identifier for the network card. Now, as we take a look at this, first of all, this is a 48 bit address. We know that these are hexadecimal values and there's one, two, three, four, five, six, seven, eight, nine, 10, 11, 12. Each hexadecimal character represents four binary characters, so four times 12 is 48. Now if we take a look at these first half, these first three pairs, these are known as the OEM numbers. Intel, the maker of these network cards, is issued this value from the internet folks. So these numbers right here are issued to Intel. So every Intel nick, well actually Intel makes so many that they have a number of these, is use that unique OEM identifier, as we call it. The last six values are burned into each card at the factory and each card gets a different value. So we have the OEM, whoops, the OEM, and then what we call the unique ID. So the thing we need to remember is that every network card in existence has a unique MAC address. It has to have that because we never know on our network here whose network cards are going to to be plugged in. And it's the MAC addresses that we apply to the frame to make sure it gets delivered to the right place. So each one of these computers has a unique MAC address. So what we'll do, let's take a look at our frame again, is we're going to add to the frame MAC addresses. Now I've got two blocks here and that's because we have the MAC address where it's going to and the MAC address of where it's coming from. So whenever your network card sends out a chunk of data, it's very important to the network card that not only does it know where to send it to, but it also will put its own MAC address in there so the receiving computer can send it back. Now the other thing that'll come into play here is a CRC or a Cyclic Redundancy Check. This is just used as a way to verify that the data is good. If it's bad data, then it knows to resend it. So what we'll do, let me go ahead and get it pointed in the right direction, is once this is all created, it gets sent out. I'm not going to push it through too far cuz I'll never get it back, but push off it goes off to the network. Now the cool part to all this is that as it leaves this computer and comes into the hub, remember that the hub creates as many copies as necessary to represent all the different computers it's connected to. So it makes, in this case, one, two, three new copies and it sends them down the line to all the individual computers. And as these frames come into the computer, boop, it drops down on the tray. And the cool part is is that every network card knows what its MAC address is. So the card looks at this, if it's a MAC address for him, then it's going to strip away all this extra information and send it up into the software of the system. However, if it's a MAC address that's not for him, he'll look at it, see it's not his MAC address, and he just makes it disappear and doesn't do anything with it. And that is how MAC addresses work.

Contents