Dynamic bandwidth speed per IP

Hi,

I am intending to use Mikrotik as the main gateway router and would like to set the maximum speed for download and upload dynamically for a certain VLAN or IP range. For example, on VLAN 10 with a maximum bandwidth of 100Mbps:

If there is 1 device connected, it gets 100Mbps download and 50Mbps upload
If there are 2 devices connected, each gets 50Mbps download and 25Mbps upload

If there are more than 10 devices connected, each gets 5Mbps download and 2Mbps upload

Can this be done with RouterOS?

Those are the droids you are looking for: http://wiki.mikrotik.com/wiki/Manual:Queues_-_PCQ

Hey, that looks like the solution. From what I understand, you can only set maximum rate. Is there anyway to set minimum rate?

By default, PCQ automatically gives minimum bandwidth = 100%/N where N is the number of active sub-queues.
For a typical “nobody can hog the bandwidth” configuration, the default should be fine, and all you need to do is define the max-limit so the queue knows how much bandwidth there is to work with.