A default gateway is a routing configuration that directs host traffic destined for addresses outside the local subnet to a router interface, typically learned through DHCP or static configuration. In large enterprise environments with thousands of subnets, misconfigured gateways—such as typos in DHCP scopes, overlapping addresses, or incorrect subnet masks—cause hosts to lose off-subnet connectivity while maintaining local communication, often misreported as application outages. Implementing redundancy protocols like VRRP and maintaining accurate IPAM records with security controls such as DHCP snooping and dynamic ARP inspection help prevent gateway failures and detect spoofing attacks that could redirect traffic to malicious devices.
How default gateway works
A host compares each destination IP address with its own address and subnet mask to decide whether the destination is local. If it is not local, the host hands the packet to the default gateway.
- Check the destination: The host applies its subnet mask to the destination address and compares the result with its own network prefix.
- Select the gateway route: If the destination is off-subnet and no more specific route exists, the host uses its default route, which points to the default gateway address.
- Resolve the gateway link-layer address: On Ethernet, the host uses ARP for IPv4 or Neighbor Discovery for IPv6 to learn the gateway's MAC address, unless it is already cached.
- Send the frame: The host sends the packet in a frame addressed to the gateway's MAC address, while the destination IP address stays unchanged.
- Forward onward: The gateway router looks up the destination in its own routing table and forwards the packet toward the next hop.
Hosts typically receive the gateway address from DHCP, though it can be set statically. In IPv6, hosts can learn a default router from router advertisements. The gateway must be on the host's own subnet to be reachable.
Common default gateway issues
A typo in the router option of a scope gives every client on that subnet an unreachable gateway. Clients reach local neighbors but nothing beyond, and the fault persists until leases are renewed with the corrected option.
If the gateway address does not fall inside the host's subnet under its mask, the host cannot resolve it directly and off-subnet traffic fails. This often follows a mask change on the host or a copied configuration from a different subnet.
When a static host or reservation takes the address configured on the router interface, an address conflict follows. Gateway ARP entries flip between two MAC addresses and users see intermittent loss of remote connectivity.
Hosts with several network adapters that each define a default gateway may choose an unexpected route. Traffic can leave through the wrong interface, which causes asymmetric paths or blocked flows at firewalls.
If a single router interface is the gateway and it fails, every host on the subnet loses off-subnet access even though the network has another path. A first-hop redundancy setup with a shared address avoids this, but hosts must be configured with the shared address rather than a physical one.