ip-route
IP Routing table management subcommand. tldr-pages
On Linux
Linux
Display the main routing table
ip [rIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Add a default route using gateway forwarding
sudo ip [r [a default via gateway_ipIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Add a default route using ethX
sudo ip [r [a default dev ethXIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Add a static route
sudo ip [r [a destination_ip via gateway_ip dev ethXIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Delete a static route
sudo ip [r [d destination_ip dev ethXIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Change or replace a static route
sudo ip [r change destination_ip via gateway_ip dev ethXIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Show which route will be used by the kernel to reach an IP address
ip [r [g destination_ipIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Display a specific routing table
ip [r [l [t table_numberIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community