Where do we use these? Mac Address is going back to the protocol data unit that I was speaking off earlier.
The protocol data unit. It's simply the way
the data is structured at later. Two at the datalink. Clear.
the protocol data unit at later to is called a frame.
Now, what does this frame look like? Let's find out. So I'm just going to draw a box,
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
and I'm gonna breathe. Iate it to D S. T. Mac,
your destination Mac address.
Which would be the Mac address of the device you are transmitting to
the person you are sending the letter to. Your source. Mac, your actual data
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
frame as your envelope
and your data as the actual letter that you were sending.
The last field here is called
stands for frame check sequence.
This field house is what is called
the C R. C or the cyclic redundancy check.
Now, in some books, you won't even see
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.
Now, what is the cyclic redundancy check
Before the transmitting device transmits the frame,
it performs a calculation. There is an algorithm that is sitting
inside the frame check sequence called Redundancy,
and the CRC performs a calculation on the whole frame,
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.
The number, let's say 15.
The number 15 is put inside of the frame check sequence and the frame is transmitted.
The receiving device receives the frame
and then performs the same calculation on the frame and comes up with its own number.
So let's say the number the receiving and came up with was also 15.
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.
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.
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.
in the frame in the diagram for the frame. I have said that the Destination Mac address comes first before the Source Mac address.
As we learned that the Mac address is 48 bits in length
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
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.
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
and say that, Okay, this frame was meant for me. Barring a fail in the CRC
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.
Up until now, I have mentioned what type of address ing is used at Layer two or the data link clear
and what the protocol data unit
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,
one device specifically
well, Other devices also work at the datalink. Clear, but most specifically. Ah, switch operates at the data link. Clear.
Now I'm going to explain how a switch functions. So I'm gonna go ahead and draw a rudimentary switch on the board.
Excuse my drawing skills. Let's say this is switch one,
and to it are connected. Four devices. Let's say PC one pc to PC three on P. C. Four
Now just for example, sake.
Can we just pretend that PC ones Mac address is
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,
so we're gonna stick to 16 bits and pretend this is 48 bits
and P. C four is uh, let's go with D. Also, we're gonna pretend
that PC one is connected to switch one on port.
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
now inside off inside of a switch in software,
there exists a table called a Mac address table.
So let me go ahead and draw a Mac address table out too.
So this is going to be your Mac table.
I just skip the word address because I didn't think I'd have enough space. But this is called your Mac address table.
The Mac address table is a listing off all ports
on the switch. So port one
port for and other ports if the switch has them. But right now, we're just dealing with port 123 and four,
and the mac addresses off the devices that are connected at the other end of the port.
once this this operation is done, what you're gonna have in front of P one is a
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.
So when the switch is brand new
and devices just get connected and that the switch is powered up for the first time this Mac address table is empty,
this Mac address table is completely empty.
Now let's pretend that PC one
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,
and it's transmitting some data, which does not concern us.
That frame gets to PC. That frame gets to switch one Port one.
Now remember at this point Port one
in the Mac address stable has nothing in front of you.
switch one receives the frame from PC one inbound on Port one. Switch one reads the source. Mac address field in the frame
and adds PC ones. Mac address to the Mac table.
A gets added to the map table as soon as switched. One reads the source. Mac address field in the frame.
It adds the source Mac address to the Mac Adis table in front of the port that received the friend
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.
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.
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
and the rest of the Mac out of this table is empty,
switches make their fording decision.
Where to Ford the frame once it receives it based on the destination Mac address field in the frame.
Once again, switches make their fording decision based on the destination Mac address
So since the switch does not find the destination Mac address in in the Mac address table switch one floods the frame out
except the port that originated the signal in the first place, which was Port one,
so the frame gets flooded out too
out. People pour two to PC to out Port four to P. C. Four and out. Port three to PC three.
All of the devices get the frame
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.
It doesn't compare isn't against its own Mac address, which is B B B B
doesn't match BC. Two drops the frame.
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
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
now if at some later point,
so P C four replies back to P C. One.
When that frame arrived on Port Force, which one
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.
The switch one will add the Mac address dee bee dee dee
to the Mac address table,
Ruth tried to find the destination Mac address, which is a in the frame
in the Mac out of the stable, and it finds it
is available on Port one.
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
which one will find a
on port won and ford the frame out directly
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
and poor tree will have the entry C C C C.
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,
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.
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,
which one will look up? C, C, C C in its Mac address table? And for that for him out.
One of the mistakes I see people make, even though they
say that they know the operation off a switch. And by now you should have a pretty firm grasp of house, which operates.
They confuse the word flood with the broadcast.
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.
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
Sometimes I see people use the word broadcast.
That will get you in an interview process, at least if I'm interviewing you. So
is a frame that has all f's
in the destination portion of the frame.
I'm gonna go ahead and draw that out for you, so we'd never get this wrong again.
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.
And then you're I'm just gonna put c r C over here.
Of course, the field itself is called framed check sequence.
So a broadcast frame is a frame that has all else or all one's actually in binary. This equates to all ones.
a broadcast frame is a frame that has all left in the destination portion
and the destination Mac address portion of the frame
that frame that ho PC one set to pc to
the source Mac address in that frame was a the destination Mac address. In that frame was dee dee Dee dee.
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.
So P C one to PC for transmission.
A broadcast is a one to everybody transmission.
So if PC one sends out a broadcast
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.
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.
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
Ah, broadcast it Sent to everybody on purpose.
So once again, a broadcast frame will have all laughs. In the destination portion
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.
Now, why is it sent out all ports?
this address will never exist in the Mac address table.
The Mac address table
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
in the Mac address table, as soon as
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.
The flooding behavior has a different purpose. That is a broadcast.
Okay, hopefully we have that cleared up.