Search This Blog

Nov 3, 2010

Lab 12: Static Routes

Objective: We will configure Routers 1, 2, and 4 with IP addresses and then add static
routes for all routers.






Goals:  
1)  Set our hostname and get our interfaces up.
2)  Ping our directly connected interfaces
3)  Configure static routes for our topology
4)  View our routing table
5)  Verify that we can ping all routers
 

1. Configure the Routers 1, 2, and 4 to the specifications outlined in the table above. 

2. After you have configured your IP address on each interface verify that you can ping
your directly connected neighbors.  That means when you are on Router 1 you should be
able to ping Router 2's Ethernet 0 interface and Router 4's Serial 0 interface.   

3. Now that we have our IP addressing setup correctly lets get into configuring our static
routes on each router.  First connect to Router 1.  Let’s think about what we are doing. 
We will need to establish static routes to any location that is not directly connected. 
Router 1 is directly connected to both Router 2 and Router 4 so it will not need any static
routes.  Next connect to Router 4. 

4. Now enter configuration mode and think about what the static route command will be. 
We know we currently cannot get to Router 2 because it is not directly connected.  So
now let’s think about Router 4 and the network it is connected to.  Off of its Serial
interface is network 12.5.10.0 that is connected to Router 1.  Router 1 is also connected to
network 10.1.1.0 that we would also like to access.  In this case we will need a static
route for network 10.1.1.0.  On Router 4 what command would you use to establish a
static route to network 10.1.1.0?
Router4(config)#ip route 10.1.1.0 255.255.255.0 12.5.10.1
We established a route to network 10.1.1.0 on our router.  Now whenever a packet of
information is destined for network 10.1.1.0 it will be sent to the router with IP address
12.5.10.1 which in this case is Router 1. 

5.  Lets see what we accomplished.  When we are on Router 4 and we know we can ping
Router1's Serial interface but we could not ping Router1's Ethernet interface. We should
now have established a route to network 10.1.1.0. To make sure we understand what our
route did for us, try and ping Router 1’s Serial 0, Router 1’s Ethernet 0 and Router 2’s
Ethernet 0.
Router4#ping 12.5.10.1
Router4#ping 10.1.1.1
Router4#ping 10.1.1.2 

6. Why couldn't we ping?  If you think about a packet going through the network it leaves
Router 4's S0 interface destined for 10.1.1.2. The packet knows this is on the 10.1.1.0
network so it is going to first go to 12.5.10.1 because of our static route.  When it gets to
10.1.1.1 (Router 1) the Router looks at its Routing table and knows that it is directly
connected to network 10.1.1.0 off its Ethernet interface, so it sends the packet out there. 
Router 2 picks up that packet and wants to respond back with a "Hey, You found me".  It
looks at the Source IP address and it is 12.5.10.2 (Router 4's Serial 0 interface). When it
goes to send the packet it does not have a route to network 12.5.10.0 so it drops the
packet.  This is why you did not get the !!!!! as a successful response.   

7. Just to make sure our static route worked view your routing table to see if it is in there.
Router4#show ip route 
8. To get the static routes to work we need to connect to Router 2 and give a static route
back to Router 4's network.  What command will set a static route on Router 2 for the
network 12.5.10.0?
Router2(config)#ip route 12.5.10.0 255.255.255.0 10.1.1.1
That means anything we are sending to network 12.5.10.0 will go to 10.1.1.1 first. 

9.  Connect back to Router 4 and make sure you can ping all of the interfaces we have
working.  
Router1 Ethernet 0 : 10.1.1.1
Router1 Serial 0 : 12.5.10.1
Router2 Ethernet 0: 10.1.1.2 

10.  Lets look at the routing table on Router 2 and talk about its entry.
Router2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
U - per-user static route

Gateway of last resort is not set
C 10.1.1.0/24  is directly connected, 10.1.1.2
12.5.10.0/24 [1/0] via 10.1.1.1
Looking at the second line we see the "S" denoting the Static route. Next we see the
destination network and its subnet info.  The [1/0] is showing the administrative distance
(by default "1") and the metric (in this case hop count) which is 0. Via just says the
address to go to which in this case is 10.1.1.1.