A default gateway is the IP address of the router on the local subnet that a host uses for every destination it cannot reach directly. It is the "next hop" of last resort in the host's routing table.
Why it matters
Without a correct gateway a device can talk to neighbors on its LAN but nothing beyond. At home it is normally the router, often 192.168.0.1 or 192.168.1.1, handed out by DHCP. In servers and cloud instances a missing or wrong default route is a frequent reason an instance has no outbound Internet access.
Example
$ ip route show default
default via 192.168.1.1 dev eth0 proto dhcp
All traffic not matching a more specific route is sent to 192.168.1.1 via eth0. If that router is down, local devices still reach each other but not the Internet.
Common mistakes
- Setting a gateway that is not inside the host's own subnet, which makes it unreachable.
- Configuring two default gateways on one machine, which causes asymmetric or flapping routing.
- Assuming the gateway is the DNS server. They are separate settings and often different devices.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.