A default gateway is the network exit point a device uses when no other specific route matches the destination, providing a path from a local network to external networks. On devices with multiple gateways, the default acts as the fallback when no better route exists.
Default Gateway
In networking, a gateway is something that translates from one protocol into another protocol, so we can traverse multiple networks. Well, there is also something called the default gateway. How do we get from our local area network to other networks? We utilize something called a default gateway.
I would say that most networks just have a single gateway to it, and this is going to be what your default gateway is. But that's not always the case. For instance, my demo laptop is connected to multiple networks, and so it has multiple gateways that it could choose to go to. I want it to go through one gateway to get to certain networks and another gateway to get to other networks. But there is also a default gateway.
So what is a default gateway? The default gateway is the gateway it's going to choose if it can't find any other gateways or any other sources. So if it's not a local transmission, if it's not communicating somewhere on the local network, and it doesn't have a gateway that it can go out to get to a specific network, it will choose this default gateway. Really, most of the time when we look at our networks, we just have that single default gateway to get to the outside world. That's the only gateway that we have.
I jumped on my demo machine to show you what this actually looks like. What I'm going to do is click on this Windows button here, type in cmd, and hit enter to bring up a command prompt. Then I'm going to type in ipconfig.
Now, with this ipconfig, I can see this Ethernet 2 is set up with — this is actually a static IP address. So this is the address on this machine, and it's got a default gateway of 192.168.42.1. That's where it's going to send its traffic.
I don't want to get too much into the routing table at this point, but I did want to show you how there are multiple gateways on this machine. So I'm going to do a route print and hit enter. This is showing you the routing table on this specific machine. What I'm pointing out here is we've got this column of gateways, so it shows you all of the gateways here. Most of them are on-link, just because that's the local network here. But I do have down here this 10.1.0.1 and 10.110.1. So here we see we actually have other gateways that are set up on this machine. But this 192.168.42.1 is the default gateway. Another way I can tell from this is because of this quad zero.
Once again, I don't want to get too much into what all of this means at this point, but this just shows us that we can assign multiple gateways on this machine, and we have a default gateway that it will send the traffic to here. If it can't find any other gateways or any better matches, then it will use this.
If you look at Cisco routers, they'll have a gateway of last resort. So that's what's on the actual router. For this machine right here, the router itself is the default gateway. But where does the router send traffic to get to the outside world, to get to all of these other addresses? What it's going to do is it's going to have a gateway of last resort, which will be this router right here, because it's connected out to the internet. So what it will do is, if it can't find a better matching route some other way, then it will send it to this gateway of last resort. And this gateway of last resort, same thing: if it can't find a better route, it will use whatever gateway of last resort it has, which is going to be at the internet service provider.
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 →