You are on page 1of 5

IPv4 Routing Overview 0:00-0:10

In this video we're going to spend some time talking about howrouting should
normally occur on a network that's using IPv4.

Normal Routing Using IPv4 0:11-1:02


We have a network here that we're going to use to transfer data between hosts. We
have PC1 here and we have PC2 over here.Now PC1 over here would like to take a
piece of data and send it to PC2 through the network. Now you'll notice that it
cannotsend the data directly to PC2. They're not connected to the same
switch. They're separated by three routers. Therefore, in order to get the data from
PC1 to PC2, we're going to have to route it.

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.

Create Packets 1:03-1:44


We have our packets that we've just created. Let's say we created three of
them. When they hit Layer 3 of the OSI model heading on down to Layer 1, we have
to specify where those packets are going to go. We set the destination address of
thesepackets to the IP address of PC2. Let's just suppose that PC2 hasan IP address
of 192.168.1.10. We will actually take this IPaddress and we'll put that IP address in
the destination field of each one of these packets. The source address will be set to
the IP address of PC1.

Create and Address Frames 1:45-3:53


At this point, we're done with the packets. We need to move them down in the OSI
model to Layer 2, where we create frames. Now, as these packets move down
to Layer 2, the system is going to realize that the destination host, PC2, doesnot
reside on the same subnet as PC1. Let's suppose that PC1 over here has an IP
address of 10.0.0.3. The system recognizes right away that 10.0.0.3 is not on the
same network as 192.168.1.10, so the way that the individual frames are going to
be addressed is going to have to happen differently. If PC2 were on the same
subnet as PC1, then all we would have to do is set the destination field of
our frames to the MAC address of PC2,and it would go up to the switch and then
immediately be delivered to that system because the switch would recognize the
MAC address and know which port to send the frames to.

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.

Decapsulate the Frame at the Default Gateway Router 3:54-5:12


At this point, the default gateway router is going to receive each frame. Now,
remember that from the Layer 2 perspective, the frames are addressed to this
interface right here on the router.From a Layer 2 perspective, the router does not
know where those frames are supposed to go next. In order to find out
where they're supposed to go, the router has to decapsulate these frames. It has to
essentially extract the packets out of each frame so that it can see where they're
supposed to gofrom a Layer 3 perspective. Because the router is concernedonly
with Layer 3 information, it's got to see the Layer 3destination IP address of
each packet in order to determine where that packet is to go next.

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.

Re-encapsulate at Layer 2 5:13-6:08


In this example, the destination network is not directly connected to the
default gateway; it's clear over here. It's got to go through two more routers before
it can reach the destination network. The packets that are currently at the default
gateway over here have to be re-encapsulated at Layer 2 into frames that are
addressed to the MAC address of the next hop router, so we'll insert that address
and then send those frames out through the exit interface on the router, which is
right here.

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.

Uses HDLC at Layer 2 between Routers 6:09-6:41


It's also important to note that up until this point we've beendealing with Ethernet
networking. However, once we get to the routers, things change. Between routers
we're dealing with not an Ethernet connection but instead a serial connection that
usesHDCL at Layer 2 of the OSI model. Now this information is goingto be
transferred to the next router right here, which willperform the same
decapsulation process as the first router. It will strip off Layers 1 and 2 to get to the
Layer 3 destination IP address.

The Process Is Repeated between Routers 6:42-7:15


Again, it's going to consult its routing table to see where thedata should go next
based upon the network address of each packet. Again, it discovers that
the destination network is not directly connected to that router, so it's got to use its
routing table to determine where the packets need to go next. In this case they
need to come over here to the third 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.

Uses an ARP Broadcast to Identify the Destination Host 7:16-9:56

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.

You might also like