Community discussions

MikroTik App
 
brundier
just joined
Topic Author
Posts: 23
Joined: Thu Sep 21, 2006 9:04 am

Equal Bandwidth Sharing Trouble

Wed Oct 18, 2006 8:49 am

I run MT 2.9.6 with 4 interface :
eth0 = to 1st ISP
eth1 = to 2nd ISP
eth2 = to proxy server
eth3 = to intranet

eth0 has 2Mbps up and down bandwidth and eth1 has 128kbps up and down too.
Now, i want to share my intranet client to 64kbps up/down using eth1
so i just do like manual says :
1. do mark-connection to every ip want to shape
2. do mark-packet to every ip want to shape
and as manual says I use PCQ
so I add queque type to upload and download,
then i just create tree queque. cause of many interface i had, i do :
1. Create name=Upload parent=global-out max-limit=64k
2. Create name=Download parent=global-in max-limit=64k
after that i do :
3. Create name=up-64 parent=Upload
4. Create name=down-64 parent=Download

problem is, on Winbox queque list/queque tree i just saw that download using about 16kbps, but when i saw on interface list, it using 128kbps.

Image

Any suggestion please?

Thanks.
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6621
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Wed Oct 18, 2006 11:55 am

Use 'torch' to find out the traffic is not marked by mangle (and not limited by the queues).
 
brundier
just joined
Topic Author
Posts: 23
Joined: Thu Sep 21, 2006 9:04 am

Thu Oct 19, 2006 5:40 am

Use 'torch' to find out the traffic is not marked by mangle (and not limited by the queues).
Most traffic just port 80.
About marking connection and packet, what kind of chains i must apply? prerouting or forward?
Any idea please?
Thanks.
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6621
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Thu Oct 19, 2006 8:32 am

Packets should be marked in 'chain=prerouting', if 'global-in' matcher is used.
http://www.mikrotik.com/docs/ros/2.9/ip ... 6643278583
 
brundier
just joined
Topic Author
Posts: 23
Joined: Thu Sep 21, 2006 9:04 am

Fri Oct 20, 2006 4:46 am

Packets should be marked in 'chain=prerouting', if 'global-in' matcher is used.
http://www.mikrotik.com/docs/ros/2.9/ip ... 6643278583
So my configuration was right, anyway I use SNAT there is same rule with MASQUERADE or thereis another rule if I use snat?
Thanks.
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6621
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Fri Oct 20, 2006 8:40 am

You have to use one of them, either masquerade,
'ip firewall nat add action=masquerade chain=srcnat out-interface=public' or
'ip firewall nat add action=src-nat chain=srcnat out-interface=public to-addresses=public_address'.

Rules should be the same for both configuration, use torch to find traffic that is not matched by mangle rules.
As well you can paste export of mangle rules here.
 
brundier
just joined
Topic Author
Posts: 23
Joined: Thu Sep 21, 2006 9:04 am

Mon Oct 30, 2006 5:20 am

I`m using snat but not define out-interface but so long it has not a problem, its make problem if i`m using pcq ?

