Page 1 of 1

Bandwidth Share Equal

Posted: Thu Feb 01, 2018 8:56 am
by Arxondas
Hello all,

I got an RB2011 v6.41 for home use and I would like suggestions about equal share bandwidth
among clients. I got VDSL 50Mbps and I have configure so far this :

/ip firewall mangle add chain=prerouting action=mark-packet in-interface=ether9-wan new-packet-mark=client_upload
/ip firewall mangle add chain=prerouting action=mark-packet in-interface=bridge1 new-packet-mark=client_download

/queue type add name="PCQ_download" kind=pcq pcq-classifier=dst-address
/queue type add name="PCQ_upload" kind=pcq pcq-classifier=src-address

/queue tree name="TOTAL DOWNLOAD" parent=bridge1 packet-mark="" limit-at=0 queue=default-small priority=8 max-limit=50M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
/queue tree name="DOWNLOAD" parent=TOTAL DOWNLOAD packet-mark=client_download limit-at=0 queue=PCQ_download priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1

/queue tree name="TOTAL UPLOAD" parent=ether9-WAN packet-mark="" limit-at=0 queue=default-small priority=8 max-limit=3M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
/queue tree name="UPLOAD" parent=TOTAL UPLOAD packet-mark=client_upload limit-at=0 queue=PCQ_upload priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1

I wonder if this rules are OK or I need to do something different.

Thank you

Re: Bandwidth Share Equal

Posted: Thu Feb 01, 2018 11:16 pm
by 16again
The mangle rules:
Packets coming in on WAN are client download, and vice versa.

Upload queue is attached to WAN interface.
Masquerade has already taken place, so PCQ on source IP won't work

Create parent queue on global interface, set BW at minimum equal to your VDSL up and down speed combined, then use separate child queues for up and down , each with speed setting matching VDSL speed

Re: Bandwidth Share Equal

Posted: Fri Feb 02, 2018 4:58 am
by Arxondas
Thank you. I will try your suggestion.

Re: Bandwidth Share Equal

Posted: Fri Feb 02, 2018 5:29 am
by Arxondas
OK, If I got it correctly then I need to create this rules for my line (50 Mbps download / 5 Mbps upload)

/ip firewall mangle
add chain=prerouting action=mark-packet new-packet-mark=upload passthrough=no in-interface=bridge1 log=no log-prefix=""
add chain=postrouting action=mark-packet new-packet-mark=download passthrough=no out-interface=bridge1 log=no log-prefix=""

/queue tree
add name="TOTAL BANDWIDTH" parent=global packet-mark="" limit-at=0 queue=default priority=8 max-limit=55M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
add name="UPLOAD" parent=TOTAL BANDWIDTH packet-mark=upload limit-at=0 queue=default priority=8 max-limit=5M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1
add name="DOWNLOAD" parent=TOTAL BANDWIDTH packet-mark=download limit-at=0 queue=default priority=8 max-limit=50M burst-limit=0 burst-threshold=0 burst-time=0s bucket-size=0.1

So this will equal share my line (50 Mbps download / 5 Mbps upload) to all clients ?

Thanks