A default route is a static route that matches all packets. Rather than storing all routes to all networks in the routing table, a router can store a single default route to represent any network that is not in the routing table.
Routers commonly use default routes that are either configured locally or learned from another router, using a dynamic routing protocol. A default route is used when no other routes in the routing table match the destination IP address of the packet. In other words, if a more specific match does not exist, then the default route is used as the Gateway of Last Resort.
Default static routes are commonly used when connecting:
- An edge router to a service provider network
- A stub router (a router with only one upstream neighbor router)
As shown in the figure, the command syntax for a default static route is similar to any other static route, except that the network address is 0.0.0.0 and the subnet mask is 0.0.0.0. The basic command syntax of a default static route is:
- ip route 0.0.0.0 0.0.0.0 { ip-address | exit-intf }
Note: An IPv4 default static route is commonly referred to as a quad-zero route.