Hi, suppose that I have a network of different users which are connected to an ISP using a wireless enabled technology as shown in attached figure. so every link until ISP is wireless link and each router board not only transmits the traffic of its own direct user, but also forwards some aggregate traffic as well. lets say we want to support users with different services. The CIR users have higher priority as opposed to CIR=0 users. I want to know which routerboards must implement HTB so that we could give them their services. Do we have to implement HTB at the intermediate routers or only at the router located at ISP?
sitting here to receive your answers .
thanks very much
User Traffic Control and how to Do It is where money is made.
I suspect you will have to pay some money to find out how it is done, unless you are really dedicated.
For example, in my networks i use a mixture of hard Speed limits, Bursting, hard Gb/month/week/day/hour caps and dynamic Speed limits on Mikrotik and other platforms.
It is not trivial to do.
As a pointer, look at Queues under ROS, and User Manager.
well, it is not really my network, it is an example I am using to learn something about HTB . I have niether a network nor money to pay anyone, please help for free…
you should limit bandwidth from the uplink side, not from the downlink. in other words, “first limit, then send”, not “transmit huge amount of data congesting your links, then shape just before the client machine”
you mean there is no need for HTB queuing? Only we must force users to send within their limits? if Then when do we use HTB in general? In the network I have shown there are both CIR users and low priority users. Then how ISP router differentiates the two categories?
if the traffic is sent like what you said, they won’t arrive out of shape at the ISP router?
There is need for HTB. You need to implement it everywhere where new data enters the network. It doesn’t make sense to transport data from one hop to the next just to drop it later on - that’s a waste of available bandwidth. Wherever clients connect, immediately do QoS on the data they just sent into your network. Usually you want to do QoS on the router where data enters the network from the Internet as well. You also want to do priority settings wherever new data enters the network, because every link could - somehow - become congested.
To propagate priority along a backbone set standard flags such as TOS or DSCP on the packets so that routers further down the chain can respect the initial decision made by the router that first encountered the packet.
You can apply HTB everywhere. How it’s applied depends on traffic passing through and how you classify it (per IP, per port, per access list, per protocol, rate etc) For example, when one want’s to assure equal access per user, based on volume of data (i.e. PCQ), then one needs to do it later in the chain, where aggregate data of all user activity is available. However if you want to prioritize certain protocols over other (interactive vs bulk) you can do that closer to individual users.
Thanks very much Fewi and rmichael. From your posts it looks like every router along the path should have an HTB queue/leaf for every user whose traffic passes this router. In this case, if a new user with some CIR and MIR enters the network and passes traffic through some of the routers, then how the ISP can reconfigure the affected routers to have HTB queues for the new comers???
Can reconfiguration be done remotely with some sort of control signals, or it has to be done manually? would you please explain?
You don’t need one queue per user on every router. You can use PCQ to dynamically create subqueues based on IP address. You can identify the rate each sub queue should get by permanently marking the packet when it enters the network with TOS or DSCP.
Thanks Fewi, but PCQ does not prioritize different groups of customers. does it?
Let’s say some users want variouse Committed information rates and some users want whatever bandwidth that is available, so no commitment for the ISP. I think this requires priority queueing, such as HTB. I cannot find out how PCQ and HTB can be combined to account for priorities. any guidance? thanks
Now I understand that when establishing HTB, I can define the queue type as PCQ. This way by arriving a new connection the routers establish a new queue. However, I don’t know how to use DSCP field to notify the intermediate routers about the CIR and MIR. can this be done in the DSCP field? I thought DSCP is only used for prioritizing. Can I use the field for defining the rates? is there any example so that I can see how the packet marking is done for rates and how the router reads the rates for the PCQ?
DSCP is usually used for priorities, but you can use it for anything you like. You can use DSCP as a permanent packet mark as long as you have a consistent policy on your backbone. You then use the mangle facilities to apply packet marks to packets based on their DSCP value, and process in HTB according to the packet marks.
However, usually you want to apply the shaping (bring traffic rate down to CIR/MIR) at the entry points to the network (upstream from the Internet entering your network, downstream from the CPE entering your network) and then only do priority on backbone hops. If you have a very large backbone, just on the CPE is easier (but wastes backbone resources). There is no signaling protocol to install policies on the Internet edge when you install a new CPE. But either side can set DSCP values for priorities for the backbone to obey.