Networking

Gateway

Network Gateway

A node that connects networks with different protocols or address spaces and translates between them — in home networking, this is typically your router performing NAT between your private LAN and the public internet.

A gateway is the junction point between two networks. At the most basic level, your home router is a gateway: devices on your LAN have private IP addresses (192.168.x.x), and the router translates those to your single public IP address via NAT before sending traffic onto the internet. The term is broader than "router" — a gateway may translate protocols, address spaces, or both.

The default gateway role

The default gateway is the IP address a device uses for all traffic destined outside its local subnet. When your laptop sends a packet to a server on the internet, it checks its routing table and finds that the destination is not on the local network — so it forwards the packet to the default gateway, which handles the rest of the journey. Without a correctly configured default gateway, internet access fails even if the LAN itself is functioning perfectly.

Common default gateway addresses follow ISP and router conventions: 192.168.1.1 and 192.168.0.1 are the most widely used consumer defaults, while enterprise and cloud environments frequently use 10.0.0.1 or the first or last usable address in a subnet (e.g., 10.0.1.1 on a 10.0.1.0/24 network).

How devices learn the gateway (DHCP option 3)

Most devices receive their default gateway automatically via DHCP. When a device joins a network and requests an IP address, the DHCP server responds with four pieces of information: the IP address, subnet mask, DNS server, and the default gateway — carried in DHCP option 3. Devices with statically assigned IPs require the gateway to be entered manually; a typo here is one of the most common causes of static IP misconfiguration where local connectivity works but internet access does not.

Gateway types

TypeFunctionExample
Default gatewayRoutes LAN traffic to the internetHome router (192.168.1.1)
NAT gatewayTranslates private IPs to public IPsRouter doing NAT/PAT
VoIP gatewayConverts between PSTN and VoIPSIP trunk adapter
API gatewayRoutes and manages API requestsAWS API Gateway, Kong
IoT gatewayBridges IoT protocols to IP networksZigbee/Z-Wave to IP hub

Multiple gateways: static routes and policy-based routing

A device or router can have multiple gateways for different traffic. Static routes direct specific destination networks through a particular gateway — for example, routing 10.10.0.0/16 through an internal VPN gateway while everything else goes through the internet-facing default gateway. Policy-based routing goes further, choosing the gateway based on source address, application port, or traffic type. Enterprise routers routinely maintain dozens of routes pointing to different next-hop gateways for different parts of the address space.

What happens when the gateway is unreachable

When the default gateway goes offline, internet access fails immediately for every device on the LAN — but local network communication (between devices on the same subnet) continues unaffected, because LAN traffic never needs to leave the subnet. You can still print to a printer on 192.168.1.x, access a NAS on the same network, and reach any device by IP on the local segment. Only traffic destined for IP addresses outside the subnet — which includes the internet, remote VPN sites, and cloud services — is blocked. This is a useful diagnostic: if you can ping a local device but not 8.8.8.8, the gateway is the failure point.

How to check your gateway

Several commands reveal the current default gateway:

  • Linux/macOS: ip route show default or netstat -nr — look for the 0.0.0.0 or default route
  • macOS (older): route -n get default
  • Windows: ipconfig — listed as "Default Gateway" under each adapter
  • Windows (detailed): route print — shows the full routing table including all gateways

Gateway vs router vs modem

In consumer networking these terms blur together. A modem converts the ISP's signal (fiber, coax, DSL) to Ethernet. A router forwards packets between networks using routing tables. A gateway does protocol translation — most importantly NAT, which maps many private LAN addresses to one public IP. Many ISP-supplied devices combine all three functions in one box. Standalone routers from Asus, Netgear, or TP-Link also perform gateway functions via NAT, making them technically gateways even when marketed simply as "routers".

Common gateway misconfigurations

The two most frequent gateway mistakes are a wrong subnet and a typo in static IP configuration. If a device is on the 192.168.1.0/24 subnet but is given a gateway of 192.168.2.1 (a different subnet), the device cannot reach that gateway without a route to it, so all traffic to the internet fails. A gateway address that simply does not exist on the network (e.g., 192.168.1.254 when the router is at 192.168.1.1) produces the same result. Both failures show up as "No internet access" while local connectivity works fine.

Frequently Asked Questions

What is the difference between a gateway and a router?

A router forwards packets between networks by IP address. A gateway also performs protocol or address translation — like converting private LAN addresses to a public internet IP via NAT. Home routers perform both functions simultaneously.

What is a default gateway?

The IP address of the router on your local network that handles all traffic headed outside your subnet. For most home networks, it is the router's LAN IP — commonly 192.168.1.1 — and is automatically assigned to your device via DHCP option 3.

What is an API gateway?

In software, an API gateway is an entry point for client requests that routes them to backend microservices, handles authentication and rate limiting, and terminates TLS. It functions as a reverse proxy and protocol translator for application traffic.

Related Terms

More From This Section