1、配置默认路由
ip route add default via 192.168.10.1 dev eth0
route add default gw 192.168.10.1
2、间接路由:
ip route add 192.168.10.0/24 via 192.168.10.1 dev eth0
route add -net 192.168.10.0 netmask 255.255.255.0 gw 192.168.10.1
3、直连路由:
ip route add 192.168.10.0/24 dev eth0
route add -net 192.168.10.0 netmask 255.255.255.0 dev eth0