Page 1 of 1

v6.22 download traffic limit problems

Posted: Mon Nov 24, 2014 6:46 pm
by vanantori

we have version 6.22. But we are struggling to limit the download traffic. Never limits regardless of the queue used. Instead, with upstream traffic no problem. Anybody is having the same problem? Any idea to solve it?


Re: v6.22 download traffic limit problems

Posted: Tue Nov 25, 2014 10:48 am
by rodolfo
You must post your configuration.
A general answer could be: your limiting queue does not intercept the download traffic.

Re: v6.22 download traffic limit problems

Posted: Tue Nov 25, 2014 12:10 pm
by vanantori

I put here the configuration. What we see is that we are identifying the packets with the ip--firewall--mangle, but after that, in queue tree the bandwinth is not limited... and only in the download packets...
It is a CCR with 6.22.

# nov/25/2014 10:28:18 by RouterOS 6.22
# software id = N6R9-I6FB
/interface bridge
add arp=proxy-arp mtu=1500 name=bridge1 protocol-mode=none
/interface ethernet
set [ find default-name=ether1 ] arp=proxy-arp l2mtu=1590
set [ find default-name=ether2 ] arp=proxy-arp l2mtu=1590
set [ find default-name=ether3 ] l2mtu=1590
set [ find default-name=ether4 ] l2mtu=1590
set [ find default-name=ether5 ] l2mtu=1590
set [ find default-name=ether6 ] l2mtu=1590
set [ find default-name=ether7 ] l2mtu=1590
set [ find default-name=ether8 ] l2mtu=1590
set [ find default-name=ether9 ] l2mtu=1590
set [ find default-name=ether10 ] l2mtu=1590
set [ find default-name=ether11 ] l2mtu=1590
set [ find default-name=ether12 ] l2mtu=1590
set [ find default-name=sfp1 ] l2mtu=1590
set [ find default-name=sfp2 ] l2mtu=1590
set [ find default-name=sfp3 ] l2mtu=1590
set [ find default-name=sfp4 ] l2mtu=1590
/interface vlan
add arp=proxy-arp interface=ether1 l2mtu=1586 name=vlan10 vlan-id=10

/ppp profile
add address-list=PPPoE-100M-list dns-server=, idle-timeout=2d \
local-address= name=PPPoE-100M only-one=yes remote-address=\
add dns-server=, idle-timeout=2d local-address= \
name=PPP-test-queuesimple only-one=yes rate-limit=100M/100M \

/queue type
add kind=pcq name=pcq_100M pcq-burst-rate=135M pcq-burst-time=40s \
pcq-classifier=src-address,dst-address pcq-dst-address6-mask=64 \
pcq-limit=40 pcq-rate=65M pcq-src-address6-mask=64 pcq-total-limit=20000
add kind=pcq name=pcq_100M_down pcq-burst-rate=50M pcq-burst-time=40s \
pcq-classifier=dst-address pcq-dst-address6-mask=64 pcq-limit=40 \
pcq-rate=35M pcq-src-address6-mask=64 pcq-total-limit=20000
add kind=pcq name=pcq_100M_up pcq-burst-rate=100M pcq-burst-time=40s \
pcq-classifier=src-address pcq-dst-address6-mask=64 pcq-limit=40 \
pcq-rate=65M pcq-src-address6-mask=64 pcq-total-limit=20000

/queue simple
add burst-limit=100M/10M burst-time=16s/16s disabled=yes max-limit=40M/8M \
name=PCQ-Oficina queue=ethernet-default/ethernet-default target=\

/queue tree
add disabled=yes name=clients_100d packet-mark=100M_client_trafic parent=\
ether1 priority=2 queue=pcq_100M_down
add name=P2P_traffic parent=global queue=default
add burst-limit=6M burst-threshold=4M burst-time=16s limit-at=3M max-limit=5M \
name=bittorrent packet-mark=bittorrent parent=P2P_traffic queue=\
add burst-limit=6M burst-threshold=4M burst-time=16s limit-at=3M max-limit=5M \
name=edonkey packet-mark=edonkey parent=P2P_traffic queue=\
add disabled=yes name=clients_100u packet-mark=100M_client_trafic parent=\
global priority=2 queue=pcq_100M_up
add name=clients_100 packet-mark=100M_client_trafic parent=global priority=2 \

/interface bridge port
add bridge=bridge1 interface=ether1
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=vlan10

/interface pppoe-server server
add default-profile=PPPoE-100M disabled=no interface=bridge1 \
keepalive-timeout=60 max-mru=1480 max-mtu=1480 service-name=\

