Bandwidth Management using a Queue Tree and PCQ

Queue Tree Configuration

Now to create the actual Queue Tree. First we create the two parents.
One incoming and one outgoing. These parents will be assigned the max_ queue
type that you created earlier. Make sure the assigned queue matches what you
have set.

/queue tree
# Parents
add name=ppp_download packet-mark=ppp-all_in_pkt parent=global queue=\
    max_download_6m
add name=ppp_upload packet-mark=ppp-all_out_pkt parent=global queue=\
    max_upload_1m

Next we handle the unknowns. I tend to limit the bandwidth for unknowns, so
I use one of the rate limited queues.

/queue tree
# Unknowns
add name=ppp_d_unknown packet-mark=ppp-all_unknown_in_pkt parent=\
    ppp_download queue=download_512k_rate
add name=ppp_u_unknown packet-mark=ppp-all_unknown_out_pkt parent=\
    ppp_upload queue=pcq_upload_64k

Next are the entries for each device you want to shape. The next two entries
are purely for example. You will need to modify the packet-mark names to match
what you have created earlier, and assign the desired queues.

/queue tree
# Machine1
add name=ppp_d_machine1 packet-mark=ppp-all_machine1_in_pkt parent=\
    ppp_download priority=5 queue=download_4m_rate
add name=ppp_u_machine1 packet-mark=ppp-all_machine1_out_pkt parent=ppp_upload \
    priority=5 queue=upload_512k
/queue tree
# Machine2
add name=ppp_d_machine2 packet-mark=ppp-all_machine2_in_pkt parent=\
    ppp_download priority=5 queue=download_1m
add name=ppp_u_machine2 packet-mark=ppp-all_machine2_out_pkt parent=ppp_upload \
    priority=5 queue=upload_64k

You will probably need to test and adjust the assigned queues in the queue
tree, but that’s pretty much it.

Enjoy!

1 Like