pwg57 发表于 2009-12-15 18:51:50

难道真的没办法解决了吗~我都快郁闷死了~求如何让被映射的端口也负载均衡

多线ADSL的负载均衡我做好了,端口映射也做好了,但发现被映射端口的数据只走一条线路,有没有办法让被映射的端口的数据同时走多条线路?有个人只告诉我要在mangle中添加规则,之后就再也不现身了,让我捣鼓了整整一个星期到现在头都要爆了,但还是没有弄好,希望大家帮帮我吧,先谢谢大家了。

   这是我的mangle规则

/ip firewall mangle add chain=prerouting in-interface=LAN connection-state=new nth=1,1,0 action=mark-connection new-connection-mark=1 passthrough=yes disabled=no

/ip firewall mangle add chain=prerouting in-interface=LAN connection-mark=1 action=mark-routing new-routing-mark=1 passthrough=no disabled=no

/ip firewall mangle add chain=prerouting in-interface=LAN connection-state=new nth=1,1,1 action=mark-connection new-connection-mark=2 passthrough=yes disabled=no

/ip firewall mangle add chain=prerouting in-interface=LAN connection-mark=2 action=mark-routing new-routing-mark=2 passthrough=no disabled=no



下面的是我添加的,我用了postrouting

/ip firewall mangle add chain=postrouting out-interface=WAN connection-state=new nth=1,1,0 action=mark-connection new-connection-mark=1 passthrough=yes disabled=no

/ip firewall mangle add chain=postrouting out-interface=WAN connection-mark=1 action=mark-routing new-routing-mark=1 passthrough=no disabled=no


/ip firewall mangle add chain=postrouting out-interface=WAN connection-state=new nth=1,1,1 action=mark-connection new-connection-mark=2 passthrough=yes disabled=no

/ip firewall mangle add chain=postrouting out-interface=WAN connection-mark=2 action=mark-routing new-routing-mark=2 passthrough=no disabled=no



下面的是NAT

/ip firewall nat add chain=srcnat connection-mark=1 action=src-nat to-addresses=125.43.90.239 to-ports=0-65535 comment="1" disabled=no

/ip firewall nat add chain=srcnat connection-mark=2 action=src-nat to-addresses=125.43.90.238 to-ports=0-65535 comment="2" disabled=no



/ip firewall nat add chain=dstnat dst-address=125.43.90.239 protocol=tcp dst-port=9234 connection-mark=1 action=dst-nat to-addresses=192.168.1.3 to-ports=9234 comment="1"

/ip firewall nat add chain=dstnat dst-address=125.43.90.238 protocol=tcp dst-port=9234 connection-mark=2 action=dst-nat to-addresses=192.168.1.3 to-ports=9234 comment="2"

125.*.*.*是我的外网IP



route

/ip route add gateway=125.43.90.239 routing-mark=1 comment="1"
/ip route add gateway=125.43.90.238 routing-mark=1 comment="2"

我这样设置了,用netstat -an9234端口没有一个连接,不添加mangle规则和NAT中的connection-mark的时候9234端口还是有连接的,但很少,速度也上不去,还希望在看的各位想想办法怎么才能让内网监听的9234端口被映射出去后,走的数据也负载均衡(带宽叠加),谢谢,谢谢!

WGHBOY 发表于 2009-12-15 22:49:02

这帖子好像发过了,:o

pwg57 发表于 2009-12-16 19:01:15

这帖子好像发过了,
WGHBOY 发表于 2009-12-15 22:49 http://bbs.routerclub.com/images/common/back.gif

感觉那个写的不详细,这回我把mangle和nat规则都发上来了,请大家看看哪儿写的不对啊

47771885 发表于 2009-12-16 19:27:47

:L

tpy372 发表于 2009-12-16 22:39:30

意思是外网访问内网时,内网发出的数据也均衡出去??

pwg57 发表于 2009-12-18 11:34:36

意思是外网访问内网时,内网发出的数据也均衡出去??
tpy372 发表于 2009-12-16 22:39 http://bbs.routerclub.com/images/common/back.gif

应该是外网通过目标端口9234发过来的数据
页: [1]
查看完整版本: 难道真的没办法解决了吗~我都快郁闷死了~求如何让被映射的端口也负载均衡