1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-23 22:15:28 +02:00

ip-route-add: add page (#15994)

This commit is contained in:
Managor 2025-03-23 11:23:16 +02:00 committed by GitHub
parent 44f141f902
commit 0e6c1a8d08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,20 @@
# ip route
> Add a new networking route.
> More information: <https://manned.org/ip-route>.
- Add a default route using gateway forwarding:
`sudo ip {{[r|route]}} {{[a|add]}} default via {{gateway_ip}}`
- Add a default route using `eth0`:
`sudo ip {{[r|route]}} {{[a|add]}} default dev {{eth0}}`
- Add a static route:
`sudo ip {{[r|route]}} {{[a|add]}} {{destination_ip}} via {{gateway_ip}} dev {{eth0}}`
- Add a route to a specific routing table:
`sudo ip {{[r|route]}} {{[a|add]}} {{destination_ip}} dev {{eth0}} {{[t|table]}} {{ip}}`