Routers OS as nas , seperate queue for lan

I am using Mikrotik as a nas. All users log in using pppoe and are assigned ip and bandwidth limits from the radius server.

I want to have seperate bandwidth limit between the public ip pool used so users can game on the net between themselves.


Thanks in advance.

If you want to set different bandwidth limit for specific traffic, you can mark traffics and set queue tree using those marked packets. But it can limit only total traffic. For example: user1 has 512k, user2 has 1024k. But if they want to connect server 1.1.1.1, total limit will be 10240k.
I don`t know how to do it dynamically, if you want user1 has 512k, user2 has 1024k and if they want to connect server 1.1.1.1, user1 has 2048k, user2 has 3072k.

Total traffic i have done with packet mark using a simple queue though i want to have a standard limit say 10mb per user.

Thanks

You can use PCQ queue creating in queue tree. PCQ can separate your traffic by source or destination address and rate each traffics. If you need more, I can post here sample configuration but later today.

Yes Pls a sample config would be gr8.

All i need is trafiic btw my users to have seperate limit.

So your general user limits are dynamically created by simple queues. Next you need to mark packet between users and special network. Imagine you have servers in the special network 1.1.1.0/24. Your client network is 172.1.0.0/23. 172.1.0.0/24 is the users, who need to access to special network with 512kbps limit. 172.1.1.0/24 is the users, who need to access to special network with 1024kbps limit.

/ip firewall address-list
add list=512k_users address=172.1.0.0/24
add list=1024k_users address=172.1.1.0/24
add list=servers address=1.1.1.0/24

/ip firewall mangle 
add chain=forward src-address-list=512k_users passthrough=no \
dst-address-list=servers action=mark-packet new-packet-mark=512kFromToServers

add chain=forward src-address-list=1024k_users passthrough=no \
dst-address-list=servers action=mark-packet new-packet-mark=1024kFromToServers

Now need to add queue type.

/queue type
add kind=pcq name=512k_download pcq-classifier=dst-address pcq-dst-address-mask=32 \
pcq-limit=50 pcq-rate=512k pcq-total-limit=10000
add kind=pcq name=512k_upload pcq-classifier=src-address pcq-src-address-mask=32 \
pcq-limit=50 pcq-rate=512k pcq-total-limit=10000

add kind=pcq name=1024k_download pcq-classifier=dst-address pcq-dst-address-mask=32 \
pcq-limit=50 pcq-rate=1024k pcq-total-limit=10000
add kind=pcq name=1024k_upload pcq-classifier=src-address pcq-src-address-mask=32 \
pcq-limit=50 pcq-rate=1024k pcq-total-limit=10000

To create PCQ queue rule using own created queue type.

/queue tree
add name=512k_down packet-mark=512kFromToServers parent=global-in queue=512k_download
add name=512k_up packet-mark=512kFromToServers parent=global-out queue=512k_upload

add name=1024k_down packet-mark=1024kFromToServers parent=global-in queue=1024k_download
add name=1024k_up packet-mark=1024kFromToServers parent=global-out queue=1024k_upload

Now the traffic between users and servers will pass over simple queues. PCQ queue tree will handle those traffics. Hope it helps you.