|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
×
本帖最后由 cempot 于 2009-12-31 13:03 编辑
我网吧有两条光纤,一条10M的,一条50M的,50M的是跟别人公司共享的带宽,他们白天用的比较多,我们晚上用的比较多。
现在是ros 2.9.27上装了三块网卡,两块外网分别是wan1,wan2,内网网卡为LAN,IP192.168.1.1,带了150台左右机器。想利用ROS来做IP分流,192.168.1.1-192.168.1.70走WAN1,其它的走WAN2。
下面是我用的配置脚本,请大家帮忙看下,现在问题是:默认路由设为WAN1的网关,WAN2通过外网就无法用WINBOX访问,换成WAN2的外网网关,WAN1又无法访问,有没办法让这两个能够同时访问?因为有好几个IP要映射端口出去- / ip route
- add dst-address=0.0.0.0/0 gateway=WAN2网关 scope=255 target-scope=10 \
- comment="" disabled=no
- add dst-address=0.0.0.0/0 gateway=WAN1网关 scope=255 target-scope=10 \
- routing-mark=59 comment="" disabled=no
- / ip firewall nat
- add chain=srcnat src-address=192.168.1.1-192.168.1.70 action=src-nat \
- to-addresses=WAN1IP to-ports=0-65535 comment="NAT" disabled=no
- add chain=srcnat src-address=192.168.1.71-192.168.1.254 action=src-nat \
- to-addresses=WAN2IP to-ports=0-65535 comment="NAT" disabled=no
- / ip firewall mangle
- add chain=prerouting src-address=192.168.1.1-192.168.1.70 action=mark-routing \
- new-routing-mark=59 passthrough=no comment="59" disabled=no
复制代码 麻烦大家帮忙看下,解决问题,不胜感激! |
|