linux
route add -net 192.168.1.10 netmask 255.255.255.255 gw 192.168.1.1 dev enp0s31f6
mac
route -n add 192.168.0.0/16 192.168.1.1
windows
route add 192.168.0.0/16 192.168.1.1 -p
注:windows下支持-p参数,可持久化(重启不变)
linux
route add -net 192.168.1.10 netmask 255.255.255.255 gw 192.168.1.1 dev enp0s31f6
mac
route -n add 192.168.0.0/16 192.168.1.1
windows
route add 192.168.0.0/16 192.168.1.1 -p
注:windows下支持-p参数,可持久化(重启不变)