glodenchang 发表于 2007-2-7 11:43:11

求助:负载平衡为何不成功?

环境:
routeros2.9.27
三条线路
adsl66:(固定IP)
adsl68(pppoe):
line63:(固定IP)
loc:192.168.3.232
按照论谈上的方法: 在IP---Firewall---Managle添间routing mark(但是无法根据源地址来划分网段,因为源地址都是从 192.168.3.232) ,
然后在路邮中添加mark,添加之后就不能上网了,如过取掉路邮中的mark就可以上网了,但是只有一条线路有流量!
麻烦前辈们指点一下
谢谢!!!

glodenchang 发表于 2007-2-8 14:05:13

有好多负载平蘅的讨论,都是对于不同Src.address来作路邮标示的,这样做是成功的,
难道没有人遇到过不能区分 Src.address时的负载平蘅吗?
因为网络有划分VLAN,Src.address地址都是Loc的Ip address

护花凌 发表于 2007-2-8 14:35:36

同感,努力研究中

glodenchang 发表于 2007-2-8 14:49:52

大家有没有研究过http://wiki.mikrotik.com/wiki/Improved_Load_Balancing_over_Multiple_Gateways这个列子,我照这样的设置,connection mark只能看到一个,而且十多分钟后connection mark,就无mark了,reboot之后又有了
斑竹指点一下!

护花凌 发表于 2007-2-8 14:53:39

nth=1,1,1

请指教下,这个参数是什么?

护花凌 发表于 2007-2-8 15:24:13

原帖由 glodenchang 于 2007-2-8 14:49 发表
大家有没有研究过http://wiki.mikrotik.com/wiki/Improved_Load_Balancing_over_Multiple_Gateways这个列子,我照这样的设置,connection mark只能看到一个,而且十多分钟后connection mark,就无mark了,reboot之后 ...

我试了下也只有一个connection mark?
貌似只有一个WAN口有数据.....? 不知道NTH值是什么意思,难道这个会第一个客户机走WAN1,第二个走WAN2,....这样交替下去么?

护花凌 发表于 2007-2-8 15:37:50

编辑掉。。。。做图好麻烦。

:(

用mangle的advance面板里的random参数,将connection state为new的连接mark下

好像很简单。

[ 本帖最后由 护花凌 于 2007-2-8 15:48 编辑 ]

glodenchang 发表于 2007-2-8 15:58:04

Nth's Mean
nth (integer,integer: 0..15,integer{0,1}) - match a particular Nth packet received by the rule. One of 16 available counters can be used to count packets Every - match every Every+1th packet. For example, if Every=1 then the rule matches every 2nd packet Counter - specifies which counter to use. A counter increments each time the rule containing nth Packet - match on the given packet number. The value by obvious reasons must be between 0 and Every. If this option is used for a given counter, then there must be at least Every+1 rules with this option, covering all values between 0 and Every inclusively.
Los valores de NTH para 2 wanes son:
1,1,0 1er 1,1,1 2do
Los valores de NTH para 3 wanes son:
2,4,0 1er 2,4,1 2do 2,4,2 3er

护花凌 发表于 2007-2-8 16:02:51

4   chain=prerouting src-address=10.10.0.0/24 connection-state=new random=50
   action=mark-connection new-connection-mark=tel passthrough=yes

5   chain=prerouting src-address=10.10.0.0/24 connection-mark=tel
   action=mark-routing new-routing-mark=tel passthrough=yes

6   chain=prerouting src-address=10.10.0.0/24 connection-mark=tel
   action=mark-packet new-packet-mark=tel passthrough=no

7   chain=prerouting src-address=10.10.0.0/24 connection-state=new
   action=mark-connection new-connection-mark=cnc passthrough=yes

8   chain=prerouting src-address=10.10.0.0/24 connection-mark=cnc
   action=mark-routing new-routing-mark=cnc passthrough=yes

9   chain=prerouting src-address=10.10.0.0/24 connection-mark=cnc
   action=mark-packet new-packet-mark=cnc passthrough=no

以上
我的ROS里相关的mangle配置,6条,packet-mark是为了看是不是真的差不多平衡的:lol

护花凌 发表于 2007-2-8 16:05:02

图....

glodenchang 发表于 2007-2-8 16:08:50

麻烦您详细的说一下:
用mangle的advance面板里的random参数

护花凌 发表于 2007-2-8 16:09:36

继续图

护花凌 发表于 2007-2-8 16:17:20

继续...

我们好像跑题了...原题是楼主的负载平衡为什么不成功....

我用的是2.9.27,在routes里面mark了之后,好像还要在rules里面指定routing mark为tel的table值为tel....



版主不会因我浪费太多论坛资源...砍我吧?

glodenchang 发表于 2007-2-8 16:17:51

我是这样理解的,因为我现在无法区别Src.Address,所以在每一个连接上打上标记,这样就能区分了,
我现在有三条对外的线路,
现在要打三个标记,random怎样设置?
谢谢!!!

护花凌 发表于 2007-2-8 16:19:59

第一个...33%...
第二个...50%(其实就是剩下的50%,因为前面规则到最后passthough=no)
第二个不用设random值了
页: [1] 2
查看完整版本: 求助:负载平衡为何不成功?