All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Walt Wyndroski" <wdwrn@friendlycity.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] TC Hashing Filters
Date: Tue, 06 Jul 2004 19:36:00 +0000	[thread overview]
Message-ID: <00cd01c46390$777c6ce0$0201a8c0@jabbacom.net> (raw)
In-Reply-To: <005c01c2c1b1$e006a820$0200a8c0@monster>

Where can I find that app? I would like to evaluate it for my site.

Regards,

Walt Wyndroski


----- Original Message ----- 
From: <zoop@lone.ath.cx>
To: "Adam Towarnyckyj" <adamt@commspeed.net>; <lartc@mailman.ds9a.nl>
Sent: Tuesday, July 06, 2004 3:16 PM
Subject: RE: [LARTC] TC Hashing Filters


> The reason I asked about if you were doing this for an ISP is that I worte
an app to
>  track IP's and the bandwidths associated with them,  and it will generate
the TC
> commands for you.  It uses HTB though.
>
> Adam Towarnyckyj (adamt@commspeed.net) wrote:
> >
> >zoop@lone.ath.cx wrote:
> >>> # Create filter to hash out last octet and link to hash table 2:
> >>> tc filter add dev eth1 protocol ip parent 1:1 prio 5 u32 ht
> >>>800:: match ip src 216.19.49.0/24 hashkey mask 0x000000ff at 12 link
> >2:
> >>
> >>
> >>I think this needs to be attached to the root.
> >>parent 1:0
> >
> >Catalin BOIE (util@deuroconsult.ro) wrote:
> >>> # Create root qdisc
> >>> tc qdisc add dev eth1 root handle 1:0 cbq bandwidth 200Mbit
> >avpkt 1000
> >>> # Create a "transit class"
> >>> tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth
> >200Mbit
> >>> rate 200Mbit allot 1514 weight 2Mbit prio 8 maxburst 10 avpkt 1000
> >>> # Create hash table attached to transit class
> >>> tc filter add dev eth1 parent 1:0 handle 2: protocol ip u32
> >divisor 256
> >>> # Create filter to hash out last octet and link to hash table 2:
> >>> tc filter add dev eth1 protocol ip parent 1:1 prio 5 u32 ht
> >>> 800:: match ip src 216.19.49.0/24 hashkey mask 0x000000ff at 12 link
> >2:
> >>> # Create class for 128Kbit limit
> >>> tc class add dev eth1 parent 1:0 classid 1:2 cbq bandwidth
> >>
> >>I think here is parent 1:1, right?
> >>
> >>> 200Mbit rate 128kbit allot 1514 prio 5 maxburst 20 avpkt 1000 bounded
> >>> # Create filter for IP I'm limiting
> >>> tc filter add dev eth1 protocol ip parent 1:0 prio 5 u32 ht 2:8c
> >
> >>> match ip src 216.19.49.140 flowid 1:2
> >
> >
> > I have tried both of your suggestions and it is still allowing
> >all traffic to pass through. Thank you for the help though. Here is what
> >I have now:
> >
> ># Create root qdisc
> >tc qdisc add dev eth1 root handle 1:0 cbq bandwidth 200Mbit avpkt 1000
> >
> ># Create transit class
> >tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 200Mbit rate
> >200Mbit allot 1514 weight 2Mbit prio 8 maxburst 10 avpkt 1000
> >
> ># Create hash table and attach to transit class
> >tc filter add dev eth1 parent 1:1 handle 2: protocol ip u32 divisor 256
> >
> ># Create filter to hash out last octet and link to hash table 2:
> >tc filter add dev eth1 protocol ip parent 1:0 prio 5 u32 ht 800:: match
> >ip src 216.19.49.0/24 hashkey mask 0x000000ff at 12 link 2:
> >
> ># Create class for 128Kbit limit
> >tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth 200Mbit rate
> >128kbit allot 1514 prio 5 maxburst 20 avpkt 1000 bounded
> >
> ># Create filter for IP I'm limiting
> >tc filter add dev eth1 protocol ip parent 1:0 prio 5 u32 ht 2:8c match
> >ip src 216.19.49.140 flowid 1:2
> >
> > If anyone can still see anything I'm doing wrong, I'd appreciate
> >it if you pointed it out. I've tried many different scenarios with
> >different parents and they still don't work. And as for the question
> >earlier about if I was doing this for an ISP, yes I am. If you would
> >like some help, and if I can get this to work, I plan on writing a How
> >To and posting it to a website so people can easily set this up
> >themselves. I find the lack of documentation on the subject quite
> >frustrating at times. Thanks all for your help.
> >
> >Adam Towarnyckyj
> >
> >_______________________________________________
> >LARTC mailing list / LARTC@mailman.ds9a.nl
> >http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> >
>
> --
> When dealing with a slow pipe, never underestimate the throughput of the
postal system.
>
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

  parent reply	other threads:[~2004-07-06 19:36 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-22  1:02 [LARTC] TC Hashing Filters mjoachimiak
2003-01-23  0:08 ` mjoachimiak
2004-07-02 22:54 ` Adam Towarnyckyj
2004-07-03  0:12 ` zoop
2004-07-06 17:02 ` Adam Towarnyckyj
2004-07-06 18:08 ` Adam Towarnyckyj
2004-07-06 19:14 ` zoop
2004-07-06 19:16 ` zoop
2004-07-06 19:36 ` Walt Wyndroski [this message]
2004-07-06 20:16 ` Adam Towarnyckyj
2004-07-06 21:15 ` Adam Towarnyckyj
2004-07-06 21:25 ` Ed Wildgoose
2004-07-12 20:48 ` Adam Towarnyckyj
2004-07-13  1:23 ` gypsy
2004-07-13 17:45 ` Adam Towarnyckyj
2004-07-14  5:57 ` Catalin BOIE
2004-07-14 13:48 ` gypsy
2004-07-14 18:06 ` Adam Towarnyckyj
2004-07-14 18:25 ` Jason Boxman
2004-07-15  2:13 ` gypsy
2004-07-15 12:36 ` Glen Mabey
2004-07-15 17:40 ` Adam Towarnyckyj
2004-07-16  3:36 ` gypsy
2004-07-22 22:07 ` Adam Towarnyckyj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='00cd01c46390$777c6ce0$0201a8c0@jabbacom.net' \
    --to=wdwrn@friendlycity.net \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.