Here is my mangle rule :
[admin@router] > ip firewall mangle print
Flags: X - disabled, I - invalid, D - dynamic
0 chain=prerouting src-address=192.168.100.61 action=mark-routing new-routing-mark=route1 passthrough=yes
1 chain=prerouting src-address=192.168.100.81 action=mark-routing new-routing-mark=route2 passthrough=yes
2 chain=prerouting src-address=192.168.100.91 action=mark-routing new-routing-mark=route2 passthrough=yes
3 chain=prerouting src-address=192.168.100.93 action=mark-routing new-routing-mark=route1 passthrough=yes
4 chain=prerouting src-address=192.168.100.127 action=mark-routing new-routing-mark=route1 passthrough=yes
5 chain=prerouting src-address=192.168.100.103 action=mark-routing new-routing-mark=route1 passthrough=yes
6 chain=prerouting src-address=192.168.100.153 action=mark-routing new-routing-mark=route2 passthrough=yes
7 chain=prerouting src-address=192.168.100.77 action=mark-routing new-routing-mark=route1 passthrough=yes
8 chain=prerouting src-address=192.168.100.88 action=mark-routing new-routing-mark=route1 passthrough=yes
9 chain=prerouting src-address=192.168.100.101 action=mark-routing new-routing-mark=route1 passthrough=yes
10 chain=prerouting src-address=192.168.100.105 action=mark-routing new-routing-mark=route1 passthrough=yes
11 chain=prerouting src-address=192.168.100.107 action=mark-routing new-routing-mark=route1 passthrough=yes
12 chain=prerouting src-address=192.168.100.109 action=mark-routing new-routing-mark=route1 passthrough=yes
13 chain=prerouting src-address=192.168.100.111 action=mark-routing new-routing-mark=route1 passthrough=yes
14 chain=prerouting src-address=192.168.100.113 action=mark-routing new-routing-mark=route1 passthrough=yes
15 chain=prerouting src-address=192.168.100.115 action=mark-routing new-routing-mark=route1 passthrough=yes
16 chain=prerouting src-address=192.168.100.117 action=mark-routing new-routing-mark=route1 passthrough=yes
17 chain=prerouting src-address=192.168.100.119 action=mark-routing new-routing-mark=route1 passthrough=yes
18 chain=prerouting src-address=192.168.100.121 action=mark-routing new-routing-mark=route1 passthrough=yes
19 chain=prerouting src-address=192.168.100.123 action=mark-routing new-routing-mark=route1 passthrough=yes
20 chain=prerouting src-address=192.168.100.125 action=mark-routing new-routing-mark=route1 passthrough=yes
21 chain=prerouting src-address=192.168.100.129 action=mark-routing new-routing-mark=route1 passthrough=yes
22 chain=prerouting src-address=192.168.100.131 action=mark-routing new-routing-mark=route1 passthrough=yes
23 chain=prerouting src-address=192.168.100.133 action=mark-routing new-routing-mark=route1 passthrough=yes
24 chain=prerouting src-address=192.168.100.161 action=mark-routing new-routing-mark=route2 passthrough=yes
25 chain=prerouting src-address=192.168.200.10 action=mark-routing new-routing-mark=route1 passthrough=yes
26 chain=prerouting src-address=192.168.100.89 action=mark-routing new-routing-mark=route1 passthrough=yes
27 chain=prerouting src-address=192.168.100.155 action=mark-routing new-routing-mark=route2 passthrough=yes
28 chain=prerouting src-address=192.168.100.81 action=mark-connection new-connection-mark=128-1-con passthrough=yes
29 chain=prerouting src-address=192.168.100.91 action=mark-connection new-connection-mark=128-1-con passthrough=yes
30 chain=prerouting src-address=192.168.100.153 action=mark-connection new-connection-mark=128-1-con passthrough=yes
31 chain=prerouting src-address=192.168.100.155 action=mark-connection new-connection-mark=128-1-con passthrough=yes
32 chain=prerouting src-address=192.168.100.81 action=mark-packet new-packet-mark=128-1 passthrough=yes
33 chain=prerouting src-address=192.168.100.91 action=mark-packet new-packet-mark=128-1 passthrough=yes
34 chain=prerouting src-address=192.168.100.153 action=mark-packet new-packet-mark=128-1 passthrough=yes
35 chain=prerouting src-address=192.168.100.153 action=mark-packet new-packet-mark=128-1 passthrough=yes
[admin@router] >
and here is my queque type :
[admin@router] > /queue type print
0 name="default" kind=pfifo pfifo-limit=50

1 name="ethernet-default" kind=pfifo pfifo-limit=50
2 name="wireless-default" kind=sfq sfq-perturb=5 sfq-allot=1514
3 name="synchronous-default" kind=red red-limit=60 red-min-threshold=10 red-max-threshold=50 red-burst=20
red-avg-packet=1000
4 name="hotspot-default" kind=sfq sfq-perturb=5 sfq-allot=1514
5 name="pcq-download" kind=pcq pcq-rate=0 pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=2000
6 name="pcq-upload" kind=pcq pcq-rate=0 pcq-limit=50 pcq-classifier=src-address pcq-total-limit=2000
7 name="default-small" kind=pfifo pfifo-limit=10
[admin@router] >
At last here my queque tree :
[admin@router] > queue tree print
Flags: X - disabled, I - invalid
0 name="Upload" parent=global-in packet-mark="" limit-at=0 queue=default priority=1 max-limit=384000 burst-limit=0
burst-threshold=0 burst-time=0s
1 name="Download" parent=global-out packet-mark="" limit-at=0 queue=default priority=1 max-limit=384000 burst-limit=0
burst-threshold=0 burst-time=0s
2 name="128-1-u" parent=Upload packet-mark="" limit-at=0 queue=default priority=1 max-limit=128000 burst-limit=0
burst-threshold=0 burst-time=0s
3 name="128-1-d" parent=Download packet-mark="" limit-at=0 queue=default priority=1 max-limit=128000 burst-limit=0
burst-threshold=0 burst-time=0s
4 name="128-1-cu" parent=128-1-u packet-mark=128-1 limit-at=0 queue=pcq-upload priority=1 max-limit=0 burst-limit=0
burst-threshold=0 burst-time=0s
5 name="128-1-cd" parent=128-1-d packet-mark=128-1 limit-at=0 queue=pcq-download priority=1 max-limit=0 burst-limit=0
burst-threshold=0 burst-time=0s
[admin@router] >
so where is the problem so my pcq wont work properly but my simple queque work?
 
