Static Routing Lab
Static Routing Lab
We will configure one route as the main route and another route as the backup route. If
the link bandwidth of all routes is the same, we use the route that has the least number
of routers as the main route.
If the link bandwidth and the number of routers are the same, we can use any route as
the main route and another route as the backup route.
If we specify two routes for the same destination, the router automatically selects the best
route for the destination and adds the route to the routing table.
If you manually want to select a route that the router should add to the routing table, you
have to set the AD value of the route lower than other routes.
For example, if you use the following commands to create two static routes for network
30.0.0/8, the route will place the first route to the routing table.
Routers automatically learn their connected networks. We only need to add routes for the
networks that are not available on the router’s interfaces. For example, network
10.0.0.0/8, 20.0.0.0/8 and 40.0.0.0/8 are directly connected to Router0. Thus, we don’ t
need to configure routes for these networks. Network 30.0.0.0/8 and network 50.0.0.0/8
are not available on Router0. We have to create and add routes only for these networks.
Router Available networks on local interfaces Networks available on other routers’ interfaces
Router0 10.0.0.0/8, 20.0.0.0/8, 40.0.0.0/8 30.0.0.0/8, 50.0.0.0/8
Router1 20.0.0.0/8, 30.0.0.0/8, 50.0.0.0/8 10.0.0.0/8, 40.0.0.0/8
Router2 40.0.0.0/8, 50.0.0.0/8 10.0.0.0/8, 20.0.0.0/8, 30.0.0.0/8
Let's create static routes on each router for networks that are not available on the router.
Router0 requirements
• Create two routes for network 30.0.0.0/8 and configure the first route (via -
Router1) as the main route and the second route (via-Router2) as a backup
route.
• Create two routes for the host 30.0.0.100/8 and configure the first route (via -
Router2) as the main route and the second route (via-Router1) as a backup
route.
• Create two routes for network 50.0.0.0/8 and configure the first route (via -
Router2) as the main route and the second route (via-Router1) as a backup
route.
• Verify the router adds only main routes to the routing table.
Router0 configuration
Access the CLI prompt of Router0 and run the following commands.
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 30.0.0.0 255.0.0.0 20.0.0.2 10
Router(config)#ip route 30.0.0.0 255.0.0.0 40.0.0.2 20
Router(config)#ip route 30.0.0.100 255.255.255.255 40.0.0.2 10
Router(config)#ip route 30.0.0.100 255.255.255.255 20.0.0.2 20
Router(config)#ip route 50.0.0.0 255.0.0.0 40.0.0.2 10
Router(config)#ip route 50.0.0.0 255.0.0.0 20.0.0.2 20
Router(config)#exit
Router#show ip route static
30.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
S 30.0.0.0/8 [10/0] via 20.0.0.2
S 30.0.0.100/32 [10/0] via 40.0.0.2
S 50.0.0.0/8 [10/0] via 40.0.0.2
Router#
Router1 requirements
• Create two routes for network 10.0.0.0/8 and configure the first route (via -
Router0) as the main route and the second route (via-Router1) as a backup
route.
• Create two routes for network 40.0.0.0/8 and configure the first route (via -
Router0) as the main route and the second route (via-Router2) as a backup
route.
• Verify the router adds only main routes to the routing table.
Router1 configuration
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 10.0.0.0 255.0.0.0 20.0.0.1 10
Router(config)#ip route 10.0.0.0 255.0.0.0 50.0.0.1 20
Router(config)#ip route 40.0.0.0 255.0.0.0 20.0.0.1 10
Router(config)#ip route 40.0.0.0 255.0.0.0 50.0.0.1 20
Router(config)#exit
Router#show ip route static
S 10.0.0.0/8 [10/0] via 20.0.0.1
S 40.0.0.0/8 [10/0] via 20.0.0.1
Router#
Router2 requirements
Create static routes for network 10.0.0.0/8 and network 30.0.0.0/8 and verify the router
adds both routes to the routing table.
Router2 configuration
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 10.0.0.0 255.0.0.0 40.0.0.1
Router(config)#ip route 30.0.0.0 255.0.0.0 50.0.0.2
Router(config)#exit
Router#show ip route static
S 10.0.0.0/8 [1/0] via 40.0.0.1
S 30.0.0.0/8 [1/0] via 50.0.0.2
Router#
By sending ping requests to a PC of network 30.0.0.0/8 and tracing the path they take to
reach the network 30.0.0.0/8. For this, you can use 'tracert' command on a PC of network
10.0.0.0/8. The 'tracert' command sends ping requests to the destination host and tracks
the path they take to reach the destination.
By listing the routing table entries on Router0. Since a router uses the routing table to
forward data packets, you can check the routing table to figure out the route the router
uses to forward data packets for each destination.
To simulate the failure of the main route, you can delete the link between Router0 and
Router1. After deleting the link, do the same testing again for the network 30.0.0.0/8.