The configuration of static routes is via the global configuration command ip route IOS. The command uses several parameters, among which include the network address and associated netmask, and information about the place you should send packets destined for that network.
The destination information can take one of the following ways:
A specific IP address of the router next route. The network address of another route to the routing table to be forwarded to the interface connected directly packages which is the destination network.
Router (config) # IP route [IP address of the destination network + mask] [first hop IP / output interface] [administrative distance]
Where:
IP address of the destination network + mask refers to the network to which it is intended and its corresponding access network or subnet mask. If the destination is a specific host you must identify the network that owns the host.
The first hop IP / output interface choice is drunk configure the IP next-hop (refer to the IP address of the next router interface) or the name of the router interface through which will own the packets to the destination. For example, if the administrator does not know or have questions regarding the next hop interface to use their own output, otherwise it should do so with the next-hop IP.
Optional parameter administrative distance (1 to 255) that if not set is equal to 1. This value will be that if there are more static routes or routing protocols configured on the router each have greater or lesser importance depending on the value of its administrative distance. The lower, the more important.
Configuration examples:
Router_B (config) # ip route 200.200.10.1 255.255.0.0 172.16.0.0 120
The syntax is shown pointing to the 172.16.0.0 network coming out of the next hop 200.200.10.1 with an administrative distance of 120.
Router_B (config) # ip route 172.16.0.0 255.255.0.0 serial 0120
The syntax is shown pointing to the 172.16.0.0 network exiting the serial 0 interface of the router itself with an administrative distance of 120.
Situations in which static routes are advised :
• A data circuit is particularly unreliable and stops working constantly. In these circumstances, a dynamic routing protocol may produce too much instability, while the static routes do not change.
• There is only one connection to a single ISP. Instead of knowing all the routes global Internet, using a single static route.
• You can access a network through a dial-up connection. The network can not provide constant updates that require a dynamic routing protocol.
• A customer or any other network linked not wish to exchange dynamic routing information. You can use a static route to provide information about the availability of the network.