Confirmation for Queue-Tree conf.

Hello everyone, sorry for bothering with this, but I made some rules for queue tree and I was wondering if it is necessary to have a specific iface queue when you have a PPPoE adsl connection.

I have a very simple network here, 1 PPPoE client for Antel ADSL bandwidth 5M/2M DL/UL - and 1 ether5 switch interface with a NAT behind for users to browse.

What is a little confuse to me is that I cannot setup the pppoe interface for both upload and download. If I do so, counters stop. So I Made 3 queue parent queue like these:

  • 1 → for all LAN (because we have servers/ports inside de LAN that I want to prioritize) PARENT [Global] → Queue Type: default-small - without any bandwidth limit
  • 2 → (Internet) → associated for downloads - interface pppoe-out2 - queue type → pcq-download-default [limited to 5M]
  • 3 → (internet) → associated for uploads - interface ether2 (where the modem is connected) → queue type → pcq-upload-default [limited to 2M]

Should I setup Max Limit for pppoe-out2 to 5M/2M eliminating the third Qtree and associate it to default-small?

Thx for any tips.

My rules are these,

# oct/17/2017 10:39:21 by RouterOS 6.40.4
# software id = E60X-2A3D
#
Flags: X - disabled, I - invalid 
 0   ;;; RX
     name="DOWN-RX" parent=pppoe-out2 packet-mark="" limit-at=0 
     queue=pcq-download-default priority=8 max-limit=5M burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

 1   ;;; TX
     name="UP-TX" parent=ether2-Teletrabajo packet-mark="" limit-at=0 
     queue=pcq-upload-default priority=8 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

 2   name="RX-ICMP" parent=DOWN-RX packet-mark=mark_ICMP limit-at=0 
     queue=default-small priority=1 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

 3   name="TX-ICMP" parent=UP-TX packet-mark=mark_ICMP limit-at=0 
     queue=default-small priority=1 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

 4   name="RX-DNS" parent=DOWN-RX packet-mark=mark_DNS limit-at=0 
     queue=default-small priority=2 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

 5   name="TX-DNS" parent=UP-TX packet-mark=mark_DNS limit-at=0 
     queue=default-small priority=2 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

 6   name="RX-BROWSING" parent=DOWN-RX packet-mark=mark_http-https limit-at=0 
     queue=default-small priority=5 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

 7   name="TX-BROWSING" parent=UP-TX packet-mark=mark_http-https limit-at=0 
     queue=default-small priority=5 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

 8   name="RX-AS400" parent=DOWN-RX packet-mark=mark_AS400 limit-at=0 
     queue=default-small priority=3 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

 9   name="TX-AS400" parent=UP-TX packet-mark=mark_AS400 limit-at=0 
     queue=default-small priority=3 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

10   name="RX-HANGOUTS" parent=DOWN-RX packet-mark=mark_Hangouts limit-at=0 
     queue=default-small priority=1 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

11   name="TX-HANGOUTS" parent=UP-TX packet-mark=mark_Hangouts limit-at=0 
     queue=default-small priority=1 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

12   name="RX-SMTP" parent=DOWN-RX packet-mark=mark_SMTP limit-at=0 
     queue=default-small priority=4 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

13   name="TX-SMTP" parent=UP-TX packet-mark=mark_SMTP limit-at=0 
     queue=default-small priority=4 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

14   name="RX-MAIL" parent=DOWN-RX packet-mark=mark_PopMail,mark_ImapMail 
     limit-at=0 queue=default-small priority=4 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

15   name="TX-MAIL" parent=UP-TX packet-mark=mark_PopMail,mark_ImapMail 
     limit-at=0 queue=default-small priority=4 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

16   name="RX-OTHER" parent=DOWN-RX packet-mark=no-mark limit-at=0 
     queue=default-small priority=6 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

17   name="TX-OTHER" parent=UP-TX packet-mark=no-mark limit-at=0 
     queue=default-small priority=6 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

18   ;;; LAN-RX/TX
     name="AAA_LAN" parent=global packet-mark="" limit-at=0 
     queue=default-small priority=8 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

19   name="LAN-ICMP" parent=AAA_LAN packet-mark=mark_ICMP limit-at=0 
     queue=default-small priority=1 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

20   name="LAN-DNS" parent=AAA_LAN packet-mark=mark_DNS limit-at=0 
     queue=default-small priority=2 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

21   name="LAN-AS400" parent=AAA_LAN packet-mark=mark_AS400 limit-at=0 
     queue=default-small priority=3 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

22   name="LAN-HANGOUTS" parent=AAA_LAN packet-mark=mark_Hangouts limit-at=0 
     queue=default-small priority=1 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

23   name="LAN-MAIL" parent=AAA_LAN packet-mark=mark_PopMail,mark_ImapMail 
     limit-at=0 queue=default-small priority=4 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

24   name="LAN-SMTP" parent=AAA_LAN packet-mark=mark_SMTP limit-at=0 
     queue=default-small priority=4 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

25   name="LAN-BROWSING" parent=AAA_LAN packet-mark=mark_http-https limit-at=0 
     queue=default-small priority=5 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1 

26   name="LAN-OTHER" parent=AAA_LAN packet-mark=no-mark limit-at=0 
     queue=default-small priority=6 max-limit=0 burst-limit=0 
     burst-threshold=0 burst-time=0s bucket-size=0.1

Generally a queue only really works (or works best) for upload.
So in a config like that, I make an upload queue tree on the internet interface and one on the LAN interface.
The internet interface queue applies shaping, priority etc for your upload direction (2 Mbit) and the LAN interface
queue for your download direction (5 Mbit).

Hi pe1chl, thanks a lot for your answer.

When you say the internet interface you mean the pppoe tunnel is that right? Or the physical eth?

So should I create only 2 queue trees; 1 for LAN associated to the ether switch (download with a Max. Limit in this case 5M) and an upload associated to the pppoe-out2 tunnel setting Max. Limit to 2M.

The thing is I have some internal ports i.e. telnet:23 to a server inside my LAN for subnet 192.168.0.1/24 that I don’t want to limit.

Is there a way to leave the LAN outside the “traffic shaping” but prioritizing it? I mean I want the packets to go out first in the LAN but without any limit of bandwidth.

Yes, the best is to limit on the PPPoE interface because there you can still classify the traffic.
To keep certain traffic outside the normal queueing (and to have different sub-queues for different priorities), use packet marks.
See the many examples.

Maybe I’m wrong, but it doesn’t matter if packets are marked or not. I mean I have all my mangle rules working with priorities from 1 to 8 in the queue trees but you said to create 2 queue from the 3 I have working now. And both are going to have Max. Limit set to 5M and 2M. (DL and UL respectively)

If you setup a queue tree 1 for upload on the pppoe interface with 2M limit and then the LAN (switch) interface for download with limit set to 5M the queue is going to limit the traffic between PC’s,.. Or I’m wrong?

The queue will only limit the traffic from the router into the switch, not between the switch ports.
Other than that, you could make a queue on the interface with high rate, put two queues below that
one with high rate and one with low (5Mbit) rate, and use marking to select the high rate queue for some traffic.
You can even have 2-8 queues again below the lower rated one and use priority to select those.

Alright, I get what you mean. Thx pe1chl!