LARTC
[Top] [All Lists]

Re: [LARTC] linux-2.4.22 + bridge + traffic control by MAC.

To: Henry Bin <henry.bin@gmail.com>
Subject: Re: [LARTC] linux-2.4.22 + bridge + traffic control by MAC.
From: Mohan Sundaram <mohan.tux@gmail.com>
Date: Wed, 08 Nov 2006 17:07:52 +0530
Cc: lartc@mailman.ds9a.nl
Delivered-to: sp-com-lists@consult.net
Delivered-to: lartc-list@securepoint.com
Delivered-to: lartc@outpost.ds9a.nl
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:from; b=mpCQd8r+Qj4kT+LU7A6FBZ8SQQXMR0bYn4F8hsriwTf9nt6kPPWWeLrYrrdRpMDEfwmjgR9iyi4Kx7B27mfMGs7ijl3+XHze6QS8lpW7oZwlgFiSUieeYGHQozhQ7p+Qptmzztj3h9J+DBov2ZoLK2HtgFkqmU0Ny4ln2GQAZ+0=
In-reply-to: <6ec85fe20611080125j57472d43wbc8115222af4b417@mail.gmail.com>
List-archive: <http://mailman.ds9a.nl/pipermail/lartc>
List-help: <mailto:lartc-request@mailman.ds9a.nl?subject=help>
List-id: "Mailinglist of the Linux Advanced Routing &amp; Traffic Control project" <lartc.mailman.ds9a.nl>
List-post: <mailto:lartc@mailman.ds9a.nl>
List-subscribe: <http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc>, <mailto:lartc-request@mailman.ds9a.nl?subject=subscribe>
List-unsubscribe: <http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc>, <mailto:lartc-request@mailman.ds9a.nl?subject=unsubscribe>
References: <6ec85fe20611062225t1bee861fq93ed5cb9f66c3ff6@mail.gmail.com> <"11 62893054.4064.19.camel"@localhost.localdomain> <6ec85fe20611080125j57472d43wbc8115222af4b417@mail.gmail.com>
Reply-to: smohan@vsnl.com
Sender: lartc-bounces@mailman.ds9a.nl
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)
Henry Bin wrote:
On 11/7/06, Покотиленко Костик <casper@meteor.dp.ua> wrote:
В Вто, 07/11/2006 в 14:25 +0800, Henry Bin пишет:
> Dear all,
>
> I am working on a linux box (2.4.22 kernel) which is used as a
> bridge. And I want to add traffic control rules on it by client's MAC. Does anyone has such experience on how to do that? Thank you very much!!

bridge-utils
iptables
ebtables

Oh, could you please give me a example about how to do that?
What's I want is to limit the bandwidth for specified MAC. For
example, I just want to give 3Mbps bandwidth to the PC which has MAC
address--00:40:33:44:23:44.

Thanks a lot!
--
Покотиленко Костик <casper@meteor.dp.ua>

You can mark (fwmark) a packet based on the source MAC in iptables/ebtables. In the case of bridge, the packet needs to be marked by ebtables. tc allows classification by fwmark.

Create a class and assign 3Mbps rate to it. Create a tc filter to send all traffic with fwmark 1 to this class. Create a ebtables rule that marks all packets coming from MAC address--00:40:33:44:23:44 with fwmark 1.

Mohan
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

<Prev in Thread] Current Thread [Next in Thread>