查看路由 route -n

2.添加路由

route add -net 192.168.30.0/24 dev eth0  基于网卡添加

route add -net 192.168.40.0/24 gw 192.168.50.1 基于网关添加

route add -host 192.168.40.2 gw 192.168.50.1  基于主机添加

3.删除路由

route del -net 192.168.30.0/24 dev eth0

route del 192.168.40.2 gw 192.168.50.1



wKioL1idghbTL7SXAABWDxqP9SE061.png