dynamic traffic shaping

Hello everyone,
I have a small LAN of 5 PCs wich share an 384 Kbs ADSL line.
how to limit the speed of each user dynamically?

what I mean is
if 1 user is online then give him the whole 384 kbs
if 2 users are online then give 192 kbs each
if 4 users are online then give 96 kbs each


Is this possible or each one must have a predefined fixed 76 kbs ?
thnanks

/ip firewall mangle add connection-mark=traffic action-passthrought
/ip firewall mangle add connection=traffic dst-address=192.168.0.0/24 mark-flow=download

/queue type add kind=pcq pcq-classifier=dst-address
/queue tree add parent=global-out flow=download limit-at=(384 * 1024 * 1024) max-limit=(384 * 1024 * 1024)

this must help :slight_smile: just change 192.168.0.0/24 to your actual LAN address space

P.S.: I wrote it by memory so can have some little errors :blush:

thanks ASM,

I am a little bit confused

384 * 1024 * 1024 = 402653184 (402 Mbit!!!)

maybe you mean 384 *1024 = 393216

and one more question
why do I need the first line
“/ip firewall mangle add connection-mark=traffic action-passthrought”

thannks again

kavakopoulos,
asm is referring mangle for nated network

for 384kbps and 5 users
in queue tree set limit-at=3841024/5 max-limit=3841024 for each user