Inspect and change the kernel IP routing table with the classic route command to see where packets are sent. 27.04.2026 | reading time: 2 min On a Linux host the kernel routing table decides where packets are sent; the `route` command lets a sysadmin peek into and change that table quickly, which is essential when a network doesn't reach its destination. Quick demonstration View the routing table and then add a temporary route; run these as root: ```bash sudo route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eth0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 ``` Add a network route and verify: ```bash sudo route add -net 10.0.0.0 netmask 255.0.0.0 gw 192.168.1.1 sudo route -n Destination Gateway Genmask Flags Metric Ref Use Iface 10.0.0.0 192.168.1.1 255.0.0.0 UG 0 0 0 eth0 ``` Practical tweaks and caveats Use `route -n` to avoid slow DNS lookups, and remember that routes added with `route add` modify the kernel immediately but are not persistent across reboots; to remove a route use `route del` and for IPv6 use the appropriate `-A inet6` flag or better the modern `ip` tool; flags in the table like U and G tell you if the route is up or uses a gateway. When to prefer ip The `route` command is part of the older net-tools suite and still useful for quick checks, but `ip route` from iproute2 is more powerful and consistent for scripting, advanced policy routing or IPv6, so learn both and prefer `ip` for production automation. Final thought Understanding routing tables turns mysterious connectivity failures into manageable tasks; keep practicing on lab hosts and consider formal study to deepen skills and prepare for certifications such as CompTIA Linux+ or LPIC-1 with intensive exam preparation at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. network utilities troubleshooting