Static Routes in Packet Tracer
Static Routes in Packet Tracer
ar
This tutorial is to help you understand how static routing works and how to configure it.
The exercise is done with 3 routers because I noticed that when there are more than 2 routers, they don't know how to
solve it.
In the graph, you can see the topology that we are going to use and that you have set up and running in
Packet Tracer. The purpose of the exercise is to be able to route traffic between the networks.
192.168.1.0/24, 192.168.2.0/24, and 192.168.3.0/24 without any routing protocol, using only
static routes.
Host A
192.168.1.2
Mask: 255.255.255.0
192.168.1.1
Host B
192.168.2.2
Mask: 255.255.255.0
Default Gateway: 192.168.2.1
Host C
192.168.3.2
Mask: 255.255.255.0
Default Gateway: 192.168.3.1
Observations: The default gateway for the hosts is the router's interface.
connected to the network to which the host belongs. In this case, it is the FastEthernet 0/0 of each router.
STEP 2 - Basic Configuration of Routers
Router A
Router>enable
Router#config terminal
Router(config)#hostname RouterA
RouterA(config)#interface fastethernet 0/0
RouterA(config-if)#ip address 192.168.1.1 255.255.255.0
RouterA(config-if)#no shutdown
RouterA(config-if)#exit
RouterA(config)#interface serial 0/0
RouterA(config-if)#ip address 10.0.0.2 255.0.0.0
RouterA(config-if)#no shutdown
Router B
Router>enable
Router#config terminal
Router(config)#hostname RouterB
RouterB(config)#interface fastethernet 0/0
RouterB(config-if)#ip address 192.168.2.1 255.255.255.0
RouterB(config-if)#no shutdown
RouterB(config-if)#exit
RouterB(config)#interface serial 0/0
RouterB(config-if)#ip address 10.0.0.1 255.0.0.0
RouterB(config-if)#clock rate 56000
RouterB(config-if)#no shutdown
RouterB(config-if)#exit
RouterB(config)#interface serial 0/1
RouterB(config-if)#ip address 11.0.0.1 255.0.0.0
RouterB(config-if)#clock rate 56000
RouterB(config-if)#no shutdown
Router C
Router>enable
Router#config terminal
Router(config)#hostname RouterC
RouterC(config)#interface fastethernet 0/0
RouterC(config-if)#ip address 192.168.3.1 255.255.255.0
RouterC(config-if)#no shutdown
RouterC(config-if)#exit
RouterC(config)#interface serial 0/1
RouterC(config-if)#ip address 11.0.0.2 255.0.0.0
RouterC(config-if)#no shutdown
Observations: With the routers configured this way, they must have basic connectivity among all of them.
the devices.
If you have questions, run a 'show cdp neighbors' from the routers in privileged exec mode (#).
and in the result, if everything is configured correctly, the routers and switches should appear
directly connected, if any do not appear check the settings because something is wrong
they did.
STEP 3 - Configure Static Routes
There are two ways to configure static routes, using the 'next hop IP' or the 'interface of
exit", they can use either of the two. Usually, the "IP of the next hop" is used, which is the
IP of the directly connected router interface, but if we do not have it among the data, we can
use the 'output interface' which is the interface of the local router. There is no way to make static routes.
without knowing the destination network address, for that case, 'default routes' or a 'default' are used
gateway" on the router (I will make a tutorial about these configurations later).
Router A
RouterA>enable
RouterA#configure terminal
RouterA(config)#ip route 192.168.2.0 255.255.255.0 10.0.0.1
RouterA(config)#ip route 192.168.3.0 255.255.255.0 10.0.0.1
Observations: With these static routes, we are telling RouterA that all traffic towards the
Network 192.168.2.0 and 192.168.3.0 should be sent to the interface with the IP 10.0.0.1 so that it
solve.
RouterB
RouterB>enable
RouterB#config terminal
RouterB(config)#ip route 192.168.1.0 255.255.255.0 10.0.0.2
RouterB(config)#ip route 192.168.3.0 255.255.255.0 11.0.0.2
Observations: With the first static route, we are telling RouterB that all traffic towards the
The network 192.168.1.0 must be sent to the interface with the IP 10.0.0.2 for it to be resolved.
With the second static route, we are telling RouterB that all traffic to the network
192.168.3.0 should be sent to the interface with IP 11.0.0.2 for it to resolve.
RouterC
RouterC>enable
RouterC#config terminal
RouterC(config)#ip route 192.168.2.0 255.255.255.0 11.0.0.1
RouterC(config)#ip route 192.168.1.0 255.255.255.0 11.0.0.1
Observations: With the first static route we are telling RouterC that all traffic towards the
Network 192.168.2.0 must be sent to the interface with IP 11.0.0.1 for it to resolve.
With the second static route, we are telling RouterC that all traffic to the network
192.168.1.0 should be sent to the interface with IP 11.0.0.1 to resolve it.
B) Configure Static Routes Using the 'Exit Interface'
Router A
RouterA>enable
RouterA#config terminal
RouterA(config)#ip route 192.168.2.0 255.255.255.0 s0/0
RouterA(config)#ip route 192.168.3.0 255.255.255.0 s0/0
Observations: With these static routes we are telling RouterA that all traffic towards the
Network 192.168.2.0 and 192.168.3.0 must be sent through the local interface s0/0.
RouterB
RouterB>enable
RouterB#config terminal
RouterB(config)#ip route 192.168.1.0 255.255.255.0 s0/0
RouterB(config)#ip route 192.168.3.0 255.255.255.0 s0/1
Notes: With the first static route we are telling RouterB that all traffic towards the
Network 192.168.1.0 should be sent through the local interface s0/0.
With the second static route, we are telling RouterB that all traffic to the network
192.168.3.0 should be sent through the local interface s0/1.
RouterC
RouterC>enable
RouterC#config terminal
RouterC(config)#ip route 192.168.2.0 255.255.255.0 s0/1
RouterC(config)#ip route 192.168.1.0 255.255.255.0 s0/1
Observations: With the first static route, we are telling RouterC that all traffic towards the
Network 192.168.2.0 should be sent through the local interface s0/1.
With the second static route, we are telling RouterC that all traffic towards the network
192.168.1.0 must be sent through the local interface s0/1.
Device Connectivity Check
Before configuring the static routes, you need to make sure that all neighboring devices are
from topology are being seen.
One of the ways is using the command 'show cdp neighbors' from each router which will show us
in its result the routers and switches directly connected to it, if any do not appear there is something
mal configured.
Another thing you have to try is to ensure that the hosts communicate with the 'default gateway'.
(link) of the network, this can be done with a ping from a host to the IP of the router's interface
connected to the network to which the host belongs.
Observations: In RouterA, the reading of the static routes will be as follows: All traffic with
Traffic to the networks 192.168.2.0 and 192.168.3.0 will be sent to the interface with IP 10.0.0.1.
Observations: In RouterB, the reading of static routes will be as follows: All traffic with
Traffic destined for the network 192.168.1.0 will be sent to the interface with the IP 10.0.0.2 and all traffic to the
Network 192.168.2.0 will be sent to the interface with the IP 11.0.0.2
Notes: In RouterC, the reading of static routes will be as follows: All traffic with
Traffic destined for networks 192.168.1.0 and 192.168.2.0 will be sent to the interface with IP 11.0.0.1.
Static Route Verification using the Output Interface
The command 'show ip route' displays the device's routing table. The marked routes
those marked with 'c' belong to directly connected networks and those marked with 's' are the routes
configured statics.
Observations: In RouterA, the reading of static routes will be as follows: All traffic with
Destination to networks 192.168.2.0 and 192.168.3.0 will be sent through the local interface Serial 0/0.
Observations: In RouterB, the reading of static routes will be as follows: All traffic with
Traffic destined for the network 192.168.1.0 will be sent through the local interface Serial 0/0 and all traffic towards the network
192.168.2.0 will be sent through the local interface Serial 0/1.
Observations: In RouterC, the reading of static routes will be as follows: All traffic with
Traffic to the networks 192.168.1.0 and 192.168.2.0 will be sent through the local interface Serial 0/1.
Exercise Check
To check the exercise, it is enough to ping between the different hosts, and if they all are
successful the exercise is ok.
I leave you the screenshot of the exercise verification. As you can see, it works.