Static routing explained

Static routing is a form of routing that occurs when a router uses a manually-configured routing entry, rather than information from dynamic routing traffic.[1] 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.[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 case dynamic routing information fails to be exchanged. Static routing can also be used in stub networks, or to provide a gateway of last resort.

Uses

Static routing may have the following uses:

Advantages

Static routing, if used without dynamic routing, has the following advantages:

Disadvantages

Static can have some potential disadvantages:[3]

Example

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:

Linux

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 10.10.20.0 via 192.168.100.1

Cisco

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

Add a static route

The commands to add a static route are as follows:[6]

Router> enable Router# configure terminal Router(config)# ip route 10.10.20.0 255.255.255.0 192.168.100.1

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

Router> enable Router# configure terminal Router(config)# ip route 197.164.73.0 255.255.255.0 197.164.72.2 Router(config)# ip route 197.164.74.0 255.255.255.0 197.164.72.2

Configuring administrative distance

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.[7]

'''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.

See also

Notes and References

  1. http://www.redbooks.ibm.com/redbooks/pdfs/gg243376.pdf TCP/IP Tutorial and Technical Overview (IBM RedBooks Series)
  2. Web site: Cisco IOS Dial Technologies Configuration Guide, Release 12.2SR - Reliable Static Routing Backup Using Object Tracking [Cisco IOS Software Releases 12.2 SR].
  3. Tetz E (n.d), Pros and Cons of Static Routing www.dummies.com, accessed 5 November 2013
  4. Cisco Systems (n.d), Configuring Static Routing, accessed 5 November 2013
  5. Web site: 16.4. Static Routes and the Default Gateway Red Hat Enterprise Linux 5.
  6. http://www.cisco.com/en/US/docs/ios/12_3t/ip_route/command/reference/ip2_i2gt.html#wp1106404 ip route
  7. Cisco Systems (2013), What is Administrative Distance?, retrieved 12 June 2014