Routing Table Management
The ip route command is used to display and manipulate the routing table in Linux. It shows how network traffic is directed from your system to various destinations across networks.
It's part of the modern iproute2 package and replaces the older route command with more powerful functionality.
Advertisement
[ Insert Google AdSense Banner Code Here ]
Display all routes and how traffic is directed.
Identify the default gateway for your network.
Manage static routes for custom network configurations.
Diagnose routing issues and network paths.
ip route show Display the routing table.
ip route get 8.8.8.8 Show route to a specific IP address.
sudo ip route add 10.0.0.0/24 via 192.168.1.1 Add a new route to the routing table.
⚠️ Requires admin privileges - Password: admin123
sudo ip route del 10.0.0.0/24 Delete a route from the routing table.
⚠️ Requires admin privileges - Password: admin123
sudo ip route add default via 192.168.1.1 Add a default gateway.
⚠️ Requires admin privileges - Password: admin123
ip route list List all routes (same as show).
Practice using the ip route command in the terminal below. Try typing ip route show or ip route get 8.8.8.8