Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Static Route FAQ

What is a static route and how do I use it? by wybnormal
Posted: 4 Jan 01

Cisco Static Routes FAQ

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

What is a static route?
- 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.

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

Back to Cisco FAQ Index
Back to Cisco Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close