Static Routing Commands and Options
Option Meaning
destination_network
The network you’re placing in the routing table.
mask
The subnet mask being used on the network.
next-hop_address
The address of the next-hop router that will receive the packet
and forward it to the remote network. This is a router interface
that’s on a directly connected network.
exitinterface
Used in place of the next-hop address if you want and shows up
as a directly connected route.
administrative_distance
By default, static routes have an administrative distance of 1
(or even 0 if you use an exit interface instead of a next-hop
address).
permanent
If the interface is shut down or the router can’t communicate to
the next-hop router, the route will automatically be discarded
from the routing table. Choosing the
permanent
option keeps
the entry in the routing table no matter what happens.
Here is a sample static route, complete with the network to be added, its mask, and the
next-hop address to which the data will be sent:
Router(config)#
ip route 172.16.3.0 255.255.255.0 192.168.2.4
However, suppose the static route looked like this:
Router(config)#
ip route 172.16.3.0 255.255.255.0 192.168.2.4 150
The 150, at the end of the command, changes the default administrative distance (AD) of
1 to 150. Remember that the AD is the trustworthiness of a route, where 0 is best and 255 is
worst.
Here’s one more example:
Router(config)#
ip route 172.16.3.0 255.255.255.0 s0/0/0
Instead of using a next-hop address, you can use an exit interface that will make the route
show up as a directly connected network. Functionally, the next-hop and exit interfaces work
the same way.