Community discussions

MUM Europe 2020
 
firebat
Member
Member
Topic Author
Posts: 390
Joined: Mon Apr 11, 2005 8:38 am

Queue tree and simple queue flow?

Sat Jan 27, 2007 11:44 am

I have a couple of questions regarding the correct place to apply queue trees that prioritize traffic that will not override simple queues that are performing bandwidth limiting/shaping for customers. First, I'll state the facts of what I understand and have taken from the manual:

Virtual Interfaces:
There are 3 virtual interfaces in RouterOS, in addition to real interfaces:

global-in - represents all the input interfaces in general (INGRESS queue). Please note that queues attached to global-in apply to traffic that is received by the router, before the packet filtering. global-in queueing is executed just after mangle and dst-nat

global-out - represents all the output interfaces in general. Queues attached to it apply before the ones attached to a specific interface

global-total - represents a virtual interface through which all the data, going through the router, is passing. When attaching a qdisc to global-total, the limitation is done in both directions. For example, if we set a total-max-limit to 256000, we will get upload+download=256kbps (maximum)



HTB (Hierarchical Token Bucket) in RouterOS
There are 4 HTB trees maintained by RouterOS:

- global-in
- global-total
- global-out
- interface queue

Simple Queues and HTB:
When adding a simple queue, it creates 3 HTB classes (in global-in, global-total and global-out), but it does not add any classes in interface queue.

Queue Trees and HTB:
Queue trees are more flexible - you can add them to any of the four HTB's.

Packet Traversal and HTB:
- When packet travels through the router, it passesall 4 HTB trees - global-in, global-total, global-out and interface queue.
- When a packet is destined for the router, it passes global-in and global-total HTB queues.
- When a packet is sent from the router, it traverses global-total, global-out and interface queues.



OK. I read all of this and understand it. Now, I am implementing the following configuration:

I am using Simple Queues to BW limit customers by IP. Each customer has a simple queue. By definition, three HTB classes are created in: global-in, global-total and global-out

Next, I am mangling and marking packets as they enter the router. For this example, I have a total throughput of 1Mb avaialable for customer use. I want to limit p2p traffic to 128kbps and other traffic to the remaining bandwidth. In order for traffic prioritization to work, it must be prioritized/limited before the simple queues limiting bandwidth for each customer:

|----------------------------1Mbps_total_limit------------------------------------|
|--p2p_traffic--|--------------------other_traffic------------------------------|
(up to 128Kbps) (up to 1Mbps)


I can create two queue trees:
1. p2p with a max-limit of 128kbps
2. other traffic with a max-limit of 1Mbps.

By definition, queues attached to global-in are applied after mangling. Therefore, if I apply both queue trees created above to global-in and global-out to limit overall upload/download, I have the following questions:

1. By definition, queue trees take presedence over simple queue if applied at the same place. Since Simple queues are automatically applied to global-in, global-total and global-out, will the simple queues still BW limit each user?

2. Is this the correct place to apply the queue trees?
Last edited by firebat on Tue Jan 30, 2007 10:40 am, edited 1 time in total.
 
valens
Trainer
Trainer
Posts: 246
Joined: Tue Jun 01, 2004 5:42 pm
Location: INDONESIA
Contact:

Sat Jan 27, 2007 9:44 pm

You can do mangle + queue tree on forward for prioritizing the traffic, and using global in/out to manage the user.
 
firebat
Member
Member
Topic Author
Posts: 390
Joined: Mon Apr 11, 2005 8:38 am

Sat Jan 27, 2007 9:52 pm

Thanks for the reply. Is what I noted above the correct configuration?
 
firebat
Member
Member
Topic Author
Posts: 390
Joined: Mon Apr 11, 2005 8:38 am

Tue Jan 30, 2007 10:40 am

? :)

Who is online

Users browsing this forum: CZFan, drbunsen, Google [Bot], Hero, MSN [Bot], Znevna and 123 guests