![]() ![]() |
3.1 | ![]() |
Routing | |
3.1.2 | ![]() |
Static routing |
Static routing is useful in networks that do not have
multiple paths to any destination network. Static routing reduces the
memory and processing burdens on a router. Even on large internetworks,
administrators often configure static routes on access routers that
connect stub networks. Stub networks have only one way in and one way
out. In Figure
![]() To configure static routing on a Cisco router, use the ip route command. This command uses the following syntax:
Figure An entry can be manually added to a routing table by using one of the following two versions of the ip route command:![]()
or RTA(config)#ip route 10.7.0.0 255.255.0.0 10.4.0.2 Both of these global configuration commands will add a static route to the routing table. The first example maps a network prefix, 10.6.0.0/16, to a local physical interface, S1, on the router. A directly connected network is also mapped to an interface. The second example maps the network prefix, 10.7.0.0/16, to the next hop address, 10.4.0.2. Each of these commands will add valid static routes to the routing table. In Figure
When using a routing protocol such as RIP or IGRP, static routes that are shown as directly connected will be automatically advertised to other routers if the appropriate network command has been issued. The next hop static route will not be advertised without additional configuration. These static routes can be included in updates if they are injected, or redistributed into the dynamic routing protocol.When an interface goes down, all static routes mapped to that interface are removed from the IP routing table. If the router can no longer find a valid next hop for the address specified in a static route, the static route is removed from the table. An alternative method is to map a static IP address to a loopback interface.
Static routing is not suitable for large, complex networks that include redundant links, multiple protocols, and meshed topologies. Routers in complex networks must adapt to topology changes quickly and select the best route from multiple candidates. Therefore, dynamic routing is the better choice.
|