Okay, so I want to talk through in a lot more detail Exactly how we can send information from host A over here to host be over here.
This process is is really important.
So I wantto get really detailed and walk through this step by step.
So in the last video, you know, we talked about how we can't just send the Ethernet frame from Host A with host Bees Mac address as the destination.
So we can't just say our destination Mac is going to be.
We'll just use the last last bit here.
We can't just send it to this destination Mac address because then it's only gonna be sent on this Ethernet here from Host A.
And it's only gonna go.
It's only gonna be seen by these computers that are connected here.
It's not gonna get forwarded over here.
Eso instead, What we're gonna do is we're gonna use I p addresses.
So the destination I p address is gonna be host bees.
I p address, which is 1 90 to 1 68 22.
And then we can also set the source address of the frame that of the I p packet that Jose is sending two B 1 90 to 1 68.9 dot to which is host bees.
We just host a is I p address.
Um, and then this.
So the actual frame that gets sent here is gonna have this I p packet inside it with this source in destination I p address going from 9.22 22.
But the I P packet is gonna be inside of an Ethernet frame because this is still an Ethernet network, so we still need to have a source and destination Mac address in her Ethernet header.
Remember, if we look at our Ethernet frame format, we've got the preamble, and then we have this destination address, source, address, and this destination and source address.
These are Ethernet.
Address is on, and then the ether type will tell us that the payload is an I.
And so the i P addresses, they're gonna be somewhere in this payload.
But we still need to figure out what these are.
So the source address is pretty simple.
We're sending from host A.
So it's gonna be host a CZ Mac address which ends with the to C to D.
So the source address here is going to be to see to d and whatever comes before that.
But the destination we can't use host bees.
We have to use something on this network.
So the sort of obvious choices we will.
We want the San Francisco router here to forward it.
So we should use San Francisco's Mac address as the destination.
In fact, that's what we do.
So the destination address is going to be this 89 5 So this is going to be a e 95 But the question is, how does that actually get set?
How does host A know that San Francisco is the right place to send this even at frame?
I don't understand this a little bit better.
Let's take a look at how Host A is actually configured, and so I've sent my computer up in the same way.
And so here are the settings in my computer here, and so this is for my my Ethernet link on my computer, so my I P address is set to 100 to 1 68 9 dot too.
So that's the same asshole, stay here and then I've said There's two other things that you said when you set up an I P address on a computer and that is a subject mask, which in this case is 255.2 500 to 55.0.
And what this essentially is saying is this is this is kind of telling us what prefix of I P addresses is shared by this Ethernet network, and the way it tells us that is that if we convert this to binary 255 if you convert to 55 to binary, it's just a string of ones.
It's eight ones.
And so if we have three of these strings of eight ones together, that's 24 ones, followed by some zeros.
So if we convert this whole thing to binary, we get 24 ones, followed by eight zeros.
And the 24 ones is the key part there, because what this is saying is this is basically saying the same thing as if we have prefix.
If remember, from the last video of 1 92.1 68.9 where the prefix length of 24 So if we go back here, this sub net mask with 24 ones is just another way of saying that the prefix length is the slash 24.
And so what this says is that everything connected to this Ethernet network has this prefix i p address of 1 92.1 68 9 dot something.
So that's great.
So we know from host A.
If we want to go to one on you, too, don't want 68 that nine dot something.
Then it's going to be connected to this Ethernet network that were that were directly connected to.
But what if we want to go somewhere else?
What if we want to go to 1 90 to 1 68 20.2 for example?
So for anything else, we have this router I p address configured, which is 1 92.1 60.9 dot one.
And that is the I.
P address of this routers San Francisco routers interface.
And so what this is saying is, if it's not on this sub net, if it's not 1 92.1 68 9 dot something that matches this I pee in this prefix.
Then send it to this router.
So again, that's great.
But how do we actually send it to that writer?
We have the IP address.
We know that we want to send it to this 9.1, but we need to know howto how to get it to that Mac address.
And so there's actually a specific protocol that you can use to send a broadcast to everybody on the Ethernet network asking who owns this i p address so I could send from Host A.
I could send a broadcast saying like, Hey, everybody on this Ethernet network if any of you are are the owner of 9.1, respond to me and tell me what your Mac addresses and the protocol that we used to do.
That is called address resolution protocol.
And this down here is the actual format of that of the address resolution protocol.
And so what we would actually send from host A to find out the Mac address of the San Francisco router is we'd send an Ethernet frame to a broadcast address to the destination.
Address of this Ethernet frame is going to be the broadcast address which is just all f's, are all ones.
If you convert to binary, the source address then is going to be the source address of computer A, which is this whatever to see to d.
And I'm just gonna abbreviate that don't have to write the whole thing out.
Then the ether type is going to be the ether type that either type again describes what is in the payload.
And so what's in the payload?
Is this ARP request, and so the payload is actually going to be this whole thing here.
So if we look at what's in the payload that this and this is this is, uh this whole thing is called Art art, which is the address resolution protocol.
And so the either type here is gonna is gonna tell us that that the payload is this format.
And so there's a special code for that which is 0806 And so when we see this year Wade's or sixth and we know that the payload is gonna be this art format.
And so there's a bunch of things in this art frame.
Andi, I'll go through them kind of quickly because it's actually not that complicated.
So what AARP is doing is it's it's provided this protocol that lets us do a mapping between hardware addresses and protocol addresses.
And so the hardware address is the Mac address for Ethernet, and the protocol address is the i.
And so the first thing that we say in the art frame is we tell it the types of hardware address and particle address.
And so this is almost always gonna be, uh, hardware addresses.
Almost always gonna be one, which means Ethernet.
And the particle address is always gonna be 0800 which means I p and so we're gonna map between Ethernet and I p.
And then the harder address length is just the length of the hardware address and for Ethernet is always going to be six bites and the particle address length is the length of the address for I p and for I p, that's always gonna be four bites.
So these things are always these values here.
The next thing is up code, and this is gonna be either one or two, and one means that this is a broadcasted question that's being broadcast to the entire Ethernet network asking who owns a particular I P address and then to is the reply from someone saying I own that particular address and here's my Mac address.
And so the hardware address of the center is going to be whoever sending the packet.
So there's actually going to be two of these are frames being sent one that's being sent from host A.
So the hardware address of the center's gonna be host A and then the protocol address of the center is gonna be 1 92.1 68 9 dot too.
And in the harder edges that the target is actually gonna start out being all zeros because Host A doesn't know the address yet, and then the protocol address of the target is going to be 1 90 to 1 68 91 And so, by filling all of this out, host A can ask everyone on the network and say, Hey, whoever has 1 90 to 1 68 91 Please respond and filling your hardware address.
And by the way, I'm 1 92 1 68 9 dot too, and my addresses, whatever whatever to C to D.
And so this is being broadcast to everyone on the network because the Ethan that destination is this all f, sir, All one's broadcast address.
And so the San Francisco router is going to see this, and it's gonna reply, and it's going to basically send another one of these, except it's gonna send up code two, and it's just gonna swap these.
So in this case, when San Francisco replies, it's hard red dress is gonna be filled in its protocol address in this case is gonna be nine dot won.
The hard red dress of the target now it knows, is this.
It'll fill that in.
It'll feel in the protocol.
Address of the target is, too, and so that will be the reply.