Hi, My branch office as got a 256Kbps b/w from their service provider at a very very high rate per Mb. They don''t require 256Kbps at all but the ISP does not offer anything low. Can we restrict the bandwith to say 64Kbps nothing fancy? How do I go about it? With warm regards, -Payal
Instead of restricting the speed use iptables ipt_account to restrict usage and the put in a script on cron to zero the counters. That way you get to budget and the users get best experience. On Thu, 2005-11-10 at 10:57 -0500, Payal Rathod wrote:> Hi, > My branch office as got a 256Kbps b/w from their service provider at a > very very high rate per Mb. They don''t require 256Kbps at all but the > ISP does not offer anything low. Can we restrict the bandwith to say > 64Kbps nothing fancy? How do I go about it? > > With warm regards, > -Payal > > _______________________________________________ > LARTC mailing list > LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
On Thu, 10 Nov 2005, Payal Rathod wrote: PR> My branch office as got a 256Kbps b/w from their service provider at a PR> very very high rate per Mb. They don''t require 256Kbps at all but the PR> ISP does not offer anything low. Can we restrict the bandwith to say PR> 64Kbps nothing fancy? How do I go about it? Payal, I''ve had success limiting bandwidth on interfaces for our wireless networks. Patrons are coming in with P2P applications that hog the whole pipe if you let them. For us, these intefaces are on a firewall with two network cards and these statements did the trick limiting traffic to 256K coming and going: tc qdisc delete dev eth0 root tc qdisc add dev eth0 root tbf limit 5kb burst 5kb rate 256kbit tc qdisc delete dev eth1 root tc qdisc add dev eth1 root tbf limit 5kb burst 5kb rate 256kbit You have to at least have iproute2 (or in my case, becuase we use Debian "iproute") installed so the "tc" command is recognized. Hope this is useful! -- ******************************************************************** Brett Charbeneau Network Administrator Williamsburg Regional Library 7770 Croaker Road Williamsburg, VA 23188-7064 (757)259-4044 www.wrl.org (757)259-4079 (fax) brett@wrl.org ********************************************************************
On Thu, Nov 10, 2005 at 11:09:18AM -0500, Brett Charbeneau wrote:> tc qdisc delete dev eth0 root > tc qdisc add dev eth0 root tbf limit 5kb burst 5kb rate 256kbit > > tc qdisc delete dev eth1 root > tc qdisc add dev eth1 root tbf limit 5kb burst 5kb rate 256kbitI have adsl (pppoe) with eth0 as my internal interface and eth1 as external. What do I do in this case, I want to limit to 64kbps Thanks a lot. With warm regards, -Payal
On Thu, 10 Nov 2005, Payal Rathod wrote: PR> On Thu, Nov 10, 2005 at 11:09:18AM -0500, Brett Charbeneau wrote: PR> > tc qdisc delete dev eth0 root PR> > tc qdisc add dev eth0 root tbf limit 5kb burst 5kb rate 256kbit PR> > PR> > tc qdisc delete dev eth1 root PR> > tc qdisc add dev eth1 root tbf limit 5kb burst 5kb rate 256kbit PR> PR> PR> I have adsl (pppoe) with eth0 as my internal interface and eth1 as PR> external. What do I do in this case, I want to limit to 64kbps Does that make your pppoe interface ppp0? Try issuing an "ifconfig" command to see. I''m always confused about how the kernel sees a pppoe interface. Give this a try: tc qdisc delete dev eth0 root tc qdisc add dev eth0 root tbf limit 5kb burst 5kb rate 64kbps tc qdisc delete dev eth1 root tc qdisc add dev eth1 root tbf limit 5kb burst 5kb rate 64kbps -- ******************************************************************** Brett Charbeneau Network Administrator Williamsburg Regional Library 7770 Croaker Road Williamsburg, VA 23188-7064 (757)259-4044 www.wrl.org (757)259-4079 (fax) brett@wrl.org ********************************************************************
Sorry its ipt_quota iptables -I FORWARD 1 -s 192.16.0.1/24 -m quota --quota 6000 -j ACCEPT iptables -I FORWARD 2 -s 192.16.0.1/24 -j DENY All of 192.16.0.0 will be limited to 6M after which they get nothing more clever things are possible but I will leave it too you. quota Implements network quotas by decrementing a byte counter with each packet. --quota bytes The quota in bytes. On Thu, 2005-11-10 at 12:09 -0500, Payal Rathod wrote:> On Thu, Nov 10, 2005 at 04:06:50PM +0000, Oscar Mechanic wrote: > > Instead of restricting the speed use iptables ipt_account to restrict > > usage and the put in a script on cron to zero the counters. That way you > > get to budget and the users get best experience. > > > <lartc@mailman.ds9a.nl> > Sorry didn''t get what you meant. What exactly is ipt_account? Can you > give an example? > Thanks in advance. > With warm regards, > -Payal
On Thu, Nov 10, 2005 at 12:12:03PM -0500, Brett Charbeneau wrote:> Does that make your pppoe interface ppp0? Try issuing an > "ifconfig" command to see. I''m always confused about how the > kernel sees a pppoe interface.Yes, my ISP assigned IP is given to ppp0 With warm regards, -Payal