Add a route for a remote network.
Section: Routes and Gateways
Add static route
bash
bash
sudo ip route add 10.20.0.0/16 via 192.168.1.254 dev eth0Explanation
Add a route for a remote network.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Routes and Gateways
Resolve route for destination
Show which route and source address will be used.
Add route to custom table
Insert a route into an alternate routing table.