Professional Documents
Culture Documents
7.2.1 IPv4 Routing Overview
7.2.1 IPv4 Routing Overview
In this video we're going to spend some time talking about howrouting should
normally occur on a network that's using IPv4.
The first thing that happens is PC1 creates the data using the OSI model that's
going to be sent to the other host. It goes through the upper layers of the model
where the data is created and where the segmentation occurs, and so on. When it
hits Layer 3, some important things have to happen in order for routing to work.
Well, we can't do that here. PC1 has no idea which subnet PC2 is on. Therefore,
instead of putting the MAC address of PC2 into the destination field of the frames,
what it has to do instead is set the destination address of each frame to the MAC
address of the default gateway, this router right here. At Layer 3, each one of
these packets is addressed over here to PC2's IP address. But at Layer 2, the frames
are addressed to the IP address of the default gateway router.
At this point, we've got our packets created and addressed.We've got our
frames created and addressed. They move on down the OSI model down to Layer
1, at which point each ofthese frames gets sent to switch 1. Switch 1 looks at the
destination MAC address of each frame and says, "Oh, I know where that is. That's
the host over here that's connected to this port. I'll go ahead and forward them out
that port," and they arrive at the interface on this router.
At this point, the default gateway is going to compare the destination network
address to its routing table. If the destination network is directly connected to the
router itself, then it doesn't need to go any farther. All it has to do is forward it out
the appropriate interface with the MAC address of the destination host inserted in
the destination address of each frame. If the destination route is not directly
connected, then it's got to refer to its routing table in order to determine where to
send the data next.
At this point, we have our original packets that we created on PC1. They were
inserted into frames on PC1 and sent to the default gateway. The default gateway
pulled the packets out of the frames, created new frames, put those packets into
the new frames. The destination address of those frames is this interface right
here, and the source address of those frames is this address right here, the exit
interface of the router.
The second router is going to re-encapsulate the packets back into frames. The
destination address of each frame is the MAC address of this interface here on the
third router. The source address will be the exit interface on the second router.
The process is going to repeat itself again when the data finally reaches the third
router. However, something is going to be different this time. This time, the
destination network is directly connected to the router itself, so it does not need to
forward the data any further.
Instead, what it needs to do is find out what the MAC address is of the destination
host. Remember, it's got to create frames again. It's decapsulated the frames it
received from Router 2 to get at the packets and it knows that now those packets
are going to the right network, a directly connected network, but it's got to
put those packets back into frames to deliver it to the destination host. The source
address of those frames is going to be the exit interface right here, but we've got to
find out what the destination MAC address is of the target host that has an IP
address of 192.168.1.10.
To do this, it's going to use an ARP broadcast, possibly. It will send out an ARP
broadcast on this local network segment trying to identify the MAC address
associated with the destination IP address of the packets: 192.168.1.10. Now of
course the router has probably already delivered data to PC2 at some point, and if
it did, it's going to have the MAC address of that hosts already stored in its ARP
cache. If this is case, it won't actually have to use ARP to find the destination host.
However, for our purposes let's suppose the router doesn't know about PC2 yet. It's
a brand new system, just barely plugged in. It goes ahead and sends an
ARP broadcast on the network segment. Now PC2 receives that ARP broadcast and
notices that the ARP request is for its IP address and says, "Hey, that's me,"
basically. PC2 responds back to the ARP requestsaying, "Hey, I am 192.168.1.10
and here is my MAC address," and delivers it to the router. The router then uses
that MAC address to go ahead and take those original packets and encapsulate
them back into frames. The destination of each frame is that MAC address of PC2,
while the source address of each frame is the MAC address of this interface here on
the router. It transmits it on the network.
The switch receives the frame. It says, "Hey, I know where thehost is that has that
MAC address. It's connected to this port right here. I'll go ahead and just forward
them out that port," and therefore the frames arrive at the destination host, which
then runs them up through the OSI model, decapsulating the frames into packets,
resequencing the packets, reconstructing the original data, and the transmission is
complete.
Summary 9:57-10:20
That's it for this lesson. In this lesson we talked about theprocess that normally
occurs when we need to route data through an IPv4 network. We talked about how
data isencapsulated in packets and frames on the sending host, how that data
is delivered to the default gateway, how routing decisions are made
between routers, and then how ARP is used at the destination to identify the
MAC address of the destination system.