add default-profile=PPPoE-100M interface=vlan10 max-mru=1480 max-mtu=1480 \
one-session-per-host=yes service-name=PPPoE_vlan10

/ip firewall mangle
add action=mark-connection chain=forward new-connection-mark=100M_conn_mark \
add action=mark-packet chain=forward connection-mark=100M_conn_mark \
new-packet-mark=100M_client_trafic passthrough=no

/queue interface
set ether1 queue=multi-queue-ethernet-default

Re: v6.22 download traffic limit problems

Posted: Sat Nov 29, 2014 12:02 pm
by rodolfo
It seems you mangle only the traffic generated from IP belonging to the PPPoE-100M-list address list.
If so, you mark only upload traffic.
Have you evauated the possibility to add a rate-limit directly to the pppoe profiles ignoring mangle and queue?
In this case queues are dinamically created.

Re: v6.22 download traffic limit problems

Posted: Mon Dec 01, 2014 11:01 am
by vanantori
We need dynamic queues PCQ. If we have a simple queue we can only limit the rate (but can not control the burst).

Re: v6.22 download traffic limit problems

Posted: Wed Dec 03, 2014 4:49 pm
by aharrison
You're not tagging your packets enough/properly.
Remember in most cases the QTree happens before simples, right after mangles.
So you're mangling for connections and then client packets. Because you're using src-addr-list you're only marking packets leaving your network (upload) and not download.
So try fixing your mangles to look like this:
/ip firewall mangle
add action=mark-connection chain=forward new-connection-mark=100M_conn_[b]down[/b] \
add action=mark-connection chain=forward new-connection-mark=100M_conn_[b]up[/b] \
add action=mark-packet chain=forward connection-mark=100M_conn_[b]up[/b] \
new-packet-mark=100M_client_traffic_[b]ul[/b] passthrough=no
add action=mark-packet chain=forward connection-mark=100M_conn_[b]down[/b] \
new-packet-mark=100M_client_traffic_[b]dl[/b] passthrough=no
Then you need to adjust your queue tree to call our the packet marks "100M_client_traffic_dl" and "100M_client_traffic_ul".
Right now you've got entries in your tree that do nothing because you're not marking any packets "edonkey" or "bittorrent" - in effect your queue tree is doing next to nothing.

When doing queues, forget about the actual queueing to start - get mangling going properly (pass the "sample" traffic through the router and make sure it's being segregated properly with an "unknown" catch-all at the end) and then make the queues to properly manage the mangling.

Re: v6.22 download traffic limit problems

Posted: Mon Dec 08, 2014 9:01 pm
by chrisw
Hi aharrison, I'm having the same issue. Your suggested mangle rules proved ineffective. Both packet and connection marking work only for upload. The download packet and connection marking fail to mark a single packet.

Re: v6.22 download traffic limit problems

Posted: Tue Dec 09, 2014 8:14 pm
by chrisw
I've managed to get download working now, but lost my upload limit. Here's my config:

    [admin@MikroTik] > /ip firewall mangle print
Flags: X - disabled, I - invalid, D - dynamic 
 0    ;;; 2m up
      chain=forward action=mark-connection new-connection-mark=2mbps_up 
      passthrough=no src-address-list=10-2_list log=no log-prefix="" 

 1    ;;; 2m up - packet
      chain=prerouting action=mark-packet 
      new-packet-mark=10-2_client_traffic_upload passthrough=no 
      connection-mark=10mbps_down log=no log-prefix="" 

 2    ;;; 10m down
      chain=prerouting action=mark-connection new-connection-mark=10mbps_down 
      passthrough=no src-address-list=10-2_list log=no log-prefix="" 

 3    ;;; 10m down - packet
      chain=forward action=mark-packet 
      new-packet-mark=10-2_client_traffic_download passthrough=no 
      connection-mark=2mbps_up log=no log-prefix=""
Address List
[admin@MikroTik] /ip firewall> address-list print
Flags: X - disabled, D - dynamic 
 #   LIST                  ADDRESS                         TIMEOUT             
10   10-2_list                          
Simple Queues
[admin@MikroTik] > /queue simple print
Flags: X - disabled, I - invalid, D - dynamic 
 0    name="10m down" target="" parent=none 
      packet-marks=10-2_client_traffic_download priority=8/8 
      queue=default-small/default-small limit-at=0/0 max-limit=0/
      burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s 

 1    name="2m up" target="" parent=none 
      packet-marks=10-2_client_traffic_upload priority=8/8 
      queue=default-small/default-small limit-at=0/0 max-limit=2M
      burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s