brundier
just joined
Topic Author
Posts: 23
Joined: Thu Sep 21, 2006 9:04 am

Wed Nov 01, 2006 4:13 am

I still cant found what was wrong, can u tell me sergejs ?
Thanks.
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6621
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Wed Nov 01, 2006 11:58 am

Use the particular configuration example to apply PCQ queues,
http://www.mikrotik.com/testdocs/ros/2. ... p#6.54.6.3
a) use 'connection-mark' option as matcher for 'packet-mark' rules.
b) make sure you do not have 'queue simple' rules, that might limit marked traffic in mangle.
 
brundier
just joined
Topic Author
Posts: 23
Joined: Thu Sep 21, 2006 9:04 am

Fri Nov 03, 2006 6:47 am

Use the particular configuration example to apply PCQ queues,
http://www.mikrotik.com/testdocs/ros/2. ... p#6.54.6.3
a) use 'connection-mark' option as matcher for 'packet-mark' rules.
b) make sure you do not have 'queue simple' rules, that might limit marked traffic in mangle.
I was change my mangle be like this :
28 chain=prerouting src-address=192.168.100.81 action=mark-connection new-connection-mark=128-1-con passthrough=yes

29 chain=prerouting src-address=192.168.100.91 action=mark-connection new-connection-mark=128-1-con passthrough=yes

30 chain=prerouting src-address=192.168.100.153 action=mark-connection new-connection-mark=128-1-con passthrough=yes

31 chain=prerouting src-address=192.168.100.155 action=mark-connection new-connection-mark=128-1-con passthrough=yes

32 chain=prerouting src-address=192.168.100.81 connection-mark=128-1-con action=mark-packet new-packet-mark=128-1
passthrough=no

33 chain=prerouting src-address=192.168.100.91 connection-mark=128-1-con action=mark-packet new-packet-mark=128-1
passthrough=no

34 chain=prerouting src-address=192.168.100.153 connection-mark=128-1-con action=mark-packet new-packet-mark=128-1
passthrough=no

35 chain=prerouting src-address=192.168.100.155 connection-mark=128-1-con action=mark-packet new-packet-mark=128-1
passthrough=no
also I disable simple queque to listed ip`s I`m wan to limited on pcq but its not working well too...

