Default Gateway: What It Is and How It Works

A default gateway is the IP address of the device (usually your router) that forwards traffic from your local network to the internet or other networks.

Default Gateway

Every device on your local network uses a default gateway to reach the internet. It is the first and most important destination your data is sent to when it needs to leave your local network, and without it, no communication beyond your immediate network is possible.

What Is a Default Gateway

A default gateway is the IP address of the router or other routing device on your local network that serves as the exit point to other networks. When your device wants to communicate with an IP address that does not exist on its local subnet, it does not know the full path to the destination. Instead, it hands the traffic off to the default gateway and lets the gateway figure out where to send it next.

Think of the default gateway as the front door of your local network. Anything staying within the neighbourhood, meaning other devices on the same subnet, is delivered directly. Anything going further, meaning a website, a remote server, or any address outside your local range, leaves through that front door and is handled from there by your router and the broader internet infrastructure.

In a typical home network, the default gateway is the IP address of your broadband router, usually something like 192.168.1.1, 192.168.0.1, or 10.0.0.1. Your ISP's equipment assigns this address to your router, and your router in turn assigns it to connected devices via DHCP.

How Your Device Uses the Default Gateway

Every device maintains a routing table, a small set of rules that determines where to send outgoing packets based on their destination IP address. The default gateway is the last rule in that table, a catch-all for any destination that does not match a more specific local route.

  1. Your device prepares a packet destined for an IP address, for example a web server at 142.250.80.46
  2. It checks its routing table to determine whether the destination falls within its local subnet
  3. If the destination is local, the device delivers the packet directly on the local network, using ARP to resolve the destination's MAC address
  4. If the destination is outside the local subnet, the device forwards the packet to the default gateway, which is your router's local IP address
  5. The router receives the packet, applies Network Address Translation (NAT) to replace the private source IP with its public IP, and forwards the packet toward the internet
  6. The response from the remote server travels back through the same router, which uses its NAT table to deliver it to the correct device on your local network

How to Find Your Default Gateway

Your default gateway is assigned automatically by your router via DHCP in most home and office networks. You can look it up on any device using the network settings or a command-line tool appropriate for your operating system.

Device or OSHow to Find the Default Gateway
WindowsOpen Command Prompt and run ipconfig. Look for the "Default Gateway" field under your active network adapter.
macOSRun netstat -rn in Terminal and look for the default route, or go to System Settings, Network, select your connection, and click Details, then TCP/IP.
LinuxRun ip route show default in the terminal. The address after "via" is your default gateway. Alternatively, run route -n and look for the 0.0.0.0 destination row.
AndroidGo to Settings, Wi-Fi, tap the connected network, then Advanced. The Gateway field shows the default gateway address.
iPhone or iPadGo to Settings, Wi-Fi, tap the connected network. The Router field shows the default gateway address.
Windows ipconfig output example:
Ethernet adapter Local Area Connection:
   IPv4 Address. . . . : 192.168.1.50
   Subnet Mask . . . . : 255.255.255.0
   Default Gateway . . : 192.168.1.1
Linux ip route output example:
default via 192.168.1.1 dev eth0 proto dhcp src 192.168.1.50 metric 100

Default Gateway vs DNS Server

The default gateway and the DNS server are both essential parts of how your device connects to internet services, but they serve entirely different purposes. Confusing the two is a common source of network troubleshooting mistakes. A working default gateway with a broken DNS server will result in a connection that can technically reach the internet but cannot resolve any domain names, making it feel like there is no internet access at all.

FeatureDefault GatewayDNS Server
PurposeRoutes packets from your local network to other networks and the internetTranslates human-readable domain names into IP addresses
Typical IP192.168.1.1 or similar, your local router8.8.8.8 (Google) or 1.1.1.1 (Cloudflare) or your router's IP
Network LayerNetwork layer, handles packet routingApplication layer, handles name resolution
Required ForAny traffic that needs to leave the local networkAccessing services by domain name rather than raw IP
If It FailsNo internet access at all, even by IP addressDomain names stop resolving but direct IP access still works

The Three Core Network Settings

Every device that connects to a network needs three pieces of configuration to function correctly. These are typically assigned automatically by DHCP, but understanding what each one does helps you diagnose problems when something goes wrong.

  • IP Address: The unique address assigned to your device on the local network. It identifies your device to other devices and allows them to send traffic back to you. For example, 192.168.1.50.
  • Subnet Mask: Defines which portion of the IP address identifies the network and which portion identifies the individual device. The subnet mask allows your device to determine whether a destination is local or requires the default gateway. For example, 255.255.255.0 means the first three octets identify the network.
  • Default Gateway: The IP address of the router your device sends all non-local traffic to. Without this, your device has no way to reach any address outside its local subnet. For example, 192.168.1.1.

A fourth setting, the DNS server address, is also typically provided alongside these three and is needed for domain name resolution, but it is not strictly required for basic IP-level connectivity.

Frequently Asked Questions

  1. What happens if the default gateway is configured incorrectly?
    Your device can still communicate with other devices on the same local subnet because that traffic does not need to leave the network. However, any attempt to reach an address outside the local subnet, including all internet traffic, will fail. You will typically see a "No internet access" or "Connected, no internet" message even though your device has a valid IP address and is connected to the network.
  2. Can a device have more than one default gateway?
    A device typically has a single default gateway at any one time. However, networks designed for redundancy, such as enterprise networks with dual WAN connections or load balancing routers, use routing protocols and metrics to manage multiple available paths. The device or router selects the preferred gateway based on route metrics and falls back to an alternative if the primary becomes unavailable.
  3. Is the default gateway always a router?
    In most home and small business networks, yes. In more complex enterprise environments, the default gateway might be a Layer 3 switch, a firewall, a load balancer, or any other device capable of routing traffic between subnets and the wider network. What matters is that the device at that IP address is capable of forwarding packets beyond the local subnet.
  4. Why does my default gateway sometimes have the same IP as my DNS server?
    In many home networks, the router acts as both the default gateway and a DNS forwarder. When your device sends a DNS query to the router's IP address, the router forwards it to an upstream DNS server such as your ISP's resolver or a public resolver like 8.8.8.8. This is a convenience feature built into most consumer routers and means devices only need to remember one address for both routing and name resolution.
  5. How is the default gateway assigned to my device?
    In most networks, the default gateway is assigned automatically through DHCP (Dynamic Host Configuration Protocol). When your device joins the network, it sends a broadcast request asking for network configuration. The DHCP server, usually your router, responds with an IP address, subnet mask, default gateway, and DNS server address. You can also set these manually in your operating system's network settings if you need a static configuration.

Conclusion

The default gateway is the first hop your data takes when leaving your local network and one of the three essential network settings every connected device requires. Without a correctly configured default gateway, internet access is impossible regardless of how strong your Wi-Fi signal is or how fast your broadband connection is. Understanding how your device uses it to route traffic, how to find it on any operating system, and how it differs from your DNS server gives you a solid foundation for diagnosing network problems quickly. Continue with NAT, how routing works, and subnet basics to build a complete picture of how local networks connect to the internet.