In this lesson,
we're going to look at understanding routers.
Now on my screen, you can see
that I'm using a program called Cisco Packet Tracer.
The use of this program is beyond the scope
of the network plus exam, but I'm going to show it to you here
as a way for you to understand
how packets will be routed across our network.
In this particular network,
I have designed that we have three different sub-networks,
called the HR network in the top right,
the IT network in the bottom right,
and the support network in the bottom left.
All of these are connected by the backbone router,
which you can see located right here
in the center of the screen.
As you look at this, we're going to start from the bottom left
and work our way to the top right
as we talk about the different parts of the network.
On the bottom left, you'll see there are four devices,
starting with two PCs on the left side,
called support one and support two.
Both of these have been configured
with IP addresses in the network of 172.16.0. something,
and you can see that the top one is .11
and the bottom one is .12.
Both of these are connected to a layer two switch,
called the support switch, which because it's layer two,
does not get an IP address, but instead,
we'll use Mac addresses to identify these two PCs.
If these two PCs want to talk to each other,
they can do that on this local area network segment
without going out to the router.
But if they want to reach out to something else,
like the web server on the right hand side of the screen,
or the human resource computers
on the top part of the screen,
they're going to have to go through a router,
and that's why we have this Dion training support router.
When you can see a router, you will notice
there are two IP addresses associated with it,
one on the left side of it, and one on the top side of it.
We call this the inner, or on the left side,
or the outer, which is the top side.
Notice that the inner,
we are using the network of 172.16.0.1/24
which is the IP address for that router.
And anything in the 172.16.0. something
will be listened to and collected by this router
and then brought into this sub network
through the support switch,
and then it will find the IP address associated
with one of the machines inside of that network.
From this router, we're going to go up to the backbone router
and this backbone router will connect
to all the other subnets in our network.
You'll notice I have a total of four routers here,
but everything connects back
from one of the other three routers to this backbone router.
So if I want to send stuff from the support PC number one
over to HR PC number two,
I'm going to go from support PC number one
down to the support switch,
through the Dion training support router,
up to the backbone router,
over to the Dion training HR or human resource router,
over to the human resource switch,
and then up to human resource PC number two,
which has the IP address of 192.168.0.12.
You'll notice here I have a laptop and a desktop.
The HR one is a laptop with 192.168.0.11,
and HR two is the PC with 192.168.0.12.
Both of those are connected to the human resource switch
and can communicate freely amongst themself
without going through the router, until they want to go
to one of the other parts of the network,
such as support or IT.
You'll notice the Dion Training Human Resource router
also has two IP addresses.
The inner one is on the right side,
and that's 192.168.0.0/24,
which will be listening to everything
inside of the human resource Network.
And then we have the outer reference one,
which would be a public IP in most cases,
but because this is an internal network,
we're just going to be using private IPs,
so I've chosen to use 10.0.0.1/30
as the outer or public side of that router.
Now notice I'm using a slash 30 here, why is that?
Well, when we talk about sub-netting,
we want to use the smallest subnet that we need
for a given network size,
and because we're creating a point to point connection
between two routers,
specifically the human resources and the backbone router,
I only need two usable IPs.
And by using a slash 30 subnet, I get four IPs,
one for the network, two for the devices,
and one for the broadcast.
So this particular network between the human resource router
and the backbone router is the 10.0.0.0/30 network,
and I have two devices on that,
the human resource router, which is .1,
and the backbone router's interface,
connecting to the human resource router, which is .2,
and the broadcast would be .3.
You'll notice that I connect to the next one
between the backbone router
and Dion training support router,
and this is using the 10.0.0.4/30 network,
which begins with the first IP of 10.0.0.5,
and then connects down to the support router with 10.0.0.6.
We've done the same thing here going on the .8 network
by using 10.0.0.9/30 between the backbone router
and 10.0.0.10/30 on the Dion training IT router.
The Dion training IT side of the network, on the inner side,
is going to be 192.168.1.0/24,
which tells you that's all the IPs or 254 possible hosts
that can be connected through this IT switch,
and in this case, we have just two,
a web server located at 192.168.1.12
and PC IT one, which is at 192.168.1.11.
Now that you understand what the network looks like,
let's talk about how these routers are configured.
Now, when we look at these routers,
each router has to have a routing table.
And in this case, I've used a static routing table
because I only have four different routers,
and this will make it easier for you to see
what these routing tables look like.
Now in order to see the routing table
on these different routers,
we just simply need to click into them
inside of Packet Tracer.
So I'm just going to go ahead
and click on the support one first,
and from here, we're going to click on static routing
because this is how I've configured mine.
I'm going to move this over to the right
so we can see it a little bit easier,
and you'll see that there are two different
network addresses that are being addressed here,
in my static routing.
Notice I have 192.168.0.0/24,
and this is going to be via the 10.0.0.5 connection.
Now if you look at the 192.168.0.0 connection,
that is the human resource network
and we want to be able to talk to it by going to 10.0.0.5.
If you notice, where is 10.0.0.5?
Well, it is the backbone router
connected to the Dion training support router.
So anytime Dion training support gets something
from one of those support PCs that's destined
to something in the 192.168.0.0 subnet,
which is the human resource subnet,
it's going to send it out through its gateway
to the backbone router,
and the backbone router will then route it off to that way.
We don't know exactly where it is,
we just know that our first hop
is going to be the backbone router, and then from there,
the backbone router will tell us where to go.
Alternatively, if we're trying to send something down
to the IT training network,
we can see that is located at 192.168.1.0, and again,
we're going to send it out directly to that backbone router
because that is the first hop outside
of our Dion training support router.
If we look at the Dion training IT router,
it's going to look extremely similar to that.
We're going to our configuration and our static,
and once we see our static routes,
you will see the same thing.
Instead of having the Dion training IT network listed here,
we have human resources again, just like we did before,
and now we're going to have the support network listed here
with 172.16.0.0/24.
Both of these are going to go out through 10.0.0.9,
which is the connection for the backbone router
that's connected to the Dion training IT router
at the bottom right.
If we go up here to human resources,
we will see the same thing, but this time,
we are going to see that it's going to have the IT
and the support networks being shown here
instead of the human resource one.
So we have the IT network at 192.168.1.0/24, via 10.0.0.2
and then we have the support network,
starting with 172.16.0.0/24. and again, going to 10.0.0.2,
which as you can see, is the external interface
connected to the Dion training HR router
for the backbone router.
Now as you saw,
all three of those networks only had two things in it,
but if we go to the backbone router,
it needs to know how to connect to all three of them.
So if we look into our static routes here,
you will see that I've created three different routes,
one for each network, and they're going to be going out
different ethernet ports on that particular router.
So if I'm trying to go up to the human resource network,
which is 192.168.0.0/24,
that's the third route in my static list,
and it's going to go out port 10.0.0.1, which as you can see,
is the external interface for the Dion training HR router,
located there in the center of my screen.
If I want to look at Dion training IT router,
you will see that it's external interface is 10.0.0.10,
and if I look here in my static routes,
you will see that as the first one listed
because it's covering the 192.168.1.0/24 network,
going out that particular port.
And if we want to go to the Dion training support network,
we're going to be using 172.16.0.0/24 as the network
and we'll go out the port that is assigned to 10.0.0.6,
which is the external facing port
that is connected from the backbone router
down to the Dion training support.
Remember, anytime you're creating a static route,
you want to be listing the destination of the next hop,
which going from the backbone router,
will be those three edge routers.
If we're going from any of those subnets,
it will be the external interface on those backbone routers
instead of the edge routers.
All right, now that we understand a little bit
about what we're looking at here,
let's look at a packet as it's going to go
from support one over to the web server.
So what we're going to do here
is I'm going to close out of this little window
and I'm going to click on support one.
From here, inside this program,
we do have the ability to open up all sorts of things,
including web browsers and IP communicators
and firewalls and other things, but for our purposes,
we just want to use the command prompt right here.
Now, I know this is going to be a very small screen,
but essentially this is just the command prompt,
like you'd have on a Windows, Mac, or Linux machine,
and in this case, it is simulating a Windows machine.
So I'm just going to type in ping
and then the address of the web server that I want to go to.
Remember this is coming from the support one PC
all the way on the left side of my screen,
and I want to go over to the web server,
which is 192.168.1.12.
Now when I hit enter, nothing is going to happen yet
because I'm in simulator mode.
And then this is going to allow me
to go through the play controls on the bottom right corner
and take it one step at a time,
as you watch that ping packet, notated by that black square,
move through the network.
Now where would we expect this to go?
If we want to go from support over here,
over to the web server,
I'm going to expect it to go first to the switch
and that's going to push it directly to my support router
because we are doing something using an IP address,
which means it's outside of our local network.
Once I issue the ping, it's going to go to the support router
and the support router's going to look at that IP address
and say, "Is 192.168.1.12 in my network?"
And the answer is no 'cause the only thing in its network
is things that start with 172.16.0.1.
So what is it going to do?
It's going to check its static routing table,
and it knows how to get to the IT network.
It says it's going to go to 10.0.0.5/30,
which is this backbone router.
From the backbone router, it's going to look at and say,
"Well, my routes are all 10.0.0. something,
but this isn't one of those.
This is a 192.168.1. something.
Where is that?
That's over in the IT network. I know how to get there.
I'm going to send it to this router at 10.0.0.10."
And then from there, it's going to go to the IT switch,
and from the IT switch, it's going to be using ARP
to get it over to the final address that we need to,
which is 192.168.1.12, in which case,
the reply will come back that way
through the same network we went,
all the way back to support one.
So let's go ahead and see what that looks like now.
All right, we're going to go ahead and start the simulation
by stepping through this.
First it's going to go to the support switch.
From there, it's going to go to the support router.
From there, it's going to check the routing table
and it's going to see that needs
to go up to the backbone router.
The backbone router receives it,
realizes it's not part of its network
and forwards it out to the gateway that it knows,
which is 10.0.0.10,
which goes to the Dion training IT router.
From here, it's going to go to the switch,
and from here, it's going to go to the web server.
Once it's at the web server,
you'll notice that the ping happened to both places.
And the reason it did that is because it didn't know
which these was that IP address
because this was our first time
sending something to these servers
and the switch was still learning its routes.
So in this case, the switch now knows
that the machine at 192.168.1.12 is the web server,
and next time we send a packet,
we will only get it sent to that web server.
And in this case, IT one is just going to ignore it
because it's not really destined for it.
Then the web server's going to send its reply
and it's going to go back to the switch.
From the switch back to Dion training IT router.
From there, the router goes, "This ain't part of my network.
It needs to go back to 172.16.11.
I only know the way to get there
is through the backbone router."
So it sends it up to the backbone router.
The backbone router knows where it goes.
It goes down to 10.0.0.6, and from there,
it's going to go to the support switch,
and then from here, it's going to go back to the support PC.
And there we go.
You now have a completed ping,
going from support one all the way to the web server
and all the way back, and all it did
was go through these routing tables
to make sure it knew which network it needed to go to
based on the IP address it was destined from,
and the IP address it was coming from.