Simple queue & target-address question

I followed an example given at http://wiki.mikrotik.com/wiki/How_to_apply_different_limits_for_Local/Overseas_traffic in order to get a differen treat for the local and outgoing trafic. It workes just fine. But, something is bugging me …

After marking the traffic and the packets, in Simple Queue I did something like this:

add name=“Local-traffic” target-addresses=10.xxx.yyy.0/24 dst-address=0.0.0.0/0 interface=all parent=none
packet-marks=Local-packets priority=8 queue=default/default limit-at=0/0 max-limit=512000/512000 total-queue=default
disabled=no
add name=“Out-128k-traffic” target-addresses=10.xxx.yyy.0/26 dst-address=0.0.0.0/0 interface=all parent=none
packet-marks=Out-packets priority=8 queue=default/default limit-at=0/0 max-limit=128000/128000 total-queue=default
disabled=no
add name=“Out-256k-traffic” target-addresses=10.xxx.yyy.64/26 dst-address=0.0.0.0/0 interface=all parent=none
packet-marks=Out-packets priority=8 queue=default/default limit-at=0/0 max-limit=256000/256000 total-queue=default
disabled=no


The question is if I got Simple queue to treat each single address from a.m. subnets and limit to a specified traffic, or will it treat the traffic from a complete group of adresses from these subnets and limit all together to the given limit?

Anyone?

Thanks!

/24 or any other network value sets limit to the entire subnet.
if you want to apply limit to the specific host use /32 mask (for each host), as alternative you can use PCQ queue.

Thanks!

On my great disappointment, I realised that yesterday. Apparently, there’s no easy way arround, and I’ll have to make a simple queue for each address assigned.

Do you know of any script that’s a bit automatizing the matter?

Sorry! Just stumbled accross a fine example. For those, tracking this topic, look at: http://forum.mikrotik.com//viewtopic.php?t=10910&highlight=script+simple+queue

A pretty nice on. Needs just a bit tuning and it will work (different treat for local / outgoing traffic).

Denis, PCQ rules substitutes multiple rules with one rule, if you want to set the same bandwidth for hosts in the network,
http://wiki.mikrotik.com/wiki/PCQ_Examples

Thanks for the tip Sergej. Anyhow, I did it the other way - similar way. I used a script (mentioned before) to creatre multiple simple queues for each address, and it appears to be running fine … as long as the traffic is within one subnet and one Mikrotik AP … Well, lets present the idea:

I made a mangle roule, marking internal and external connections, like this:

/ ip firewall address-list
add list=Local address=10.XXX.XXX.0/24 comment=“” disabled=no
add list=Local address=10.YYY.YYY.0/24 comment=“” disabled=no
add list=Local address=10.ZZZ.ZZZ.0/24 comment=“” disabled=no




/ ip firewall mangle
add chain=prerouting src-address=10.XXX.XXX.0/24 action=mark-connection new-connection-mark=All-connections
passthrough=yes comment=“” disabled=no
add chain=prerouting src-address=10.XXX.XXX.0/24 connection-mark=All-connections
dst-address-list=!Local action=mark-connection new-connection-mark=Out-connections
passthrough=yes comment=“” disabled=no
add chain=prerouting connection-mark=Out-connections action=mark-packet new-packet-mark=Out-packets
passthrough=no comment=“” disabled=no
add chain=prerouting action=mark-packet new-packet-mark=Local-packets passthrough=no comment=“” disabled=no

:for i from=1 to=240 do={/queue simple add target-address=(10.XXX.XXX. . $i . “/32”) packet-mark=Local-packets max-limit=512000/512000}
:for i from=192 to=223 do={/queue simple add target-address=(10.XXX.XXX. . $i . “/32”) packet-mark=Out-packets max-limit=64000/128000}
:for i from=224 to=238 do={/queue simple add target-address=(10.XXX.XXX. . $i . “/32”) packet-mark=Out-packets max-limit=128000/256000}


So what we have here is marking of local and outgoing traffic / packets and a short script that makes a simple queue for each address in subnet. The example is giving a short list of local addresses and subnets, but in general, that’s about it.

The problem arrises whan aclient from one Mikrotik AP triest to excange data with the client on the other one. The connection are detected correctly, but the traffic between them in best case reaches an averidge of 128 kbps. In best case!
I cannot pinpoint where the problem is. I even enabled RIP and it still gives me the sam results.

Have you had any expiriances with similar issues?

The bandwidth between each of 5 Mikrotik AP’s is in worst case 6 MB/s. So, this should not be an issue. Have you any ideas?

Thanks again