IPv4 routing: how to configure static route on a network topology with three routers

Static route is awesome if you know what you are doing. An excellent implementation of static route on your network puts you in total control of your routing table, making sure there are no rooms for any neighbor routers to goof up your routing table and cause unimaginable problems on your network. In this demonstration, we will be looking at one of the first network designs you are presented with when studying routing in the CCNA series.

The topology involves three routers with two WAN links and three local area networks between them. The objective is to achieve full connectivity among all the hosts on all the networks, using static route.

What you should commit to memory about static route:

>>It has a default administrative distance of 1

>>It supports variable length subnetmask and classless addressing

>>Networks/subnets must be statically configured on all routers

>>It’s supported across all vendors’ equipment

>>It does not use your bandwidth for route advertisement

>>Implementing static route on a large network can be tasking though not impossible

 

Read:  Use Cisco router to redirect dns requests to a local dns server

 

Network Topology:

static route

Using the Cisco Packet Tracer, select three Cisco 2811 routers, three 2960 Cisco Catalyst switches, and six desktop computers. To get the serial connections, click on the router, click on physical, switch off the router, click and drag the WIC-1T module to one of the expansion slots. For router1, I added two modules of WIC-1T because router1 has two serial connections. The image below shows how it is added.

Cisco 2811 router expansion slots

Implementation

On Router0: I will configure both the serial and f0/0 interfaces, implement static routes to get to the three networks that are unknown to Router0, namely: networks 192.168.0.4/30, 192.168.2.0/24 and 192.168.3.0/24. See commands below:

Router(config)#hostname Router0

Router0(config)#int s0/3/0

Router0(config-if)#ip add 192.168.0.1 255.255.255.252

Router0(config-if)#description connection-to-Router1

Router0(config-if)#no shut

Router0(config-if)#int f0/0

Router0(config-if)#ip add 192.168.1.1 255.255.255.0

Router0(config-if)#desc connection-to-LAN

Router0(config-if)#no shut

Router0(config-if)#exit

Router0(config)#ip route 192.168.0.4 255.255.255.252 192.168.0.2

Router0(config)#ip route 192.168.2.0 255.255.255.0 192.168.0.2

Router0(config)#ip route 192.168.3.0 255.255.255.0 192.168.0.2

On Router1: when setting up the serial connections to both router0 and Router2, I made sure to click on router1 first. This ensured that router1 became the DCE for both serial links. With this, the clocking for both serial connections will be done on router1 while the two networks, namely, network 192.168.1.0/24 and network 192.168.3.0/24, unknown to router1, will be statically entered in router1’s routing table using static route. Let’s see the codes below.

Router(config)#hostname Router1

Router1(config)#int s0/3/0

Router1(config-if)#ip add 192.168.0.2 255.255.255.252

Router1(config-if)#description connection-to-Router0

Router1(config-if)#clock rate 64000

Router1(config-if)#no shut

Router1(config)#int s0/1/0

Router1(config-if)#ip add 192.168.0.5 255.255.255.252

Router1(config-if)#description connection-to-Router2

Router1(config-if)#clock rate 64000

Router1(config-if)#no shut

Router1(config-if)#int f0/0

Router1(config-if)#ip add 192.168.2.1 255.255.255.0

Router1(config-if)#desc connection-to-LAN

Router1(config-if)#no shut

Router1(config-if)#exit

Router1(config)#ip route 192.168.2.0 255.255.255.0 192.168.0.1
Router1(config)#ip route 192.168.3.0 255.255.255.0 192.168.0.6

On Router2: the configuration on Router2 will be similar to that of Router0, the difference will be in the networks configured on interfaces and advertised using static routes. The three networks that are unknown to Router2 and need to be statically entered in its routing table are networks 192.168.0.0/30, 192.168.1.0/24 and 192.168.2.0/24. Let’s see how to achieve this from the commands below.

Router(config)#hostname Router2

Router2(config)#int s0/3/0

Router2(config-if)#ip add 192.168.0.6 255.255.255.252

Router2(config-if)#description connection-to-Router1

Router2(config-if)#no shut

Router2(config-if)#int f0/0

Router2(config-if)#ip add 192.168.3.1 255.255.255.0

Router2(config-if)#desc connection-to-LAN

Router2(config-if)#no shut

Router2(config-if)#exit

Router2(config)#ip route 192.168.0.0 255.255.255.252 192.168.0.5
Router2(config)#ip route 192.168.1.0 255.255.255.0 192.168.0.5
Router2(config)#ip route 192.168.2.0 255.255.255.0 192.168.0.5

Verification

To verify, we need to look at the routing tables of the routers using the sh ip route command. Below is the output of the command on router0:

From the output above, we can see that router0 has route entries for networks 192.168.0.4/30, 192.168.2.0/24, and 192.168.3.0/24. These routes were learned from router1 (192.168.0.2) using static routes, hence, the S symbol, and they all have the default administrative distance of 1. Let’s run a ping from router0 to the LAN interface on router2 (192.168.3.1)

.

ping results

 

Conclusion

In configuring a static route, the command ip route is used, followed by the network you intend to reach from the local router, then the subnetmask of the network, then, the gateway to reach the network. The gateway must be reachable from the router on which the static route is being configured and it must also have connectivity to the destination network being advertised.
If you enjoyed this tutorial, please subscribe to this blog to receive my posts via email. Also subscibe to my YouTube channel, like my Facebook page and follow me on Twitter.
Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *