首页 > 代码库 > 多网卡分别路由

多网卡分别路由

//windows

@echo off
route -f
route add 192.168.50.0 mask 255.255.255.0 192.168.50.1 metric 1
route add 192.168.10.0 mask 255.255.255.0 192.168.50.1 metric 1
route add 0.0.0.0 mask 0.0.0.0 10.255.48.1 metric 20

 

//linux

route add -net 192.168.50.0 netmask 255.255.255.0 gw 192.168.0.1