Local Destinations and the Default Gateway
Local or remote?
A host needs to choose the next hop for an outgoing unicast packet. On a simple single-interface Ethernet LAN, a destination covered by the connected prefix can be reached directly at the link layer; a destination outside it normally needs a router. The default gateway is the next-hop router used when no more specific route matches. This is a simplified route table, not a universal rule that ignores static routes or policy routing.
A two-network example
Imagine host A and host B connected to one switch, and router R connecting that LAN to a second LAN containing C. A has a connected route for 192.0.2.0/24 and a default route via 192.0.2.1. R has an interface on each LAN. C uses 198.51.100.1 as its gateway. The diagram is an offline illustration; documentation ranges are not real deployment addresses.
A 192.0.2.34/24 ----+ SW ---- R 192.0.2.1/24B 192.0.2.80/24 ----+ R 198.51.100.1/24 ---- C 198.51.100.20/24Follow two packets
For A to B, applying the /24 mask to 192.0.2.80 produces 192.0.2.0, matching A’s connected prefix. A sends a frame to B’s link-layer address. For A to C, masking 198.51.100.20 produces 198.51.100.0, so A uses its default route and sends the frame to R’s local link-layer address. The IP destination remains C, assuming no address translation. ARP resolves the next-hop link-layer address; its detailed operation comes later.
Destination Next hop192.0.2.80 192.0.2.80198.51.100.20 192.0.2.1A route is not proof of connectivity
A default route is represented as 0.0.0.0/0, which matches any IPv4 destination but loses to a matching longer prefix. Without a default or another matching route, a host cannot send that remote packet using this table. It may still reach its local neighbors. Even a valid route does not guarantee delivery: the link, neighbor resolution, router forwarding, filtering and return path must work. A router may be present without providing Internet access.
Diagnose before changing settings
If a fictional host can communicate locally but not remotely, check its prefix, gateway, and matching route before blaming DNS. If two ordinary hosts on the same link accidentally use one address, delivery may become inconsistent; compare assigned addresses against the authorized inventory. Do not create a duplicate address on a real network to test this. Practice: if A loses its default route, predict which of B and C still has a matching route.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Local destinations and default gateway — knowledge check
Apply IPv4 concepts to fictional offline scenarios.
A is 192.0.2.34/24. With only a connected route and default via 192.0.2.1, what is the next hop for 192.0.2.80?
In the same topology, what is the next hop for 198.51.100.20?
When A sends to C through R without NAT, what IP destination is in the packet leaving A?
A loses its default route and has only 192.0.2.0/24. Which destination still matches?
What can a valid route alone establish?