Simple Queues and multiple gateways

We have a mikrotik with one lan interface and multiple dsl routers connected to the other interfaces. Traffic is directed to each gateway depending on the destination port. The lan network is 192.168.0.xx and the dsl routers are 192.168.1.254, 192.168.2.254 etc. We would like to limit availiable bandwidth of each dsl router (which is more or less fixed e.g. 15mb/s down, 1mb/s up) to the connected users, so if one user is connected he will get 15Mb/s, if 2 7,5Mb/s each etc. The problem is that traffic is first marked by destination port and then routed with static routes. Every tutorial i have read presumes that either there is 1 outgoing interface or for some reason bridges the lan and wan interfaces together. Can someone point me to some info?
Please take into account that each user uses all availiable dsl gateways at the same time (due to destination port routing) and that the dsl connections might not have the same speed.

Make two PCQ types for each DSL router. Set them to the router’s upstream and downstream capabilities for limits, and base the upstream one on src-address and the downstream one on dst-address
Make rules in prerouting that mark packets based on the in-interface, and mark packets for each router coming in from the WAN. Make rules in postrouting that mark packets based on the out-interface, and mark packets for each router going to the WAN.
Install queues attached to global-in and global-out for those packet marks, with the type set to the PCQ types you created. Make their limits the capabilities of the router that matches the packet marks the queue fires on (same as the PCQ limits).

PCQ will automatically fairly throttle down users evenly when the parent is exhausted, this should evenly distribute the available traffic of each router.

I did what you suggest before your post but with some changes. I used forward to mark the packets with source interface the wan and destination the lan (and vice versa) i even added the ip range for the source ip (and destination) to make the packet marking more to the point. Now that I read you post I tries your method but the packets do not appear to be marked (the counter stays 0). Before they where marked. Any suggestions as to why? Something else, do I set the dsl line speed in the queue type or do I set it in the queue treen under max limit?

Another question. Why use global-in and out and not the lan interface and the wan interfaces?

Post your configuration, it’s kind of hard to guess why things aren’t being marked.

The limit you set on the queue tree leaf itself should definitely be the DSL line speed. The limit you set on the PCQ queue type is going to determine how fast a single user can be - if you want a single user to be able to take all of the speed of a DSL line it should also be the DSL line speed. The queue tree leaf will then start throttling users evenly when more than one user is in a DSL gateway specific queue. You could use interface queues if you wanted to.

I can post my configuration but it is kinda big so i think it will create more problems. anyway, marking the packets in the forward chain with source and destination interface seems to work (if you have no objections). I want users to be able to utilise the full speed if they are alone so, do I have to set the line speed in pcq type as well (and if yes where, limit or total limit). Can I use the lan and wan interfaces instead of global-in and out and if not why? How do I check that the limit is working (apart from actual testing-downloading on pcs)? Should there be something automatically created under queue-tree or not? I cannot use the interface queues because the lan interface accepts data from all 3 dsl connections, so can it throttle data for each dsl? Or am I missing something?

anyone?