Default Static Route

1. What is a Default Static Route ?

A default static route is a manually configured route that forwards traffic destined for unknown networks to a specific next-hop address.

Think of the default static route as a route used when no other routes in your router can be used to send the packet to the destination. (If you’re not yet familiar with regular static routes, see our Static Route lesson first.)

Let’s look at this example together: we have a packet with destination IP 8.8.8.8, and our router needs to find a route to send this packet to its destination.

IPv4 routing table using default static route to forward unknown destination traffic to 8.8.8.8
Figure 1 – Default Static Route Lookup

There are three routes in this routing table. The first is the default route with subnet 0.0.0.0 and mask /0, which means: “you can use this route when no other route matches the destination IP,” because 0.0.0.0/0 includes all IP addresses.

The second route is 192.168.1.0/24, which does not match the destination IP.
The third route is 192.168.2.0/24, which also does not match.

In this case, the router will match the default static route and forward the packet to the next hop, 203.0.115.2, using the interface G0/0.

🔻 What Happens Without a Default Route

Let’s take a realistic example where no default route is configured, PC1 sends a packet to destination IP 8.8.8.8 again and you can see below our router R1 dropped the packet because no entry in its routing table was able to match the destination.

Network diagram showing packet dropped due to missing default static route to reach destination 8.8.8.8
Figure 2 – Packet dropped due to missing default route

In Cisco IOS routers, configuring a default static route is pretty easy, the command is ip route 0.0.0.0 0.0.0.0 <next-hop IP>.

In the example below, R1 is connected to the Internet Service Provider and a default static route can be used in order to send the unknown destination to the ISP. To do this, we specify the next hop as the IP interface of the internet service provider.

Configuring a default static route on Cisco router R1 to forward unknown traffic to next hop 203.0.115.2
Figure 3 – Configuring the Default Static Route on R1

✅ With Default Static Route

Since the default static route is created, our router R1 is now able to forward traffic to unknown destinations to the next hop 203.0.115.2 by using interface G0/0. If we retake our example, PC1 sends a packet to destination IP 8.8.8.8. R1 doesn’t have a specific IP route to this destination, the default static route is matched.

Default static route in action forwarding packet from PC1 to unknown destination 8.8.8.8 via next hop 203.0.115.2
Figure 4 – Default Route in Action

The packet is forwarded out of interface G0/0 toward the next hop 203.0.115.2. A default static route is typically configured on the edge router to connect the internal network to the external network (the internet), allowing traffic to be sent to the service provider and reach its destination.

2. Configure Default Static Route

Let’s configure a default static route on R1 to the next hop 203.0.115.2.

Network topology showing PC1 and PC2 connected to router R1, which is connected to the ISP via next hop 203.0.115.2

On the Cisco Router IOS the command to used is ip route 0.0.0.0 0.0.0.0 <next-hop IP>.

R1# conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)# ip route 0.0.0.0 0.0.0.0 203.0.115.2

Since the default static route is configured, we can see its presence in the routing table by using the show ip route command:

R1# show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is 203.0.115.2 to network 0.0.0.0

     192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.1.0/24 is directly connected, GigabitEthernet0/1
L       192.168.1.1/32 is directly connected, GigabitEthernet0/1
     192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.2.0/24 is directly connected, GigabitEthernet0/2
L       192.168.2.1/32 is directly connected, GigabitEthernet0/2
     203.0.115.0/24 is variably subnetted, 2 subnets, 2 masks
C       203.0.115.0/30 is directly connected, GigabitEthernet0/0
L       203.0.115.1/32 is directly connected, GigabitEthernet0/0
S*   0.0.0.0/0 [1/0] via 203.0.115.2

In this output, there are multiple things I want to show you.

First, you can see the line:
Gateway of last resort is 203.0.115.2 to network 0.0.0.0
This line tells us that the router knows where to send traffic when no other route matches in the routing table.

The second line is at the bottom:
S* 0.0.0.0/0 [1/0] via 203.0.115.2
This is the default static route, with 0.0.0.0 as the network and /0 as the mask.
The route code S means it’s a static route, and the * indicates it’s a candidate for the default route.

3. Conclusion

To conclude, you need to understand that the default static route is used to enable communication with external networks that are not known by your local router.
This route ensures that traffic will have a next hop to reach its final destination.

On Cisco IOS routers, the command is: ip route 0.0.0.0 0.0.0.0 <next-hop IP>

The common use case of a default static route is to allow your internal network to reach the external network (such as the internet) by setting the next hop IP address of the internet service provider’s router.

In the next lesson, we’ll look at Floating Static Route, which are designed to act as a backup path if your primary route fails.