What Is a Default Gateway and How Do I Find Mine?

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.

The gateway is the single most important address in your network settings after your own. If it is wrong or unreachable, you can 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.

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/24 and the printer is 192.168.1.50, both are in 192.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.

A subtle but important detail: the packet's destination IP address stays 203.0.113.10 the whole time. Only the Ethernet or Wi-Fi frame is 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.

The gateway must therefore be on the same subnet as the device. A laptop at 192.168.1.23/24 cannot use 192.168.0.1 as its gateway, because it has no way to reach that address directly.

Gateway, router and public IP

Your router has two sides. The LAN side has a private address such as 192.168.1.1, and that is your default gateway. The WAN side has the address your ISP assigned, which is usually your public IP, the one shown on the WhatsMyIPNumber homepage. The gateway address is the same for everyone on your network and is never visible to websites.

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

In 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. Without a terminal, press Win+R, run ncpa.cpl, double-click your active adapter and choose Details; the gateway is listed as "IPv4 Default Gateway".

macOS

$ route -n get default
   route to: default
destination: default
       mask: default
    gateway: 192.168.1.1
  interface: en0

Alternatively run netstat -rn | grep default, or 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 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 is shown as Router.

Android

Menus vary by manufacturer and version. Typically go to Settings, Network and internet (or Connections), Wi-Fi, tap the connected network or its gear icon, and look for Gateway or Router, sometimes under "Advanced" or "Network details".

Common gateway addresses

Most home routers use one of a handful of defaults. If you 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 guessing.

When the gateway is unreachable

If the gateway does not answer, the classic symptom is that local devices work but the internet does not. Test step by step, from nearest to farthest:

  1. ping 192.168.1.1 (your gateway). Failure points to Wi-Fi, cabling, or the router itself.
  2. ping 1.1.1.1. If the gateway answers but this fails, the problem is between the router and the ISP.
  3. ping example.com. If an IP works but a name does not, the problem is DNS, not the gateway.

Our guide to ping and traceroute explains the output, and the connection troubleshooter runs similar checks from your browser.

Common causes

  • No DHCP lease. An address in 169.254.0.0/16 with no gateway means the device never heard from the router's DHCP server.
  • Wrong static settings. A manually set gateway that is outside the device's subnet, or simply mistyped, breaks internet access while leaving the local network working.
  • Router problems. A frozen router may keep Wi-Fi up while no longer routing. A restart is a legitimate first step.
  • Address conflicts. If another device has been given the gateway's IP, traffic can go to the wrong place. arp -a showing an unexpected MAC for the gateway is a clue.
Note: Some routers are configured not to reply to ping. A failed ping to the gateway is only conclusive if pinging it normally works. Opening the gateway's address in a browser is a second test.

Multiple gateways and route metrics

A laptop connected to both Ethernet and Wi-Fi has two default routes, one per interface. The operating system picks the one with 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 preferred. To change the preference:

# 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 is preferred.

VPNs and the default route

A full-tunnel VPN takes over the default route so that all traffic goes through the tunnel. Some VPN clients do this without deleting your original route by adding two more specific routes, 0.0.0.0/1 and 128.0.0.0/1. Together they cover every address, and because routers always prefer the longest matching prefix, they beat 0.0.0.0/0. Split-tunnel VPNs 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 is the router's link-local address, such as fe80::1. ipconfig may show it with a zone suffix like fe80::1%12, and on Linux ip -6 route show default displays it. Seeing a fe80:: address as your IPv6 gateway is 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.

Try it yourself

Put this guide into practice with our free tools.

Keep reading

Copied to clipboard