Network Bytes · Episode 24 · CCNA 1.10

Default gateway

Your computer sends straight to devices on its own subnet, and hands everything else to one router. That router's address is your default gateway, and if it's wrong, the internet stops working.

Posted · About a 1 minute watch, 3 minute read · Take the quiz

Local or remote?

Every time your computer sends a packet, it first asks one question: is the destination on my own network?

It answers with the subnet mask. The mask says which part of an address names the network. With a mask of 255.255.255.0, a laptop at 192.168.1.10 and a printer at 192.168.1.20 share the same network part, 192.168.1. Same subnet, so the laptop sends straight to the printer. No router needed.

Everything else goes to the router

Most destinations aren't on your street. A website might live on a server thousands of miles away, on a completely different network. Your laptop has no idea how to get there, and it doesn't need to.

Instead, it hands the packet to the one device that does know: the router on its own subnet. The router has a connection to the outside world and decides where the packet goes next. The packet's destination IP address stays the far-away server the whole time; your laptop simply delivers it to the router first.

The default gateway

That router's address is your default gateway: the "I don't know, ask him" address. Think of it as the door off your street.

At home it's often 192.168.1.1, but 192.168.0.1, 10.0.0.1 and others are common too. You rarely type it yourself: DHCP usually hands it to your device along with its IP address and subnet mask.

The gateway always has to be an address on your own subnet. Your computer can only hand packets to a device it can reach directly.

When the gateway is wrong

If the default gateway is wrong or missing, your computer still reaches everything on its own subnet, so printing to the printer down the hall works. But there's no way off the street: websites, email and anything else on another network fail. "Local works, internet doesn't" is a classic sign of a gateway problem.

Try it yourself

Find your own default gateway:

  • Windows: open Command Prompt and run ipconfig. Look for "Default Gateway".
  • Mac: System Settings → Network → your connection → Details → TCP/IP, and look for "Router".
  • Linux: run ip route and look for the line that starts with default via.
  • Phone: open the Wi-Fi network's details; it's often listed as "Router" or "Gateway".

Type that address into a browser on your home network and you'll often land on your router's login page.

Good to know

  • The default gateway must be an address on the host's own subnet (the router's interface on that subnet).
  • The computer sends the frame to the gateway's MAC address (found with ARP, a later episode) while the IP destination stays the far server.
  • 192.168.1.1 is common at home but not universal; 192.168.0.1, 10.0.0.1 and others are used. DHCP usually hands the gateway out.

For CCNA learners

This lines up with CCNA 200-301 exam topic 1.10, verify IP parameters for client OS (Windows, Mac OS, Linux): be ready to read a client's IP address, subnet mask and default gateway, and to spot a gateway that isn't on the client's own subnet.

Answer to the comment question

The router on your own subnet, in other words your default gateway (on most home networks, that's your home router). The website is on another network, so your laptop can't send to it directly: it delivers the packet to the gateway's MAC address first, while the packet's destination IP stays the website's server.

Test your knowledge

Quick quiz: Default gateway

4 multiple-choice questions. Pick one answer for each, then check how you did.

1What does your computer use to decide whether a destination is on its own subnet?
2Your laptop wants to load a website on another network. Where does it send the packet first?
3Which of these could be a valid default gateway for a laptop at 192.168.1.10 with mask 255.255.255.0?
4Your gateway setting is wrong. What still works?

Sources

Video transcript

Where does your computer send a packet when it has no idea where to go?

Your laptop can reach devices on its own subnet directly. It checks with the subnet mask: same network? Send it straight there.

But most destinations, like a website, live on other networks. Your laptop has no idea how to reach them. So it hands the packet to the one device that does: the router on its own subnet.

That router's address is your default gateway. At home it's often 192.168.1.1. It's the door off your street.

Gateway wrong or missing? You can still print, but you can't reach the internet.

Your laptop sends a packet to a website on another network. Which device gets it first? Comment your answer below!

That's your byte.

More from Network Bytes

All Network Bytes lessons