Mac Addresses
Video Activity
We mentioned MAC Addressing in the previous lesson. For this lesson, we expand on MAC Addressing significantly and discuss how the protocol data unit is structured in layer 2, the data link layer and the function of each component.
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or
Already have an account? Sign In »

Time
29 hours 18 minutes
Difficulty
Intermediate
Video Description
Mac Addresses We mentioned MAC Addressing in the previous lesson. For this lesson, we expand on MAC Addressing significantly and discuss how the protocol data unit is structured in layer 2, the data link layer and the function of each component. For example, you'll learn what a frame and dissect a diagram of the pertinent frame components you'll need to know for the CCNA exam.
Video Transcription
00:04
so moving on.
00:08
Where do we use these? Mac Address is going back to the protocol data unit that I was speaking off earlier.
00:15
The protocol data unit. It's simply the way
00:20
the data is structured at later. Two at the datalink. Clear.
00:25
So
00:27
the protocol data unit at later to is called a frame.
00:32
Now, what does this frame look like? Let's find out. So I'm just going to draw a box,
00:39
and I'm going to draw this with a word of warning. I'm only going to put the fields in this frame, the pertinent to the ccn a class. There are other fields inside of this frame. But you guys don't need to know it till you get to your c c in peace. So
00:55
you will have your
00:57
destination,
00:59
and I'm gonna breathe. Iate it to D S. T. Mac,
01:03
your destination Mac address.
01:06
Which would be the Mac address of the device you are transmitting to
01:11
or
01:11
the person you are sending the letter to. Your source. Mac, your actual data
01:21
so you can think off. And I've left this for you. Field empty for a second on purpose. But you can think of the
01:27
frame as your envelope
01:30
and your data as the actual letter that you were sending.
01:34
The last field here is called
01:38
your frame
01:41
check
01:42
sequence, So F. C s
01:45
stands for frame check sequence.
01:48
This field house is what is called
01:52
the C R. C or the cyclic redundancy check.
01:57
Now, in some books, you won't even see
02:00
the last field CFCs. It'll just say CRC standing for the cyclic redundancy check. But in actuality, the last field is called the frame check sequence, and it houses the cyclic redundancy check.
02:15
Now, what is the cyclic redundancy check
02:17
before the
02:20
Before the transmitting device transmits the frame,
02:23
it performs a calculation. There is an algorithm that is sitting
02:29
inside the frame check sequence called Redundancy,
02:32
and the CRC performs a calculation on the whole frame,
02:38
and it comes up with a number. It use the number. So let's say the calculation was performed and the number it came up with. Waas.
02:46
The number, let's say 15.
02:50
The number 15 is put inside of the frame check sequence and the frame is transmitted.
02:54
The receiving device receives the frame
02:59
and then performs the same calculation on the frame and comes up with its own number.
03:04
So let's say the number the receiving and came up with was also 15.
03:09
Then the receiving device matches or compares its own yield off the calculation or the number itself came up with, with the number already reciting in the frame check sequence. If the two numbers match, the frame was not corrupted in transit. So if the two numbers match, it means the frame ran through and there was no data corruption.
03:30
And the frame is
03:30
accepted.
03:31
No,
03:32
if the numbers don't match, let's say the receiving end got the frame and did the calculation and came up with the number 20.
03:40
That's a sure shot way of telling that the frame was corrupted in transit and the frame is discarded. The receiving end does not accept the frame. It just drops the frame.
03:49
Now you see in the
03:52
in the frame in the diagram for the frame. I have said that the Destination Mac address comes first before the Source Mac address.
04:00
As we learned that the Mac address is 48 bits in length
04:04
now.
04:08
If the source Mac came first and the destination Matt came for second, the receiving end would receive the frame would have to read 48 bits
04:16
worked off useless information to it before trying to compare its own Mac address with the Mac address reciting in the destination Mac portion of the friends.
04:28
So the destination Mac portion of the frame comes first by design. So as soon as the receiving and gets the frame, it can immediately start comparing doing a bit by bit comparison with its own Mac address and the destination Mac address in the frame. And if it matches, it accepts the frame
04:46
and say that, Okay, this frame was meant for me. Barring a fail in the CRC
04:50
in the CRC fails. Of course, the frame is dropped, but the first check the device will perform is match the destination Mac address residing in the frame with its own Mac. That's why this few come comes first.
05:04
Up until now, I have mentioned what type of address ing is used at Layer two or the data link clear
05:12
and what the protocol data unit
05:15
is at the data link. Clear the protocol data unit being the frame I haven't mentioned yet. What devices work at the data link clear,
05:25
and there's only
05:27
one device specifically
05:30
well, Other devices also work at the datalink. Clear, but most specifically. Ah, switch operates at the data link. Clear.
05:38
Now I'm going to explain how a switch functions. So I'm gonna go ahead and draw a rudimentary switch on the board.
05:46
Excuse my drawing skills. Let's say this is switch one,
05:51
and to it are connected. Four devices. Let's say PC one pc to PC three on P. C. Four
06:02
Now just for example, sake.
06:05
Can we just pretend that PC ones Mac address is
06:11
a A a a PC Trees Mac address is C. C C. C. On. I'm well aware of the fact that these are only four Hex character's for Mac address, which makes for 16 bits. But please don't make me write out 48 bits worth of A's,
06:29
so we're gonna stick to 16 bits and pretend this is 48 bits
06:31
PC to is B, B, B, B
06:34
and P. C four is uh, let's go with D. Also, we're gonna pretend
06:42
that PC one is connected to switch one on port.
06:46
We're gonna call it pork P one PC to is connected on Port P to P C three P three and PC for P four
06:59
now inside off inside of a switch in software,
07:02
there exists a table called a Mac address table.
07:08
So let me go ahead and draw a Mac address table out too.
07:12
So this is going to be your Mac table.
07:15
I just skip the word address because I didn't think I'd have enough space. But this is called your Mac address table.
07:20
The Mac address table is a listing off all ports
07:26
on the switch. So port one
07:29
port to
07:30
port three
07:32
port for and other ports if the switch has them. But right now, we're just dealing with port 123 and four,
07:40
and the mac addresses off the devices that are connected at the other end of the port.
07:45
So
07:46
once this this operation is done, what you're gonna have in front of P one is a
07:51
So the Mac address table has a listing off all the ports available on the switch and the Mac addresses of the devices that are connected at the other end of that port.
08:03
So when the switch is brand new
08:05
and devices just get connected and that the switch is powered up for the first time this Mac address table is empty,
08:13
this Mac address table is completely empty.
08:16
Now let's pretend that PC one
08:18
transmits a frame
08:22
to P C four.
08:24
So busy one trance transmits a frame, and the source Mac address in that friend is a and the destination Mac address in that frame is dee dee dee dee,
08:35
and it's transmitting some data, which does not concern us.
08:39
That frame gets to PC. That frame gets to switch one Port one.
08:48
Now remember at this point Port one
08:50
in the Mac address stable has nothing in front of you.
08:54
As soon as
08:56
switch one receives the frame from PC one inbound on Port one. Switch one reads the source. Mac address field in the frame
09:05
and adds PC ones. Mac address to the Mac table.
09:11
So a a
09:13
A gets added to the map table as soon as switched. One reads the source. Mac address field in the frame.
09:24
It adds the source Mac address to the Mac Adis table in front of the port that received the friend
09:31
switches, learn or populate their Mac address. Table's looking on Lee at the source. Mac address field in the frame once again ah switches learns Mac addresses by looking at the source. Mac address field in the frame.
09:52
So
09:54
PC one
09:56
transmits the frame switch. One gets it. Which one learned specie ones. Mac and puts it, Adds it to the Mac address table in front of Port one.
10:05
Then switch. One
10:07
looks at the destination Mac address in the frame, which is D D D D. And then tries to find that destination. Mac address in this Mac address table
10:18
and the rest of the Mac out of this table is empty,
10:22
so
10:22
switches make their fording decision.
10:26
Where to Ford the frame once it receives it based on the destination Mac address field in the frame.
10:35
Once again, switches make their fording decision based on the destination Mac address
10:43
in the frame.
10:43
So since the switch does not find the destination Mac address in in the Mac address table switch one floods the frame out
10:54
all of the ports
10:56
except the port that originated the signal in the first place, which was Port one,
11:01
so the frame gets flooded out too
11:05
out. People pour two to PC to out Port four to P. C. Four and out. Port three to PC three.
11:15
All of the devices get the frame
11:18
now. What does PC to do with the frame The PC to looks at the destination Mac address in the frame. The Destination Mac Address field of the frame and compares the Mac address sitting in the Destination Mac address field with its own Mac address. So the Destination Mac address feel in the frame at this point. Stays Dee Dee dee dee.
11:37
It doesn't compare isn't against its own Mac address, which is B B B B
11:39
doesn't match BC. Two drops the frame.
11:43
Same with PC three d D D D. Which is the Mac address in the destination portion of the frame. Does not match C. C C. C. So Pc three will drop the frame
11:56
in case of P C four. The destination Mac address Field matches B C four's Mac address so PC four will accept the frame
12:05
now if at some later point,
12:09
p c four
12:13
replies back
12:15
to P C. One
12:20
so P C four replies back to P C. One.
12:24
When that frame arrived on Port Force, which one
12:28
switch one will once again read the source. Mac address field in the frame because switches learn or populate the Mac address Table's looking at the source. Mac address field in the frame.
12:41
The switch one will add the Mac address dee bee dee dee
12:50
to the Mac address table,
12:52
then switch one.
12:52
Ruth tried to find the destination Mac address, which is a in the frame
13:01
in the Mac out of the stable, and it finds it
13:03
is available on Port one.
13:07
So switch one in this case will not flood. Remember, switches Ford frames or make their forwarding decision looking at the destination Mac address field
13:18
in the frame,
13:20
which one will find a
13:22
on port won and ford the frame out directly
13:28
to P C. One.
13:30
So at some later time one PC three and PC to communicate or somebody communicates with these two species and their reply back. The Mac address table will get fully populated, and poor, too, will have BB BB in front ofit
13:43
and poor tree will have the entry C C C C.
13:48
Once a Mac address table is fully populated, there will be no flooding behavior occurring. The full point of the flooding behavior is that I don't know where this frame is going? I don't know the destination,
14:03
which means the destination Mac address in the frame does not exist in the back of a stable. So I flooded out everywhere in attempts to find where this device is located.
14:13
Once I learned where all the devices are located, then the fording decision between PC will happen immediately. As soon as PC ones transmits. Let's say to PC three,
14:22
which one will look up? C, C, C C in its Mac address table? And for that for him out.
14:28
Poor tree.
14:31
One of the mistakes I see people make, even though they
14:35
say that they know the operation off a switch. And by now you should have a pretty firm grasp of house, which operates.
14:43
They confuse the word flood with the broadcast.
14:48
I used the word
14:50
when, when host a or PC? A. When I'm gonna use the word host, it's synonymous with the PC. When PC one transmitted the frame the first time when the Mac address table was unpopulated, there was nothing in there.
15:03
I used the word flood, I said The switch floods out the frame to all the other devices except the poor dead originated. The signal
15:13
Sometimes I see people use the word broadcast.
15:16
No, no, no.
15:18
That will get you in an interview process, at least if I'm interviewing you. So
15:24
ah, broadcast frame
15:26
is a frame that has all f's
15:28
in the destination portion of the frame.
15:31
I'm gonna go ahead and draw that out for you, so we'd never get this wrong again.
15:37
So this is my destination, Mac. So the destination Mac for a broadcast frame is going to be all EFS source. Mac can be whatever, then the data.
15:50
And then you're I'm just gonna put c r C over here.
15:52
Of course, the field itself is called framed check sequence.
16:00
So a broadcast frame is a frame that has all else or all one's actually in binary. This equates to all ones.
16:10
So
16:11
a broadcast frame is a frame that has all left in the destination portion
16:15
and the destination Mac address portion of the frame
16:18
that frame that ho PC one set to pc to
16:23
the source Mac address in that frame was a the destination Mac address. In that frame was dee dee Dee dee.
16:30
That was a unique aspirin. And just as a quick review just in case. Some of the people listening to this do not know this. Ah, unique *** is a 1 to 1 transmission.
16:41
So P C one to PC for transmission.
16:45
A broadcast is a one to everybody transmission.
16:48
So if PC one sends out a broadcast
16:52
PC 23 and four will receive the friend. The end result is just like a flooding behavior. But you can't call it a broadcast because it's not a broadcast frame.
17:03
It is still a unique *** frame, which is a 1 to 1 transmission from P C one to P C four source Address is a destination. Address is D d d d. Not all that.
17:17
So That is a unique *** frame. The flooding procedure is only done to find devices when switch does not. The Swiss does not know where they're located or their Mac addresses are not in the switches. Mac address table
17:30
Ah, broadcast it Sent to everybody on purpose.
17:34
So once again, a broadcast frame will have all laughs. In the destination portion
17:40
of the address, a unique *** frame will have a source Mac and a destination back. Now, what is the end result off a broadcast frame being received by a switch off course. It is sent out. All pours except the poor. That originated the signal.
17:55
Now, why is it sent out all ports?
17:57
Because
17:59
this address will never exist in the Mac address table.
18:03
The Mac address table
18:04
for the most part, barring some stuff that you might learn in C. C. N P. For the most part on Lee holds Juni CASS addresses. So since this address will never exist
18:18
in the Mac address table, as soon as
18:19
a switch receives a frame with all left the definition portion of the frame, the switch will send it out. All ports. And I'm refraining from calling it a flood. It's not a flood.
18:33
The flooding behavior has a different purpose. That is a broadcast.
18:37
Okay, hopefully we have that cleared up.
Up Next
Instructed By
Similar Content