You may use the following method to add a static route to the routing table of a Cisco router.

Before configuring the static route(s) you may run the following commands in order to get a better idea of the network(s) configured on the existing router.

router-1#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

172.16.0.0/24 is subnetted, 2 subnets
C 172.16.4.0 is directly connected, Serial0
C 172.16.3.0 is directly connected, Ethernet0

router-1#show cdp entry * protocol
Protocol information for router-2 :
IP address: 172.16.4.2

The “show ip route” command provides us with the directly connected routes/networks. Additionally, the “show cdp entry * protocol” command provides the Internet Protocol (IP) address of a directly connected router (172.16.4.2) which we will use to complete the static routing entry. Before creating the static routing entry use the “ping” command to be certain you can reach the next hop router.

router-1#ping 172.16.4.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echoes to 172.16.4.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms

Now, we may begin creating the static routing entry.

router-1#config t
Enter configuration commands, one per line. End with CNTL/Z.
router-1(config)#ip route 172.16.5.0 255.255.255.0 172.16.4.2 permanent
router-1(config)#^Z

The “ip route” tells the router it is a static entry, 172.16.5.0 is the network to be reached, 255.255.255.0 is the subnet mask of the 172.16.5.0 network, the IP address of 172.16.4.2 is the address of the router that will accept and forward the packet (router-2) and the “permanent” tells the router to keep the entry in the routing table even if the network can’t be reached (such as the interface of the 172.16.5.0/24 network being down).

Next, you may use the “show ip route” command to verify the route in the routing table.

router-1#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

172.16.0.0/24 is subnetted, 3 subnets
C 172.16.4.0 is directly connected, Serial0
S 172.16.5.0 [1/0] via 172.16.4.2
C 172.16.3.0 is directly connected, Ethernet0

As you can see from the output above the 172.16.5.0/24 is in the routing table. Now, you may ping the gateway of the network, in this example it is 172.16.5.1, to verify network connectivity.

router-1#ping 172.16.5.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echoes to 172.16.5.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms

Enjoy!