双网卡内外网设置

双网卡设置
为了工作需要访问局域网, 为了发打时间, 需要上公网寻欢

场景
内网
ip 192.168.9.102
mask 255.255.255.0
gateway 192.168.9.253

外网
ip 60.11.61.201
mask 255.255.255.0
gateway 60.11.61.129


原来(见图1)
dest netmask gateway interface
0.0.0.0 0.0.0.0 60.11.61.129 60.11.61.201
0.0.0.0 0.0.0.0 192.168.9.253 192.168.9.102





第一步
route delete 0.0.0.0

第二步
route add 0.0.0.0.0 mask 0.0.0.0 60.11.61.129
route add 192.168.0.0 mask 255.255.0.0 192.168.9.253

效果(见图2)


猜你喜欢

转载自mocha-c-163-com.iteye.com/blog/2086960
今日推荐