Glossary

What is a default route?

A default route (0.0.0.0/0, ::/0) matches any address when no more specific route exists. We explain the gateway of last resort and choosing a default route or a full BGP table.

Last updated:

A default route is an entry in the routing table that matches every destination address and is used whenever no more specific route fits the packet. It is written as 0.0.0.0/0 for IPv4 and ::/0 for IPv6. The prefix is zero bits long, so it covers the entire address space. A router applies the longest prefix match rule, so the default route only wins when no more specific entry exists. It is the gateway of last resort: if a device does not know where to send a packet, it forwards it along this route.

How a default route works

The routing table is searched from the longest prefix to the shortest. A packet to 8.8.8.8 goes to an 8.8.8.0/24 entry if one exists, and only when no matching prefix is found at all is it handled by 0.0.0.0/0. That is why the default route, with its /0 prefix length, has the lowest matching priority and acts as a catch-all entry. In static routing you point it at a next-hop address or an exit interface, while in BGP it can be advertised by an upstream provider or generated locally.

  • IPv4: 0.0.0.0/0, a /0 prefix matching all IPv4 addresses.
  • IPv6: ::/0, the default route equivalent for the whole IPv6 space.
  • Gateway of last resort: a synonym for the default route in Cisco terminology.
  • Longest prefix match: the default route is chosen only when no more specific entry exists.
  • Purpose: one entry instead of a full table of over 950k IPv4 prefixes.

Default route versus the full BGP table

In BGP an operator chooses how much routing information it accepts from a provider. A default route alone means the router sends all outbound traffic to a single upstream without knowing the details of reaching the rest of the internet. A full BGP table today holds over 950,000 IPv4 prefixes and over 200,000 IPv6 prefixes, giving full control over path selection for every destination. There is also an intermediate option, a partial table, meaning routes from peering and the local region plus a default route for everything else.

When to choose a default route versus the full table

A single default route is enough when a router has one exit link or little memory, because it does not need to store hundreds of thousands of prefixes and lets you use cheaper hardware. The full table is essential for multihoming, when you want to steer traffic between providers based on BGP attributes such as the AS path (AS-PATH) or local preference. A common compromise is to take the full table from one upstream and a default route from another, or a partial table with a default route as a fallback for destinations outside peering.

The default route in the AS202520 SkyPass network

As part of its IP transit, AS202520 SkyPass offers each of these options: a full BGP table in IPv4 and IPv6 for operators doing multihoming and traffic engineering, a partial table with routes from Polish exchanges (THINX, TPIX, WRIX, 1-IX), and a plain default route for smaller routers. With points of presence in Warsaw and Wrocław, a customer can take the full table where it needs control over paths and settle for a gateway of last resort to the whole internet at simpler sites.

Frequently asked questions

What is 0.0.0.0/0?

It is the notation for the IPv4 default route. The /0 prefix is zero bits long, so it matches every destination address. A router uses it only when no more specific route fits the packet.

What does a default route look like in IPv6?

In IPv6 the default route is ::/0. It works exactly like 0.0.0.0/0 in IPv4: it covers the entire address space and is used when there is no more specific entry in the routing table.

What is the gateway of last resort?

It is a synonym for the default route, used especially in Cisco terminology. It is the next-hop a router sends packets to when it has no specific route for them.

Can I use only a default route instead of the full BGP table?

Yes, if you have a single exit link or a router with little memory. A default route still gives full internet reachability, but you give up the path-selection control that a full table provides for multihoming.

Related articles