Manage Learn to apply best practices and optimize your operations.

Static routing

Learn how to configure a static route.

Static routes are ideal when using something called a stub network. This is where there is only one way in and out of the network.

The disadvantage of using static routes is that if the connection to the next hop goes down the router will continue to route traffic there. It will never be aware of the fact that the path is no longer valid. Also, once you have more than a handful of static routes they can become time consuming administrative task to change and update.

FIG 5.2 Traffic Will Leave an Interface Even if the Link is Down

Configuring a Static Route

In order to configure a static route the router has to be in global configuration mode.

ip route network prefix mask {address | interface} [distance]

network - the destination network
mask - is the subnet mask for that network
address - IP address of the next hop router
interface - or the interface the traffic is to leave by
distance - (optional) the administrative distance of the route

There are other parameters but these have been removed as they are not relevant to the CCNA exam.


ip route 110 is the destination network. is the subnet mask for that network and is the next hop for the router to use. The 110 is the administrative distance which we will look at later on.

Alternatively, we could have specified the interface the traffic is to leave by.

ip route serial 0

This tells the router that to get to network, leave by interface Serial 0.

FIG 5.3 A Static Route to Get to Bs Network

When you give the router a static route to use it is vital that the router knows how to get to that next hop. Normally the next hop would be part of a directly connected network. Routers automatically are aware of directly connected networks.

One important fact to remember is that the router on the other side (destination) must have a route back to the source. If it is not aware of the source network there will never by a response. Just like if you don't put a return address on an envelope.

FIG 5.4 The Destination Router Must Know How to Get Back to the Source

Default Routes

A default route is a special variety of static route. Normally, when a router is looking for a network that is not in its routing table. It will simply drop the packet. Remember that routers never ever send broadcasts by default. You can change this behaviour but it is not advisable.

On the network below, the stub network has only one way for the traffic to go, to reach several different networks. To configure several static routes would be a long winded way of achieving what could be done with one command.

Router(config)# ip route

The 0s indicate any network and any subnet mask. i.e. any traffic for anywhere go via the next hop

You could have specified an exit interface as well.

Router(config)# ip route s0

FIG 5.5 All Traffic Will Leave the Stub Router By Serial 0

You could even have some static routes configured and then a default route at the end. A practical use may be that you work in a small office and any unknown traffic will be passed to a larger router at your head office that can make all the routing decisions for you.

One last point, all of my network diagrams are there to illustrate a point so please do not take them as examples of how to design your own network.

"Pass your IT exams by learning with our world class consultant trainers. Your hands on course comes with a 100% satisfaction money back guarantee and lifetime e-mail support to give you the very best chances of passing." This tutorial has been written and prepared by


The people at were nice enough to share one of their many free tutorials with us in order to make "Static Routing" available to readers. has more than 400 free tutorials and many reasonably-priced courses available for different IT subjects. We recommend you stop by and visit this wonderful resource!



This was last published in September 2004

Dig Deeper on Network protocols and standards