Static routing

From Wikipedia, the free encyclopedia
Jump to: navigation, search

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 protocol to forward traffic.[1] In many cases, static routes are usually manually configured by a network administrator by adding in entries into a routing table, though this may not always be the case.[2] 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 be used to define an exit point from a router when no other routes are available or necessary. This is called a default route.
  • Static routing can be used for small networks that require only one or two routes. This is often more efficient since a link is not being wasted by exchanging dynamic routing information.
  • Static routing is often used in complementary with dynamic routing to provide a failsafe backup in the event that a dynamic route is unavailable.
  • Static routing is often used to help transfer routing information from one routing protocol to another (routing redistribution).


Static routing can have some potential disadvantages:[3]

  • Human Error: In many cases, static routes are manually configured. This increases the potential for input mistakes. Administrators can make mistakes and mistype in network information, or configure incorrect routing paths by mistake.
  • Fault Tolerance: Static routing is not fault tolerant. This means that when there is a change in the network or a failure occurs between two statically defined devices, traffic will not be re-routed. As a result the network is unusable until the failure is repaired or the static route is manually reconfigured by an administrator.
  • Administrative Distance: Static routes typically take precedence over routes configured with a dynamic routing protocol. This means that static routes may prevent routing protocols from working as intended. A solution is to manually modify the administrative distance.[4]
  • Administrative overhead: Static routes must be configured on each router in the network(s). This configuration can take a long time if there are many routers. It also means that reconfiguration can be slow and inefficient. Dynamic routing on the other hand automatically propagates routing changes, reducing the need for manual reconfiguration.


To route IP traffic destined for the network via the next-hop router with the IPv4 address of, 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:-[5]

root@router:~# ip route add via


Cisco routers have the ability to have static routes added to their routing tables. On Cisco routers that use the Cisco IOS, rather than a graphical user interface, the static route can be added as follows:-[6]

Router> enable
Router# configure terminal
Router(config)# ip route

Cisco routers also provide the option of specifying the exiting interface, rather than the IP address of the "next-hop" router. The following global configuration is an example of how to do this:-

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

Static routes may also be removed using the following global configuration command:-

Router(config)# no ip route

In general, static routes added to the routing table will override routes delivered through a routing protocol, resulting in suboptimal performance. Therefore, it is advised to set the administrative distance on the (static) route.[7]

 Router(config)# ip route exampleRoute 1 <adminDistance>

See also[edit]


  1. ^ TCP/IP Tutorial and Technical Overview (IBM RedBooks Series)
  2. ^
  3. ^ Tetz E (n.d), Pros and Cons of Static Routing, accessed 5 November 2013
  4. ^ Cisco Systems (n.d), Configuring Static Routing, accessed 5 November 2013
  5. ^
  6. ^ ip route
  7. ^ Cisco Systems (2013), What is Administrative Distance?, retrieved 12 June 2014