ip route on Linux (from iproute2) replaced many route and ifconfig workflows. Searches spike when a VM loses internet after a NIC change or when you add a static route to a VPN subnet.
See: nmcli & netplan,
ss,
ping & traceroute.
Show routing table
ip route show (or ip r) lists defaults and connected subnets.
bashshow
ip -4 route show
ip route get 8.8.8.8

Addresses on NICs
ip addr shows CIDR addresses — link state UP/DOWN matters for routing.
bashaddr
ip -br addr

Temporary static route
Routes added with ip route add vanish on reboot unless your network manager persists them.
bashstatic
sudo ip route add 10.20.0.0/16 via 10.0.0.1 dev eth0

Make routes persistent
Use Netplan, NetworkManager keyfiles, or /etc/sysconfig/network-scripts on legacy RHEL — not manual ip alone.
Tip
ip route get IP shows which interface and gateway the kernel would use — great for asymmetric routing bugs.
Quick Reference
- Table:
ip route show - Test path:
ip route get 8.8.8.8 - Persist via Netplan/nmcli, not reboot-lost
ipalone
Related tutorials
Diagrams are original illustrations by Gnome IT Solutions. Tutorial text © Gnome IT Solutions.