The route command shows and edits a host's IP routing table, which picks the next hop for every destination. Linux now prefers ip route.
| No. | Step | Source | Destination | Type | Info |
|---|---|---|---|---|---|
| 1 | Next hop | your PC | routing table | REQUEST | where to 8.8.8.8? |
| 2 | Next hop | routing table | default gateway | DATA | 0.0.0.0/0 → gateway |
| 3 | Next hop | default gateway | internet | DATA | — |
The route command shows and edits a host's IP routing table, which picks the next hop for every destination. Linux now prefers ip route.
route print shows IPv4 and IPv6 routes; route -p add creates a persistent one.ip route (modern) or route -n (legacy net-tools).0.0.0.0/0 entry is the default route toward the gateway.