I’m trying to limit users based on IP, I want each user to have dedicated 128 Kbit/s including 56 Kbit/s within 128 Kbits. I do not want to use simple queuing, I’m trying this to be more dynamically using PCQ queuing, below is my configuration, but it seems not to work:
ip firewall mangle add chain=forward in-interface=2.4Ghz src-address=192.168.2.0/24 p2p=all-p2p action=mark-connection new-connection-mark=p2p-conn-up
ip firewall mangle add chain=forward in-interface=2.4Ghz p2p=all-p2p action=mark-packet new-packet-mark=p2p-up
ip firewall mangle add chain=forward out-interface=5.8Ghz dst-address=192.168.2.0/24 p2p=all-p2p action=mark-connection new-connection-mark=p2p-conn-down
ip firewall mangle add chain=forward out-interface=5.8Ghz p2p=all-p2p action=mark-packet new-packet-mark=p2p-down
ip firewall mangle add chain=forward p2p=!all-p2p action=mark-packet new-packet-mark=other
I have retested this setup and it is not working per IP–when tested before it was working on each IP–
back to the books,as i know there is a way to do this using PCQ without classifiers,and adding an IP class which triggers the limits for each IP.
Thanks for giving me a clue, I have found the formula which limits the bandwidth per IP, so the configuration below limits bandwidth at 128 Kbit per IP and also p2p at 56 Kbit but included within 128 Kbit, this is working if you do not put any src address in mangle, and as aprent use interfaces. This I have tested with three users all of them were getting 128 Kbits, here it is the config:
ip firewall mangle add chain=forward p2p=all-p2p action=mark-connection new-connection-mark=p2p_conn passthrough=yes
ip firewall mangle add chain=forward connection-mark=p2p_conn action=mark-packet new-packet-mark=p2p passthrough=yes
ip firewall mangle add chain=forward connection-mark=!p2p_conn action=mark-packet new-packet-mark=other passthrough=yes
queue type add name=p2p-Down kind=pcq pcq-rate=56000 pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=2000
queue type add name=p2p-Up kind=pcq pcq-rate=56000 pcq-limit=50 pcq-classifier=src-address pcq-total-limit=2000
queue type add name=Down kind=pcq pcq-rate=128000 pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=2000
queue type add name=Up kind=pcq pcq-rate=128000 pcq-limit=50 pcq-classifier=src-address pcq-total-limit=2000
But, i have the next problem:
I have 320Kbit dw and this speed have to be equal (dynamicaly)share among all users,BUT only for 10 min(per user) , after it speed down to 64kbit (per user).