Help on queueing failure?

I’m using simple PCQ to put ceilings on the bandwidth of my subscribers according to what they pay for service. As far as I can see, I’m precisely following the recommendations in the wiki and similar places. Now, I’m getting absolutely satisfactory limitation of the bandwidth TO the subscriber – however, the bandwidth FROM the subscriber doesn’t seem to be getting limited at all. I’ve looked for logical errors, name substitutions, and stupid typos, but have not been able to find what is causing this. Worst of all, I have two other routers on which I don’t see this problem. Can anyone see what is going wrong? Maybe I’m supposed to use the input queue instead of the forward queue for traffic from the customer?

(Yes, I realize I don’t have a queue defined for the system traffic mark – I just don’t want to limit it, and that seems to work fine as it is.)

[admin@Router] > ip firewall mangle print

Flags: X - disabled, I - invalid, D - dynamic
 0   ;;; System connection
      chain=forward action=mark-connection new-connection-mark=CM-admin passthrough=yes connection-state=new src-address=192.168.3.0/26
 1   ;;; System packet
     chain=forward action=mark-packet new-packet-mark=PM-admin passthrough=no connection-mark=CM-admin
 2   ;;; Premium connection mark
     chain=forward action=mark-connection new-connection-mark=CM-prem passthrough=yes connection-state=new src-address-list=prem-subscribers
 3   ;;; Premium parket mark
     chain=forward action=mark-packet new-packet-mark=PM-prem passthrough=no connection-mark=CM-prem
 4   ;;; Basic connection mark
     chain=forward action=mark-connection new-connection-mark=CM-std passthrough=yes connection-state=new
 5   ;;; Basic parket mark
     chain=forward action=mark-packet new-packet-mark=PM-std passthrough=no connection-mark=CM-std

[admin@Router] > /queue type print ; / queue tree print

 0 name="default" kind=pfifo pfifo-limit=50
 1 name="ethernet-default" kind=pfifo pfifo-limit=50
 2 name="wireless-default" kind=sfq sfq-perturb=5 sfq-allot=1514
 3 name="synchronous-default" kind=red red-limit=60 red-min-threshold=10 red-max-threshold=50 red-burst=20 red-avg-packet=1000
 4 name="hotspot-default" kind=sfq sfq-perturb=5 sfq-allot=1514
 5 name="rate-to-subscriber-std" kind=pcq pcq-rate=2000000 pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=2000
 6 name="rate-from-subscriber-std" kind=pcq pcq-rate=620000 pcq-limit=50 pcq-classifier=src-address pcq-total-limit=2000
 7 name="rate-to-subscriber-prem" kind=pcq pcq-rate=3000000 pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=2000
 8 name="rate-from-subscriber-prem" kind=pcq pcq-rate=620000 pcq-limit=50 pcq-classifier=src-address pcq-total-limit=2000
 9 name="default-small" kind=pfifo pfifo-limit=10

Flags: X - disabled, I - invalid
 0   name="to-subscriber-total" parent=Router limit-at=0 priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s
 1   name="from-subscriber-total" parent=Router limit-at=0 priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s
 2   name="to-subscriber-std" parent=to-subscriber-total packet-mark=PM-std limit-at=0 queue=rate-to-subscriber-std priority=7 max-limit=0 burst-limit=0 burst-threshold=0
     burst-time=0s
 3   name="from-subscriber-std" parent=from-subscriber-total packet-mark=PM-std limit-at=0 queue=rate-from-subscriber-std priority=7 max-limit=0 burst-limit=0 burst-threshold=0
     burst-time=0s
 4   name="to-subscriber-prem" parent=to-subscriber-total packet-mark=PM-prem limit-at=0 queue=rate-to-subscriber-prem priority=5 max-limit=0 burst-limit=0 burst-threshold=0
     burst-time=0s
5   name="from-subscriber-prem" parent=from-subscriber-total packet-mark=PM-prem limit-at=0 queue=rate-from-subscriber-prem priority=6 max-limit=0 burst-limit=0 burst-threshold=0
     burst-time=0s

[/size]

The parent of both the to-subscriber-total and from-subscriber-total queues is ‘Router’. I assume that is an interface. That won’t work - queues that have an interface as a parent only see packets leaving through that interface, which is why queuing works in one direction. Make the parent of ther other queue the opposite interface. The parent for the upload should be the interface facing the subscriber, the parent for the download shold be the Interface facing your upstream (the Internet).

Wow, you’re 100% right. Also explains why it works on the other routers – the other routers have this value correct.

Thanks!