Static and Default Routes


It is important to know how to configure static routes on a router. Many networks are small enough that all of the routing can be handled by a few static routes and a default route out of the network. If you want to know a router’s routes you need to look at its routing table. The routing table will show you connected routes, static routes, if there is a default route, and it will also show you if there are any dynamically learned routes too. In this section we will look at connected routes, static routes and default routes.

Connected Routes

Connected routes are routes to networks directly connected to the router. To establish connected routes all you have to do is bring up your router’s interfaces. This means configuring the router’s interfaces with IP addresses and subnet masks and making sure they are not in an administratively shutdown state.

To configure a Fast Ethernet interface from global configuration mode:

R1(config)#interface fastethernet 0/0
R1(config-if)#ip address <your ip address> <your subnet mask>
R1(config-if)#description <your description>
R1(config-if)#no shutdown

To configure a serial interface from global configuration mode. You can first check to see if your interface is the DCE and will need a clock rate:

R1#show controllers serial 0/0

Checking the “show controllers” command results to see If the interface is the DCE, you can see from the output below, that the interface is in fact the DCE, and that the clock rate needs to be set.


R1(config)#interface serial 0/0
R1(config-if)#ip address <your ip address> <your subnet mask>
R1(config-if)#clock rate 64000 (only if the interface is the DCE)
R1(config-if)#description <your description>
R1(config-if)#no shutdown

Now that the interfaces have been brought up you can see the connected routes by looking at the routing table by issuing a “show ip route” command and looking for the lines that start with “c”:

Static Routes

In the picture below, R1 has three connected networks in its routing table but it does not know about the network and therefore cannot route traffic to it. To solve that problem a static route to the network can be configured.

There are two ways of configuring a static route. The first uses the next hop router’s IP address on the connected network:
     R1(config)#ip route <destination network> <subnet mask> <next hop router address>

The second uses the router’s own exit interface. This way is faster for the router because it doesn’t have to first look up the exit interface from the connected network:

R1(config)#ip route <destination network> <subnet mask> <local router exit interface> 

both types of static route commands are listed below:


After the static route has been configured you should be able to verify the static route in the router’s routing table be issuing a #show ip route command and looking for the “s” entry in the routing table. The image below shows the router’s routing table after a static route was configured and the “show ip route” command was executed. Notice the highlighted static route which starts with an “s” in the routing table:
     R1(config)#ip route fa1/0
R1#show ip route

Default Routes

In the diagram below R1 needs a default route or gateway of last resort configured so that it can route traffic to unknown networks across the internet. If R1 does not have a default route, traffic to all unknown networks will be dropped, and surfing the Web will not be possible. To configure a default route you must configure a static route to the network and subnet mask to the next hop router or exit interface which has a path out of the network (see below). The commands to create a default route or gateway of last resort are:

R1(config)#ip route <next hop router IP address>
R1(config)#ip route <exit interface>

Once you have configured a default route it will show up in the routing table as an “s” with an asterisk “*” next to it signifying it as a default route. You can also see from the highlighted areas in the routing table output below that the default route is also acknowledged as the “Gateway of last resort is to network” (see below):

Video Tutorial on Default Routes

In this video I demonstrate configuring a default route using Packet Tracer

Author: Dan

Dan teaches computer networking and security classes at Central Oregon Community College.

1 thought on “Static and Default Routes”

Leave a Reply

Your email address will not be published. Required fields are marked *