mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-28 11:25:16 +08:00
ip-route-add: add example (#22402)
* Update ip-route-add.md * Update ip-route-add.md
This commit is contained in:
@@ -18,3 +18,7 @@
|
||||
- Add a route to a specific routing table:
|
||||
|
||||
`sudo ip {{[r|route]}} {{[a|add]}} {{destination_ip}} dev {{ethX}} {{[t|table]}} {{ip_address}}`
|
||||
|
||||
- Force internet traffic to go through a specific device while leaving local traffic unchanged (requires also creating a rule):
|
||||
|
||||
`sudo ip {{[r|route]}} {{[a|add]}} default via {{gateway_ip}} dev {{ethX}} table {{table_id}}`
|
||||
|
||||
Reference in New Issue
Block a user