A default gateway is the host's next hop for destinations outside the local IP network
A host first uses its IP address and subnet mask to classify the destination. If the destination is local, the host can deliver directly on the local network. If the destination is remote and no more-specific host route applies, the host sends the packet toward its default gateway.
A correct gateway definition is only the first step. The AP Networking Routing and Default Gateway Practice Test checks gateway placement, on-link classification, first-hop MAC selection, and scenarios where local success leaves a remote dependency unproven.
The word “default” matters. The gateway is not consulted for every packet; same-subnet traffic does not need to be routed through it under normal conditions.
The gateway itself has to be reachable on the host's local subnet
The client needs a Layer 2 destination for the first hop. On Ethernet IPv4 networks, it commonly ARPs for the gateway's MAC address. If the configured gateway IP is outside the client's local subnet, the host may have no normal way to reach that next hop.
For 192.168.40.25/24, a gateway of 192.168.40.1 is local. A gateway of 192.168.41.1 is not in the same /24.
The remote IP stays in the packet while the gateway MAC is used in the local frame
If the client sends to 203.0.113.50, the IP destination remains 203.0.113.50. The Ethernet destination on the client LAN is the gateway's MAC address. The router receives the frame, removes it, examines the IP packet, and chooses the next route.
This is a core Layer 2/Layer 3 distinction and explains why remote destinations do not need to appear in the client's ARP cache.
What a wrong or unreachable gateway usually changes
A host with a correct local address and mask may still communicate with same-subnet peers while failing to reach remote networks. That selective behavior is stronger evidence of a gateway or routing branch than a total link failure. If even same-subnet peers fail, investigate earlier dependencies such as link state, VLAN, or local addressing.
See Wrong Default Gateway Symptoms for the failure pattern.
A default gateway and a DNS server solve different problems
The gateway forwards traffic toward remote IP networks. DNS resolves names. If a client can ping a remote numeric IP but cannot resolve a hostname, the default gateway has already demonstrated enough forwarding for that numeric test; changing it is not the most direct response. If the client cannot reach any remote numeric IP but can reach the local gateway, routing beyond the gateway becomes more relevant.
A host can have routes more specific than its default gateway
The default gateway is a catch-all next hop. Hosts can also have more-specific routes installed manually, by VPN software, or by the operating system. Those routes can send selected destinations to another interface or next hop. For AP Networking fundamentals, the important rule is that more-specific routing information can override the default.
How to verify a gateway repair
- Confirm the client address and prefix are correct.
- Confirm the gateway IP is inside the client's local subnet.
- Test reachability to the gateway.
- Test a remote numeric IP to separate routing from DNS.
- Then test the real application or hostname that originally failed.
What a successful gateway ping proves—and what it does not
A successful ping to the default gateway proves useful local Layer 3 reachability between the client and that gateway interface at that moment. It does not prove the router has an Internet route, NAT is correct, DNS works, a remote firewall permits the traffic, or the application server is available. Strong answers preserve those limits.