A default route provides a fallback path for network traffic when a router has no specific routing table entry matching a destination address, forwarding packets to a designated next-hop router instead of dropping them.
Network Routing Concepts
We've already learned about a couple different network types. One is a directly connected network, one that's connected directly into one of the interfaces of the router, and that goes into the routing table. The reason, or when it goes into the routing table, is when we configure the exit interface that goes to that network, which means that we get onto that interface, we configure an IP address, we configure a mask to it. When we bring that interface up and that interface is live, it recognizes I'm attached to this directly connected network, and so that is going to be put into my routing table.
It also could have a route to a remote network, and it has a connection to the remote network through a next hop, through another router, and so that can go into this routing table as well.
Now one thing we haven't talked about is a default route that we can utilize to get to different networks.
So let's say that the packet comes into this router and it does not have any knowledge of this remote network over here, but it still needs to get that information over to it. What we can do is set up a default route onto this router that says, if you don't know where that network is, then what you can do is send it to this next hop. And then when it sends it to this next hop, hopefully this router knows of that network and knows to send it to its next hop. So that's a default route.
A default route is, if you can't find any other networks within your routing table that's associated with a destination IP address, then send it to this next hop.
Now, typically we see that associated with a router that has access to the outside world. So on here, we'd set up a default route that says go to this router if you can't find out where it is that you need to send this. And then this router has a default route set to the outside world, or the internet, or your internet service provider.
I'm back on this Windows machine here. I'm going to pull up a command prompt and we're going to do an ipconfig and hit enter. What I'm looking for is this Ethernet 2 connection right here. We can see that there's a default gateway that's set on it. So this is saying that this is the router that, if you need to reach a machine that's not on the local network, go to this router right here, 192.168.87.1.
Next what I'm going to do is a route print, and this is what brings up that routing table. So notice that is right here, this gateway is 192.168.87.1. I just want to point out that this is the destination network, and if you recall, this is the everything, the every. So essentially what this is doing, this is the default route, that if there's no other route that it can find in this routing table, it's going to choose this default route right here. So that's how it's going to get to the outside world. So this is the default.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →