All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Adam Towarnyckyj" <adamt@commspeed.net>
To: lartc@vger.kernel.org
Subject: RE: [LARTC] TC Hashing Filters
Date: Tue, 06 Jul 2004 18:08:14 +0000	[thread overview]
Message-ID: <02e001c46384$351ca880$903113d8@uranus> (raw)
In-Reply-To: <005c01c2c1b1$e006a820$0200a8c0@monster>

----Original Message----
># 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

I messed with this a bit more before finally just giving up for today. I
looked at Gideon's example he posted to this list in the past
(http://mailman.ds9a.nl/pipermail/lartc/2003q2/008516.html) and copied
it character by character except I changed the ethernet device it was
attached to and the IP addresses he was using. Here's what I came up
with:

tc qdisc add dev eth1 root handle 1: htb

tc class add dev eth1 parent 1: classid 1:2 htb rate 100MBit ceil
100MBit burst 0Kbit

tc filter add dev eth1 parent 1:2 handle 2: protocol ip u32 divisor 256

tc filter add dev eth1 protocol ip parent 1: u32 match ip src
216.19.49.0/24 hashkey mask 0x000000ff at 12 link 2:

tc class add dev eth1 parent 1:2 classid 1:3 htb rate 64Kbit ceil 64Kbit
burst 0Kbit

tc filter add dev eth1 protocol ip parent 1:2 u32 ht 2:8c: match ip src
216.19.49.140 flowid 1:3

I even tried changing the src to dst and this still does not work.
Gideon, if you are out there somewhere, I'd appreciate it if you could
tell me if this actually worked for you. This is the most frustrating
project I have ever had to deal with because it makes so much sense and
in theory it looks like it should be working just fine. Anyways, thanks
for everyone's help. If anyone has any other ideas, I welcome them.

Adam Towarnyckyj

_______________________________________________
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 18:08 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 [this message]
2004-07-06 19:14 ` zoop
2004-07-06 19:16 ` zoop
2004-07-06 19:36 ` Walt Wyndroski
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='02e001c46384$351ca880$903113d8@uranus' \
    --to=adamt@commspeed.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.