When using the ip route command, you can identify where packets should be routed in two ways:
- The next-hop address
- The exit interface
The permanent Keyword (Optional)
Without the permanent keyword in a static route statement, a static route will be removed if an interface goes down. A downed interface will cause the directly connected network and any associated static routes to be removed from the routing table. If the interface comes back up, the routes are returned.
Adding the permanent keyword to a static route statement will keep the static routes in the routing table even if the interface goes down and the directly connected networks are removed. You cannot get to these routes—the interface is down—but the routes remain in the table. The advantage to this is that when the interface comes back up, the static routes do not need to be reprocessed and placed back into the routing table, thus saving time and processing power.
When a static route is added or deleted, this route, along with all other static routes, is processed in one second. Before Cisco IOS Software Release 12.0, this processing time was
five seconds.
The routing table processes static routes every minute to install or remove static routes according to the changing routing table.
To specify that the route will not be removed, even if the interface shuts down, enter the following command, for example:
Router(config)#ip route 172.16.20.0 255.255.255.0 172.16.10.2 permanent
Static Routes and Administrative Distance (Optional)
To specify that an administrative distance of 200 has been assigned to a given route, enter the following command, for example:
Router(config)#ip route 172.16.20.0 255.255.255.0 172.16.10.2 200
By default, a static route is assigned an administrative distance (AD) of 1. Administrative distance rates the “trustworthiness” of a route. AD is a number from 0 through 255, where 0 is absolutely trusted and 255 cannot be trusted at all. Therefore, an AD of 1 is an extremely reliable rating, with only an AD of 0 being better. An AD of 0 is assigned to a directly connected route. The following table lists the administrative distance for each type of route.
By default, a static route is always used rather than a routing protocol. By adding an AD number to your ip route statement, however, you can effectively create a backup route to your routing protocol. If your network is using EIGRP, and you need a backup route, add a static route with an AD greater than 90. EIGRP will be used because its AD is better (lower) than the static route. If EIGRP goes down, however, the static route will be used in its place. This is known as a floating static route.
If a static route refers to an exit interface rather than a next-hop address, the destination is considered to be directly connected and is therefore given an AD of 0 rather than 1.
Configuring a Default Route on a Router
Verifying Static Routes
To display the contents of the IP routing table, enter the following command:
Router#show ip route
NOTE: The codes to the left of the routes in the table tell you from where the router learned the routes. A static route is described by the letter S.
Configuration Example: Static Routes
Boston Router
Buffalo Router
Bangor Router
No comments:
Post a Comment