Hi, I have several users on the lanside each allocated separate IP addresses. I need to allocate th traffic to each IP addresses certain portion of total uplink. Say, 192.168.0.2 rate 128kbps, ceil 128kbps. 192.168.0.3 rate 65kbps, ceil 128kbps 129.168.0.4 rate 64kbps, ceil 64kbps. and so on.... Also, for each user i would like to prioritize the traffic within the allocated bandwidth. say for (192.168.0.2 rate 128kbps, ceil128kbps), i would like to set prio 1 for http or https traffic and prio 2 for others. Please suggest how do i achieve this using tcng and htb, or any other solution. With regds, Rajendra Adhikari
On Monday 29 May 2006 02:47, rajendra@subisu.net.np wrote:> Hi, > I have several users on the lanside each allocated separate IP addresses. > I need to allocate th traffic to each IP addresses certain portion of > total uplink. > > Say, 192.168.0.2 rate 128kbps, ceil 128kbps. > 192.168.0.3 rate 65kbps, ceil 128kbps > 129.168.0.4 rate 64kbps, ceil 64kbps. > and so on.... > > Also, for each user i would like to prioritize the traffic within the > allocated bandwidth. > > say for (192.168.0.2 rate 128kbps, ceil128kbps), i would like to set prio > 1 for http or https traffic and prio 2 for others. > > Please suggest how do i achieve this using tcng and htb, or any other > solution.I think htb-gen[1] fits perfectly* in the scenario that you''ve described. [1] http://freshmeat.net/projects/htb-gen/ -- Luciano *and not because i''m the author P)
rajendra@subisu.net.np
2006-May-29 17:43 UTC
TCNG HTB prioritize traffic for each IP separately.
Hi, Yes! This (htb-gen software) perfectly meets my demand. I have also drawn a similar solution with tcng but unable to prioritize traffic for each user separately. Again, I seek someone would help me about how to do it with tcng. I have prioritize the traffic but the higher priority traffic completely stops the flow of lower prio traffic. I want the higher priority traffic be using the 90% of the allocated bandwith to the user and remaing 10% to the lower priority traffic. I would be grateful if someone shows me a sample code for using tcng. Here is the code I did, but could not achieve my goal. dev "eth0" { htb() { // This is the class for first client. He will be allocated 128kbps // And within this 128kbps, traffic are prioritized. class (rate 128 kbps, ceil 128 kbps) if ip_dst == 192.168.0.20 { prio { class (1) if tcp_sport == 80 || tcp_sport == 443 || tcp_sport == 22; class (2) if 1; //The high prio has completely halted the low prio traffic. } } // Another user, no traffic prioritization for him. class (rate 400 kbps, ceil 400 kbps) if ip_dst == 192.168.0.15; // And there may be many other users who I will allocate the // traffic as above and each may or may not have prioritization separately. } } With above setup, when the user (192.168.0.20) downloads every kinds of traffic, the high priority sucks all 128kbps of b/w leaving low prio traffic absolutely dead. How could I setup the user (192.168.0.20) such that when there is full traffic of all kinds the high prio traffic uses about 90% of 128kbps and remaining used by low prio traffic. Anyway, "htb-gen by Luciano" did it for me. Is there a way I could define first, 2nd and 3rd proiority traffic in "htb-gen by Luciano"? You only have features of high and low prio and that is too set for every users. Anyway, it does most of all what I want, but do not use tcng. However, I have a thirst to complete my setup with tcng. If someone need a quick solution, htb-gen is easy and reliable. Thanks Luciano for this. Okay, I have yet another query regarding HTB. When the sum of the rates is greater than the total rate/ceil of the total downlink then how will htb behave. Talking only about download, say, I have a link of 512 kbps down and I have 5 users each allocated 128kbps down and 5 other users with each 64kbps down, it is assumed that only few comes online at a time. So, until the users those have the sum of current rates less than or equal to 512kbps the HTB works fine. But what if all the user comes online at a time and use the kink to their full extent. How will the bandwidth shared among users. What does the htb theory says regarding this? I read in htb faq but the scenario it depicted is not so clear to relate with this scenario.> On Monday 29 May 2006 02:47, rajendra@subisu.net.np wrote: >> Hi, >> I have several users on the lanside each allocated separate IP >> addresses. >> I need to allocate th traffic to each IP addresses certain portion of >> total uplink. >> >> Say, 192.168.0.2 rate 128kbps, ceil 128kbps. >> 192.168.0.3 rate 65kbps, ceil 128kbps >> 129.168.0.4 rate 64kbps, ceil 64kbps. >> and so on.... >> >> Also, for each user i would like to prioritize the traffic within the >> allocated bandwidth. >> >> say for (192.168.0.2 rate 128kbps, ceil128kbps), i would like to set >> prio >> 1 for http or https traffic and prio 2 for others. >> >> Please suggest how do i achieve this using tcng and htb, or any other >> solution. > > I think htb-gen[1] fits perfectly* in the scenario that you''ve described. > > [1] http://freshmeat.net/projects/htb-gen/ > -- > Luciano > *and not because i''m the author P) > _______________________________________________ > LARTC mailing list > LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc >
rajendra@subisu.net.np
2006-May-29 17:44 UTC
TCNG HTB prioritize traffic for each IP separately.
Hi, Yes! This (htb-gen software) perfectly meets my demand. I have also drawn a similar solution with tcng but unable to prioritize traffic for each user separately. Again, I seek someone would help me about how to do it with tcng. I have prioritize the traffic but the higher priority traffic completely stops the flow of lower prio traffic. I want the higher priority traffic be using the 90% of the allocated bandwith to the user and remaing 10% to the lower priority traffic. I would be grateful if someone shows me a sample code for using tcng. Here is the code I did, but could not achieve my goal. dev "eth0" { htb() { // This is the class for first client. He will be allocated 128kbps // And within this 128kbps, traffic are prioritized. class (rate 128 kbps, ceil 128 kbps) if ip_dst == 192.168.0.20 { prio { class (1) if tcp_sport == 80 || tcp_sport == 443 || tcp_sport == 22; class (2) if 1; //The high prio has completely halted the low prio traffic. } } // Another user, no traffic prioritization for him. class (rate 400 kbps, ceil 400 kbps) if ip_dst == 192.168.0.15; // And there may be many other users who I will allocate the // traffic as above and each may or may not have prioritization separately. } } With above setup, when the user (192.168.0.20) downloads every kinds of traffic, the high priority sucks all 128kbps of b/w leaving low prio traffic absolutely dead. How could I setup the user (192.168.0.20) such that when there is full traffic of all kinds the high prio traffic uses about 90% of 128kbps and remaining used by low prio traffic. Anyway, "htb-gen by Luciano" did it for me. Is there a way I could define first, 2nd and 3rd proiority traffic in "htb-gen by Luciano"? You only have features of high and low prio and that is too set for every users. Anyway, it does most of all what I want, but do not use tcng. However, I have a thirst to complete my setup with tcng. If someone need a quick solution, htb-gen is easy and reliable. Thanks Luciano for this. Okay, I have yet another query regarding HTB. When the sum of the rates is greater than the total rate/ceil of the total downlink then how will htb behave. Talking only about download, say, I have a link of 512 kbps down and I have 5 users each allocated 128kbps down and 5 other users with each 64kbps down, it is assumed that only few comes online at a time. So, until the users those have the sum of current rates less than or equal to 512kbps the HTB works fine. But what if all the user comes online at a time and use the kink to their full extent. How will the bandwidth shared among users. What does the htb theory says regarding this? I read in htb faq but the scenario it depicted is not so clear to relate with this scenario.> On Monday 29 May 2006 02:47, rajendra@subisu.net.np wrote: >> Hi, >> I have several users on the lanside each allocated separate IP >> addresses. >> I need to allocate th traffic to each IP addresses certain portion of >> total uplink. >> >> Say, 192.168.0.2 rate 128kbps, ceil 128kbps. >> 192.168.0.3 rate 65kbps, ceil 128kbps >> 129.168.0.4 rate 64kbps, ceil 64kbps. >> and so on.... >> >> Also, for each user i would like to prioritize the traffic within the >> allocated bandwidth. >> >> say for (192.168.0.2 rate 128kbps, ceil128kbps), i would like to set >> prio >> 1 for http or https traffic and prio 2 for others. >> >> Please suggest how do i achieve this using tcng and htb, or any other >> solution. > > I think htb-gen[1] fits perfectly* in the scenario that you''ve described. > > [1] http://freshmeat.net/projects/htb-gen/ > -- > Luciano > *and not because i''m the author P) > _______________________________________________ > LARTC mailing list > LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc >