Okay so in this lab we need to configure static routes to enable IP connectivity between hosts on the
left and hosts on the right. As an example
if I open up a console on PC 1 and try and ping 172.16.1.2 the DNS server I'm told that
the destination is unreachable IP config /all shows us that this PC has this IP address configured
and its DHCP server and a default gateway 192 168 1 254. That device is router 1 and we
can verify that by using the command show IP interface brief notice the IP address on gigabyte 0
00. Now in this topology IP addresses are not shown.
So I'm going to add IP addresses to the topology to make it easier to configure the static routes.
We can see that this interface is configured with this IP address. Show IP route will also show
us some early information including the subnet mask used on interfaces. As an example, we can see
that a /24 network is used on gigabit
000.
As shown here and this is the IP address configured on that interface you could simply use a show run
to see that information as well.
Notice this IP address is configured on gigabit 000 and this IP address is configured on gigabit 0
01. So 192.1682.1 is configured on that interface again as shown here.
Don't always rely on show run.
Learn to use other commands such as show IP route and learn to interpret the output of the commands
we can see that this route is directly connected to gigabit
001 as shown there,
this is the IP address configured on that interface.
Notice also that no static routes or any other routes except connected and local routes are displayed
in the routing table. Show IP protocol shows us that no routing protocols are enabled on Router 1.
We can do something similar on router 2,
show IP interface brief
shows us the IP addresses configured on interfaces.
Show IP route shows us the routing table.
No static routes are configured on the router no IP routing protocols are enabled.
We only see connected and local routes in the routing table.
So show IP route once again we can see that this IP address is configured on gigabit
000. So 192.168.2.2 is configured on that interface as shown here
there's the IP address there's the mask used.
This is derived from the IP address configured on the interface. So that this IP address is configured
on gigabit
000 /24 mask.
So hence in the IP routing table, we see this as a connected route.
This is the actual IP address configured on that interface.
Same as shown here we can see the actual IP address and the subnet mask used on this interface. So 1
92.168.3.1/24 is the IP address configured on that interface and to confirm that when we
type show run we can see the IP address and subnet mask on the interface. Let's have a look at router
3 interfaces have come up on router 3 show IP interface brief we can see that this IP address is configured
on gigabit 000 that's already shown in the topology diagram. This IP address is configured on this
interface show IP route confirms that this IP address is configured on this interface that's the subnet
mask. So 192.168.3.2/24 is configured on this interface. OK so looking at the routing
tables once again router 1 only knows about directly connected routes it doesn't know about this network
or this network. Notice the server is in the same subnet as router 3 cisco.com
is also using an IP address in that subnet.
So this is most likely configured as a layer 2 switch even though it says core 2 here when I type
show run we can see that no configuration is configured on the switch apart from an IP address which
is actually incorrect for this lab but won't affect what we're trying to accomplish here.
So router 1 only has direct connected and local routes in the routing table.
The same is true for router 2 as well as router 3.
We only have connected in local routes in the routing table.
So in router 1, we need to configure a static route for every network
that's not directly connected.
In other words, we need to create a static route for this network as well as this network.
So IP route 192.168.3.0 subnet mask will be this.
We've already determined that when we looked at the IP addresses and routes on the routers
but once again show IP route shows us the route on router 3.
Now what is the next hop or outgoing interface.
We've been told to use next hop IP addresses.
So rather than using the local outgoing interface, we're going to specify the next hop which is 192.1
68.2.2. From router one's perspective to get to this network
it needs to send the traffic to router 2 so as traffic is sent out of this interface the next IP
address that it's going to hit is this IP address,
that's the next hop IP address.
Now we could specify administrative distance.
We are not asked to do that in this lab.
So I'm not going to configure an admin distance.
Notice how the routing table has been updated.
This route has been added to the routing table.
It's a static route.
This network is available via this next-hop router administrative
distance is 1.
The cost to get there is 0, static routes to next hop IP addresses have an admin distance or administrative
distance of 1. So at this point, I should be able to ping this IP address on router 2 which I can but
I won't be able to ping this IP address because router 3 doesn't know how to send the traffic back to
router 1. Router 2 can reply because this network is directly connected, router 2 knows about this
network so it can reply back to pings sent from R1 when R1 pings 192.168.3.0 it uses
the outgoing interface as the source IP address.
In other words, this will be the source IP address for traffic sent from router 1 to router 2 and router
2 knows how to get back to this IP address so pings succeed but they don't succeed
to router 3 because router 3 doesn't know how to get back to this IP address.
Okay, so show IP route on router 1
we've got one static route configured
we still need to configure the static route
172.161.0
in other words the segment.
Now to get to that network which once again we can see on router 3 this network 172.16.1.0/
24
we need to send the traffic to router 2, router 2 is still our next-hop router to get to that destination
network. Traffic sent from router 1 to any device in the subnet will firstly be sent to router 2,
this is the next-hop IP address. So show IP route
we now have two static routes in the IP routing table of router 1.
I'll save that configuration. Now in router 2
we need to do something similar, at the moment they are only connected and local routes in the routing
table. So IP route 192.168.1.0 subnet mask, this is a /24 subnet mask from router 2s point
of view to get to this network the next hop is router 1.
So 192.168.2.1, from router 2s point of view to get to this network
the next hop is this IP address.
Once again we only have 192.168.2.0 and 3.0 in the routing table.
We have to add this network via a static route and we have to add this network via a static route.
So IP right 172.16.1.0/24 mask, next hop will be 192.168.3.2.
So show IP route
this router now has 2 static route in the routing table and at this point should be able to ping 192
point it should be able to ping the DNS server, the DNS server is configured with router 3 as its default
gateway so traffic from here can get to here to there and back again
but notice on router 1 we still can't ping 172.16.1.2 because router 3 doesn't know how to send
the traffic back to router 1. If we did a traceroute to that IP address
notice the traffic it gets to router 2 and then we have a timeout because router 3 doesn't know
how to reply back to router 1. Traffic is not being returned to router 1
So the last step is to update the routing table of router 3.