Default and Static Routes in Cisco IOS

In this article we will define and discuss Default and Static Routes.

We often see the incorrect implementation and understanding of ‘default routes’.  The default route is a “gateway of last resort.”  This special route tells computers or other routers to contact the defined next hop of the default router if they don’t have a more specific route.

Without a default route, a router would need all internet routing (think what that would do to your old Linksys router or home router!).  Since the routers do not have this information, without a default route a router will drop a packet destined for a network that isn’t in its routing table and send ICMP Destination Unreachable to the source of the traffic.

Here’s a simple example: Your PC has an IP address of and a subnet mask of or /24. Let’s say we want to talk to a server on the LAN, which has an IP address of  For this to work, we actually don’t need a default route or default gateway configured on the PC (they are in the same subnetwork).

However, as soon as we want to talk to any other device not on the network, we’ll need to know where to go.  This means we need either a static route that defines how you reach a given network, or we nee a default gateway/route — for example, one at

When talking about default gateways on PCs and default routes on routers and switches, it’s important to differentiate between the two.  A PC only connects to the network with a single interface, and it isn’t technically a router even though it may have a routing table; a switch (unless it’s a Layer 3 switch) fits into the same category as the PC.

On the other hand, a router — as long as it’s really routing and not bridging — has multiple interfaces. It uses a default route to know where to send traffic that isn’t on one of the known networks.

Many times, people call default routes “0/0” routes because these routes have an IP address of and a subnet mask of This basically says, “For any IP address that has any subnet mask, send it my way.”

What does a default route look like in a router’s routing table? Here’s an example:

Cell_P1# show ip route

Gateway of last resort is to network

C is directly connected, FastEthernet0
S* [254/0] via

We see in the last line that a static route (s) has been configured for any IP address – this makes it a default route.

Here’s what it looks like on a PC:

C:/> ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . :
Subnet Mask . . . . . . . . . . . :
Default Gateway . . . . . . . . . :

There are three ways to obtain a default route.

1. Configure a static route.
2. Receive a default route from another router through a routing protocol (not usually used on a PC).
3. Receive a default route via DHCP.

You can use the ‘ip default-network’ command to set a default route on a router, we recommend just creating a static route using the ip route command. Here’s an example of configuring a default route on a router or switch:

Cell_P1(config)# ip route

What the command says is that for all traffic that doesn’t go to one of the locally connected interfaces, forward it to the router at IP address (Of course, the router also has to know how to get to that IP address, so make sure you specify one of your connected networks on one of the router’s interfaces.)

Now, we want this route advertised to neighbor routers. Here is the example for RIP:

Cell_P1(config)# router rip
Cell_P1(config-router)# default-information originate

This sends the default route to all other RIP routers (as shown above in the first example). For other protocols, be sure to look at how this is implemented.

We can use a simple variation of this command to create a static route. The generic format is:

Router(config)# ip route [destination network] [mask] [gateway address]

The command above tells the router the following information: ‘if you want to send a packet to the following “destination network”, then send it to this “gateway address”’.

Let’s say that network is on interface 1, and network is on interface 2, and network is on interface 3.  We would then configure the following static routes:

Cell_P1(config)# ip route
Cell_P1(config)# ip route
Cell_P1(config)# ip route

I have assumed that the interfaces are the first address of those subnets.

Static routes can remove the need for dynamic routing protocols.  The problem is, what if that network interface goes down?  The network operator would have to react by changing the static configuration.  That could take minutes or hours.

Short and sweet.  We hope this helps with explaining Default Routes.

Leave a Comment

Contact Us Here

Please verify.
Validation complete :)
Validation failed :(
Your contact request has been received. We usually respond within an hour, but please be patient. We will get back to you very soon.
Scroll to Top