手动本地添加static route

手动在linux or Mac上add static route

mac route命令同时访问内外网

1
2
3
sudo route -n add -net 192.168.0.0 -netmask 255.255.255.0 192.168.5.254 
sudo route -n add -net 192.168.3.0 -netmask 255.255.255.0 192.168.5.254
sudo route -n add -net 192.168.2.0 -netmask 255.255.255.0 192.168.5.254

Windows route命令同时访问内外网

1
2
3
route add -p 192.168.3.0 mask 255.255.255.0 192.168.5.254 
route add -p 192.168.0.0 mask 255.255.255.0 192.168.5.254
route add -p 192.168.2.0 mask 255.255.255.0 192.168.5.254