*** Welcome to piglix ***

Static routing


Static routing is a form of routing that occurs when a router uses a manually-configured routing entry, rather than information from a dynamic routing traffic. In many cases, static routes are manually configured by a network administrator by adding in entries into a routing table, though this may not always be the case. Unlike dynamic routing, static routes are fixed and do not change if the network is changed or reconfigured. Static routing and dynamic routing are not mutually exclusive. Both dynamic routing and static routing are usually used on a router to maximise routing efficiency and to provide backups in the event that dynamic routing information fails to be exchanged. Static routing can also be used in stub networks, or to provide a gateway of last resort.

Static routing may have the following uses:

Static routing can have some potential disadvantages:

To route IP traffic destined for the network 10.10.20.0/24 via the next-hop router with the IPv4 address of 192.168.100.1, the following configuration commands or steps can be used:-

In most Linux distributions, a static route can be added using the iproute2 command. The following is typed at a terminal:-

Enterprise-level Cisco routers are configurable using the Cisco IOS command line, rather than a web management interface.

The commands to add a static route are as follows:

Network configurations are not restricted to a single static route per destination:

Static routes can also be added by specifying the exit interface rather than the "next hop" IP address of the router.

Router(config)# ip route 10.10.20.0 255.255.255.0 Serial 0/0/0

The administrative distance can be manually (re)configured so that the static route can be configured as a backup route, to be used only if the dynamic route is unavailable.

Router(config)# ip route 10.10.20.0 255.255.255.0 exampleRoute 1 254

Setting the administrative distance to 254 will result in the route being used only as a backup.


...
Wikipedia

...