Any other wayout please? I need it most :(

Thanks.
 
User avatar
larmaid
Member Candidate
Member Candidate
Posts: 177
Joined: Tue Aug 30, 2005 3:06 pm

Fri Nov 03, 2006 2:54 pm

@brundier why u dont use simple queue......?
@sergejs which is the best queue types.....?
i like it
 
brundier
just joined
Topic Author
Posts: 23
Joined: Thu Sep 21, 2006 9:04 am

Sat Nov 04, 2006 6:14 am

@brundier why u dont use simple queue......?
@sergejs which is the best queue types.....?
I was using simple queque its working well but it cant share my bandwidth equally. Just like : I want to make a group like 128kbps for 8 users and each user can get equal bandwidth 0f 8kbps if group get maximal quota of 128kbps.
If i use simple queque and set limit-at=8kbps and max-limit=128kbps their not sharing bandwidth equally, some will get more and some get less, i want to avoid this to satisfy my users.
So what i must do? Anyway I was upgrade my MT to 2.9.27 and got same problems :(

Any idea? Thanks.
 
User avatar
samsoft08
Long time Member
Long time Member
Posts: 617
Joined: Sat Nov 26, 2005 10:52 pm

Sat Nov 04, 2006 11:20 pm

yes you can make groups of users and give each group a dedicated bandwidth to share equally between the members of each qroup ..
making groups by using ADDRESS LIST ..
marking the traffik by this example from wiki by Valens :
http://wiki.mikrotik.com/wiki/Queue_wit ... _Web-Proxy

apply the PCQ rules to this example ..

my configuration is :
1   ;;; Upload 
     chain=prerouting in-interface=localnet src-address=192.168.1.0/24 
     protocol=tcp p2p=!all-p2p action=mark-packet new-packet-mark=Up-Packet 
     passthrough=no 

 2   ;;; Download 
     chain=forward src-address=userlist1 protocol=tcp p2p=!all-p2p 
     action=mark-connection new-connection-mark=users-con passthrough=yes 

3   chain=forward in-interface=internet protocol=tcp connection-mark=users-co> 
     action=mark-packet new-packet-mark=down-packet passthrough=no 

4   ;;; Proxy Marking 
     chain=output out-interface=localnet dst-address=userlist1 
     protocol=tcp action=mark-packet new-packet-mark=down-packet passthrough=no 
Qtree
1   name="2-Int-up" parent=global-in packet-mark=Up-Packet limit-at=160000 
     queue=pcq-upload priority=2 max-limit=160000 burst-limit=0 
     burst-threshold=0 burst-time=0s 

 2   name="1-Local-down" parent=localnet packet-mark=down-packet 
     limit-at=600000 queue=pcq-download priority=2 max-limit=600000 
     burst-limit=0 burst-threshold=0 burst-time=0s 
repeating this config for each group .. I hope that will help
 
brundier
just joined
Topic Author
Posts: 23
Joined: Thu Sep 21, 2006 9:04 am

Mon Nov 06, 2006 4:49 am

yes you can make groups of users and give each group a dedicated bandwidth to share equally between the members of each qroup ..
making groups by using ADDRESS LIST ..
marking the traffik by this example from wiki by Valens :
http://wiki.mikrotik.com/wiki/Queue_wit ... _Web-Proxy

apply the PCQ rules to this example ..

my configuration is :
1   ;;; Upload 
     chain=prerouting in-interface=localnet src-address=192.168.1.0/24 
     protocol=tcp p2p=!all-p2p action=mark-packet new-packet-mark=Up-Packet 
     passthrough=no 

 2   ;;; Download 
     chain=forward src-address=userlist1 protocol=tcp p2p=!all-p2p 
     action=mark-connection new-connection-mark=users-con passthrough=yes 

3   chain=forward in-interface=internet protocol=tcp connection-mark=users-co> 
     action=mark-packet new-packet-mark=down-packet passthrough=no 

4   ;;; Proxy Marking 
     chain=output out-interface=localnet dst-address=userlist1 
     protocol=tcp action=mark-packet new-packet-mark=down-packet passthrough=no 
Qtree
1   name="2-Int-up" parent=global-in packet-mark=Up-Packet limit-at=160000 
     queue=pcq-upload priority=2 max-limit=160000 burst-limit=0 
     burst-threshold=0 burst-time=0s 

 2   name="1-Local-down" parent=localnet packet-mark=down-packet 
     limit-at=600000 queue=pcq-download priority=2 max-limit=600000 
     burst-limit=0 burst-threshold=0 burst-time=0s 
repeating this config for each group .. I hope that will help
I was trying to use address-list optinons, but cause I using many interface on my MT, lets call it up1,up2,proxy and local, I cant mangle it corectly. When I mangle upload using in-interface=local its working properly, but when I using in-interface for download that refer to in-interface=proxy, up1 and up2 its not working well. So rather than using forward Im using prerouting so I can use global-out option.
I just read the manual over and over and try to apply it for my MT it cant work anyway.
So wheres the problem samsoft08?
Any other idea? Thanks.
 
sishith
just joined
Posts: 14
Joined: Fri Aug 11, 2006 12:02 pm

route problem

Sun Nov 19, 2006 4:18 pm

can you tell me how did you do the multiple gateway option bcz i am not able to get my second gateway is not getting activated... somebody help me ...

Who is online

Users browsing this forum: sophiawil and 168 guests