LARTC
[Top] [All Lists]

Re: [LARTC] tc filter not work, why?

To: "Nikolay Kichukov" <hijacker@oldum.net>
Subject: Re: [LARTC] tc filter not work, why?
From: "吴明津" <womking@gmail.com>
Date: Mon, 30 Jul 2007 17:30:22 +0800
Cc: lartc@mailman.ds9a.nl
Delivered-to: sp-com-lists@consult.net
Delivered-to: lartc-list@securepoint.com
Delivered-to: lartc@outpost.ds9a.nl
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=XyV6Pll6hnSD3zZpuuisS958q8YzmtDkaBS/r7OeI7sKdkMBM5dvwZ3gYd3bsdxZ8DjBb6Tus/qM71tzQUPzIfxZOui3rQS8NPXY7kH8cV/ZqO7jLD0qdagHtYXDU9X98d4Iwc9G2aP2ie7fKXcN2IhxPQU/QNRQlhZyQYLuN2Q=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tpYcUsaFdzHAa9xoOT9feUAKE74uvLeK2zPthF7BDhuBHJsKAgAFqLdr03IRKcA19zhC4VUIcsfhE/BcY2ixkrAGBkt43pGAyyPe0kdu0qVvHUeIzAnnTjN1WJ/4a5daPM/1lJvHll8omCTn+kbZ4jCQnl4CF6QlZ9cnRtEt9c8=
In-reply-to: <46AD859C.8070209@oldum.net>
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: <baa23c9d0707260253r7283e85ao951f0ed62c470151@mail.gmail.com> <46A8736E.3070208@oldum.net> <baa23c9d0707260328h19798758l865a293bb7c5331b@mail.gmail.com> <46AD859C.8070209@oldum.net>
Sender: lartc-bounces@mailman.ds9a.nl
hello Nikolay Kichukov,

Thank you for your help, I have fixed the problem now.

I'm not using the tc in a computer, I port the tc to a embedded
system, a router runing linux, and I want to control the traffic on
LAN, and the WAN is connnect to the Internet by PPPoE.

Today I debugged in the linux net/sched/ code and found a bug in the
include/net/pkt_cls.h->tc_classify().

when I use PPPoE to access Internet by WAN, the skb->protocol  is
0x8864 which is means a  PPPoE session packet, so it dose not match
the protocol  ip which given in the filter,  and all the  packets will
not by classified by the filter.



On 7/30/07, Nikolay Kichukov <hijacker@oldum.net> wrote:
> Hello 吴明津,
> I cannot clearly understand the whole scenario.
>
> Normally on your router box you have 2 interfaces:
> eth0 and eth1 for example
>
> Let me know which is connected to your LAN and which to your WAN and
> which way you want to limit packets.
>
> Cheers,
> -Nik
>
> 吴明津 wrote:
> > thanks Nikolay ,
> >
> > In the filter src means limit the up speed on WAN interface, I want to
> > limit the down speed, so it should us u32 to match the dst ip address.
> > Besides, I tried src, it didn't work too.
> >
> > On 7/26/07, Nikolay Kichukov <hijacker@oldum.net> wrote:
> >> Hello 吴明津,
> >>
> >> Maybe in your filter statement you should use src rather than dst? It is
> >> not clear what interface is connected to what hosts.
> >>
> >> HTH,
> >> -Nik
> >>
> >> 吴明津 wrote:
> >> > I try to use tc on mips with linux-2.4.18 but the u32 filter dosn't
> >> work
> >> >
> >> > I added htb qdisc to linux-2.4.18 and use it to limit the speed in
> >> > LAN, it only work well on the default class, for example
> >> >
> >> > tc qdisc add dev eth0 root handle 1: htb default 10
> >> > tc class add dev eth0 parent 1:0 classid 1:1 htb rate 2000kbit
> >> > tc class add dev eth0 parent 1:1 classid 1:10 htb rate 500kbit ceil
> >> 500kbit
> >> > tc calss add dev eth0 parent 1:1 classid 1:11 htb rate 300kbit ceil
> >> 300kbit
> >> > tc filter add dev eth0 protocol ip u32 match ip dst 192.168.18.100
> >> > flowid 1:11
> >> >
> >> > the host 192.168.18.100 have a speed of 500kbit rather than 300kbit.
> >> >
> >> > if I don't set the default 10 class, all this dosn't have any effect.
> >> >
> >> > why?
> >> >
> >> > thank you.
> >> > _______________________________________________
> >> > LARTC mailing list
> >> > LARTC@mailman.ds9a.nl
> >> > http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
> >>
>
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
<Prev in Thread] Current Thread [Next in Thread>