ip route add
Add a new networking route. More information: https://manned.org/ip-route.
- Add a default route using gateway forwarding:
sudo ip default via
- Add a default route using
ethX:
sudo ip default dev
- Add a static route:
sudo ip via dev
- Add a route to a specific routing table:
sudo ip dev
- Force internet traffic to go through a specific device while leaving local traffic unchanged (requires also creating a rule):
sudo ip default via dev table
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
