gateway

term

networking

The address a host sends to when the destination is not on its own network, and, more generally, any device that translates between two systems.

The word carries two meanings. A default gateway is a host's exit: a configured address, usually a router, used for anything outside the local subnet. An application gateway translates between protocols or formats. A wrong default gateway cuts one machine off from everything beyond its subnet while its local neighbours still answer.

In the standards the word is older than router: RFC 1812 notes that many older Internet documents call routers gateways, and RFC 1122, the host requirements, still does. A host's decision is mechanical. If the destination's bits under the address mask match its own, it delivers directly; if not, the destination is accessible only through a gateway on a connected network.

RFC 1122 requires hosts to support several default gateways and to detect a dead one and switch, and forbids doing it by pinging the gateway continuously. The default comes from manual configuration, DHCP option 3, option 121 (which, when sent, makes the client ignore option 3), ICMP Router Discovery or, in IPv6, a Router Advertisement with a non-zero Router Lifetime. Each of those can also deliver a rogue gateway, which is what DHCP snooping and RA-Guard exist to stop.

A wrong or dead default is easy to recognise: hosts on the local prefix still answer and everything beyond it disappears. On Linux, ip route get with an address shows whether the kernel would send through the gateway or directly; on Windows, route print lists the 0.0.0.0 route and its gateway.

Also known as: default gateway

← All glossary entries