Routing Tables & Gateways (ip route)
Concept & Overview
When your server sends a packet to an IP address outside its local subnet, how does the kernel know which router or network card interface to send it through? It consults the Kernel IP Routing Table.
- ip route (or ip r / ip ro): Displays active routing table entries.
- The line starting with default via defines your Default Gateway (your router), which handles all internet traffic not addressed to a local subnet.
ip route (or ip r).Command Syntax Reference
| Command / Syntax | Description |
|---|---|
ip route | Display kernel routing table and default gateway |
ip r | Shorthand for ip route |
Verification Objectives
These conditions will be automatically verified when you run commands inside the interactive terminal simulator:
- ○Run ip route or ip r to inspect routing table
Ready to complete Quest 78?
Test your skills live in the browser terminal with an emulated Linux filesystem, real-time command evaluation, and instant step-by-step hints.