A default gateway is the router your device sends traffic to whenever the destination is not on your local network. On a home network it is your router's LAN address, typically something like 192.168.1.1, and you can find it with ipconfig on Windows, route -n get default on macOS or ip route on Linux.
Think of it as the single most important address in your network settings, right after your own. Get it wrong, or let it go unreachable, and you'll still see printers and other computers at home — but nothing on the internet. This guide explains how devices decide when to use the gateway, how to find it on every common platform, and how to troubleshoot it when things go sideways.
How a device decides where to send a packet
Every time your computer sends a packet, it compares the destination with its own address and subnet mask:
- Same subnet: if your laptop is
192.168.1.23/24and the printer is192.168.1.50, both are in192.168.1.0/24. The laptop uses ARP to find the printer's MAC address and delivers the frame directly. - Different subnet: if the destination is
203.0.113.10, it is not local. The laptop looks up its routing table, finds the default route (0.0.0.0/0), and sends the frame to the gateway's MAC address instead.
Here's the subtle part: the packet's destination IP address stays 203.0.113.10 the entire time. Only the Ethernet or Wi-Fi frame gets addressed to the gateway. The router receives it, makes its own routing decision, and forwards it towards the internet — usually applying NAT so the packet leaves with your public IP as its source.
And that's exactly why the gateway has to sit on the same subnet as the device. A laptop at 192.168.1.23/24 simply can't use 192.168.0.1 as its gateway, because it has no way to reach that address directly in the first place.
Gateway, router and public IP
Your router leads a double life. The LAN side carries a private address such as 192.168.1.1, and that's your default gateway. The WAN side carries whatever your ISP assigned it — usually your public IP, the same one shown on the What's My IP Number page. The gateway address itself is the same for everyone on your network, and websites never see it at all.
How to find your default gateway
Windows
Open Command Prompt and run ipconfig. Look under the active adapter:
Wireless LAN adapter Wi-Fi:
IPv4 Address. . . . . . . . . . . : 192.168.1.23
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
Prefer PowerShell? Get-NetRoute -DestinationPrefix 0.0.0.0/0 lists every default route along with its interface and metric, and route print shows the full routing table. Don't want a terminal at all? Press Win+R, run ncpa.cpl, double-click your active adapter and choose Details — the gateway shows up as "IPv4 Default Gateway".
macOS
$ route -n get default
route to: default
destination: default
mask: default
gateway: 192.168.1.1
interface: en0
Or run netstat -rn | grep default, or just open System Settings, Network, choose Wi-Fi or Ethernet, click Details, and look at "Router" under TCP/IP.
Linux
$ ip route show default
default via 192.168.1.1 dev wlp2s0 proto dhcp metric 600
The address after via is the gateway, and dev is the interface. The older route -n and netstat -rn commands show the same route listed as destination 0.0.0.0 with flags UG (up, gateway).
iPhone and iPad
Open Settings, Wi-Fi, and tap the information (i) icon next to the connected network. The gateway shows up as Router.
Android
Menus vary by manufacturer and version, annoyingly. Typically it's Settings, Network and internet (or Connections), Wi-Fi, tap the connected network or its gear icon, and look for Gateway or Router — sometimes tucked under "Advanced" or "Network details".
Common gateway addresses
Most home routers default to one of a handful of addresses. Need to log in to yours? See the pages for 192.168.1.1, 192.168.0.1, 10.0.0.1 or 192.168.1.254 — but always confirm with the commands above rather than just guessing.
When the gateway is unreachable
If the gateway doesn't answer, the classic symptom is local devices working fine while the internet is dead. Test step by step, nearest to farthest:
ping 192.168.1.1(your gateway). Failure here points to Wi-Fi, cabling, or the router itself.ping 1.1.1.1. Gateway answers but this fails? The problem sits between the router and the ISP.ping example.com. An IP works but a name doesn't — that's DNS, not the gateway.
Our guide to ping and traceroute explains the output, and the connection troubleshooter runs similar checks straight from your browser.
Common causes
- No DHCP lease. An address in
169.254.0.0/16with no gateway means the device never heard a peep from the router's DHCP server. - Wrong static settings. A manually set gateway sitting outside the device's subnet — or simply mistyped — breaks internet access while leaving the local network humming along fine.
- Router problems. A frozen router can keep Wi-Fi up while it's quietly stopped routing anything. A restart is a perfectly legitimate first move.
- Address conflicts. If another device has somehow been handed the gateway's IP, traffic can end up going to the wrong place.
arp -ashowing an unexpected MAC for the gateway is a telltale sign.
Multiple gateways and route metrics
A laptop connected to both Ethernet and Wi-Fi ends up with two default routes, one per interface. The operating system just picks whichever has the lowest metric, a cost value attached to each route:
$ ip route show default
default via 192.168.1.1 dev enp3s0 proto dhcp metric 100
default via 192.168.1.1 dev wlp2s0 proto dhcp metric 600
Here the wired connection (metric 100) wins. NetworkManager on Linux uses these defaults for Ethernet and Wi-Fi, and Windows assigns automatic metrics based on link speed — so a faster wired link is normally the one that wins out. Want to change the preference yourself?
# Windows (PowerShell, as administrator)
Set-NetIPInterface -InterfaceAlias "Wi-Fi" -InterfaceMetric 50
# Linux with NetworkManager
nmcli connection modify "Home Wi-Fi" ipv4.route-metric 50
On macOS, the service order in System Settings, Network (the "Set Service Order" option) decides which interface wins.
VPNs and the default route
A full-tunnel VPN essentially takes over the default route, so all traffic funnels through the tunnel. Some VPN clients pull this off without deleting your original route at all — they just add two more specific routes, 0.0.0.0/1 and 128.0.0.0/1. Together those two cover every address there is, and because routers always favour the longest matching prefix, they beat 0.0.0.0/0 outright. Split-tunnel VPNs are gentler: they only add routes for specific networks and leave your normal gateway in charge of everything else.
IPv6 default gateways
On IPv6, devices usually learn their gateway from Router Advertisements rather than DHCP, and the gateway address itself is the router's link-local address, something like fe80::1. ipconfig may show it with a zone suffix like fe80::1%12, and on Linux ip -6 route show default displays it plainly. Seeing an fe80:: address as your IPv6 gateway? Perfectly normal.
Frequently asked questions
Is the default gateway the same as my router's IP address?
On a typical home network, yes: it is the router's LAN-side address. In larger networks the gateway may be a dedicated router or firewall that is separate from the Wi-Fi access points.
Can I change my default gateway?
You can change the router's LAN address in its settings, and DHCP will then hand the new address to every device. You can also set a gateway manually on one device, but it must be on the same subnet and must actually route traffic.
Why does my default gateway show 0.0.0.0 or nothing?
The interface has no valid configuration, usually because DHCP failed. Reconnect to the network, or on Windows run ipconfig /release followed by ipconfig /renew.
Is it safe to share my default gateway address?
Yes. It is a private address used by millions of networks and cannot be reached from the internet. What you should protect is the router's admin password.
Comentarios
Comparte un consejo, haz una pregunta o cuenta cómo te funcionó la herramienta.