throtling bandwidth
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
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
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.
Quoted 6 lines · Payal Rathod
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?
Quoted 7 lines
With warm regards,
-Payal_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
_______________________________________________
LARTC mailing list
[email protected]
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!
Signature · 15 lines
******************************************************************** Brett Charbeneau Network Administrator Williamsburg Regional Library 7770 Croaker Road Williamsburg, VA 23188-7064 (757)259-4044 www.wrl.org (757)259-4079 (fax) [email protected] ******************************************************************** _______________________________________________ LARTC mailing list [email protected] http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Quoted 5 lines · Brett Charbeneau
tc qdisc delete dev eth0 root
tc qdisc add dev eth0 root tbf limit 5kb burst 5kb rate 256kbittc qdisc delete dev eth1 root
tc qdisc add dev eth1 root tbf limit 5kb burst 5kb rate 256kbit
I 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
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
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
Signature · 16 lines
******************************************************************** Brett Charbeneau Network Administrator Williamsburg Regional Library 7770 Croaker Road Williamsburg, VA 23188-7064 (757)259-4044 www.wrl.org (757)259-4079 (fax) [email protected] ******************************************************************** _______________________________________________ LARTC mailing list [email protected] http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
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.
Quoted 11 lines · Payal Rathod
Quoted 4 lines · Oscar Mechanic
Instead of restricting the speed use iptables
ipt_accountto 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.<[email protected]>
Sorry didn't get what you meant. What exactly isipt_account? Can you give an example?
Thanks in advance.
With warm regards,
-Payal
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Quoted 3 lines · Brett Charbeneau
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
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc