Edit post Follow this blog Administration + Create my blog
Cisco & Cisco Network Hardware News and Technology

Cisco Static Routes FAQ: How to Use It?

December 23 2011 , Written by Cisco & Cisco Router, Network Switch Published on #Cisco Switches - Cisco Firewall

Static routes while manually intensive to keep up, are a very quick and effective way to route data from one subnet to different subnet. Let’s start with the basics.

What is a static route?Holiday-Tree-of-Knowledge.jpg
- a static route is a hard coded path in the router that specifies how the router will get to a certain subnet by using a certain path.

What do you mean by "hard coded"?
- you or someone has typed in the network ID and the next hop to get to the network specified

How do I add a static route into my Cisco router?
- Pretty simple
router# config t ; get into the configuration mode
router(config)# ip route A.B.C.D (destination network/host) A.B.C.D (mask) A.B.C.D (next hop); this is a simple static route

Are there any other ways to name the next hop except by using an IP address?
- Yes, you can use the port name i.e. ethernet0, E0, S0 and so on

What is "distance metric" that I can add at the end of the command?
- All routes have a value that allows the router to give a priority to which type of routing is used first. In static routes, the value is 1 which means no matter what other protocol you may have running like OSPF or RIP, the static route will always be used first. This can be changed to special needs. for example, if you have a frame link with ISDN back up, you can static routes for the frame and a second set of the same static routes but with a distance matric of 255. This means while the frame is up, it goes first but when the frame goes down, the router will try to use the 2nd static which is normally ignored due to the 255 value.

Why do I want to use static routes when there are neat routing protocols like OSPF?
- static routes are easy, no overhead either on the link or the the CPU of the router. They also offer good security when coupled with a tight IP mask like 252 which gives only 2 hosts on a given link

If static routes are so easy, why not use them all the time?
- Static routes while easy can be overwhelming in a large or complicated network. Each time there is a change, someone must manually make changes to reflect the change. If a link goes down, even if there is a second path, the router would ignore it and consider the link down.

One of the most common uses of a static map is the default classless route
- ip classless
- ip route [next hop]

This static map says that everything is remote and should be forwarded to the next hop( or supernet) which will take care fo the routing.

Dial on demand is also a big user of static routes. Many times with dial up or ISDN, you do not have the bandwidth or you do not want to pay the connection fees for routing updates so you use static routes.

Static routes allow you to set up load balancing after a fashion. Keep in mind that the IOS load balances across routes first and not interfaces. The easiest way to configure multiple routes on the same interface is to use the secondary IP command

Router 1
interface serial 0
 ip address
 ip address secondary ! second route on same interface
interface serial 1
 ip address
 ip address secondary
ip route; goes to serial 0
ip route; goes to serial 0
ip route; goes to serial 1

Router 2
interface ethernet 0
 ip address
interface serial 0
 ip address
 ip address secondary
interface serial 1
 ip address
 ip address secondary
The traffic would go out router 1 across the two IPs on serial 0 first then across 1 IP on serial 1
This gives you unequal load balancing.
Notes: This is just the basics of static routing. You can get very creative if you want and take things further then described here. I would suggest "Routing TCP/IP Vol 1" from Cisco Press for more information.

Share this post
To be informed of the latest articles, subscribe:
Comment on this post
there are 26 ingredients in total and the file is attached Please no copy and paste from other websites under any circumstance, and no copy and pasting each sentence from multiple websites as all work has to be original in your own words thats easy to understand.