Re: [LARTC] iproute question

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 04 April 2003 18:27, Pascal Girard wrote:
> Hello all,
>
> My company is sharing it's internet access with a neighbor and the neighbor
> in question was eating our bandwidth (both in upload and download) most of
> the time. I finally set up a linux router to limit the incoming/outgoing
> bandwidth to his network by adding a tbf on eth0 interface and eth1
> interface of the router (neighbor is behind eth1 and we are in-between him
> and the rest of the world on eth0):
> tc qdisc add dev eth0 root tbf limit 40K rate 1Mbit burst 16K
> tc qdisc add dev eth1 root tbf limit 40K rate 1Mbit burst 16K
>
> The only problem is that I can't specify a total bandwidth for our
> neighbor. What I want to do exactly is specify that all traffic bound for
> eth1 is limited to 1Mbit instead of having 2 separate 1Mbit qdiscs...
>
> I tried looking at adding an ingress filter with classes on eth1 and
> removing the tbf on eth0 but the notions are a bit confusing to me.
>
> Can anybody give me examples on how I could do this?
So you want incoming + outgoing traffic to/from eth1 together bounded to 
1mbit?  Then you need the imq device.  It's a patch for the kernel so you can 
create a virtual device and a patch for iptables so you can redirect traffic 
to that device.  If you redirect incoming and outgoing traffic to the imq 
device and limit the speed of the imq device to 1mbit, you have contol on 
both in and out.

Stef

-- 

stef.coene@xxxxxxxxx
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux