The commands to configure a static route (see Figure 11.1 below) include the following:
- network address/prefix mask
- address or exit interface
- distance (optional)
Here is an example of these commands in use:
RouterA(config)#ip route network prefix mask {address | interface} [distance]
Figure 11.1 – Sample Network for Static Routes
To add a static route for the network above, you would write the following line of configuration on the router on the left:
Router(config)#ip route 192.168.1.0 255.255.255.0 172.16.1.2
With static routes, you can specify a next-hop IP address the router needs to go to on the way to the destination address, or you can specify an exit interface. Often, you won’t know your next hop because it is your ISP, or your IP address will change over time (see Figure 11.2 below). If this is the case, use an exit interface.
Figure 11.2 – You Might Not Always Know Your Next-Hop Address
Router(config)#ip route 192.168.1.0 255.255.255.0 s0/0
The command line above tells the router to send traffic destined for the 192.168.1.0 network out of the Serial interface. The next command tells the router to send all traffic for all networks out of the Serial interface:
Router(config)#ip route 0.0.0.0 0.0.0.0 s0/0
The route above is actually a default route. Default routes are used to direct packets addressed to networks not explicitly listed in the routing table.

