All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Simple HTB setup with tcng
@ 2004-05-05  6:46 Clement MOREAU
  2004-05-05  7:59 ` lartc
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Clement MOREAU @ 2004-05-05  6:46 UTC (permalink / raw)
  To: lartc

Hello all, 

I am trying to set up a simple htb based system, where packets with
source ip 10.0.0.1 should have their own class. 
I plan to use tcng to set it up easier. 

Is there something wrong in my tcng file ? 

~/tcng$ cat htb
/*
 */

#include "fields.tc"
#include "ports.tc"

dev eth0 {
        htb ( ) { 
            class ( rate 600kbps, ceil 600kbps ) 
            { 
                class () if ip_src = 10.0.0.1 ; 
                class (default) ;
            } 
        }
}


When I compile it, I get : 

~/tcng$ tcc htb

# ================ Device eth0 

tc qdisc add dev eth0 handle 1:0 root htb default 3
tc class add dev eth0 parent 1:0 classid 1:1 htb rate 75000bps ceil
75000bps
tc class add dev eth0 parent 1:1 classid 1:2 htb rate 75000bps ceil
75000bps
tc class add dev eth0 parent 1:1 classid 1:3 htb rate 75000bps ceil
75000bps
tc filter add dev eth0 parent 1:1 protocol all prio 1 u32 match u32
0xa000001 0xffffffff at 12 classid 1:2


which is not working as expected. 
Packets never get matched. From what I understand of tc (not too much),
the filter should have been : 
tc filter add dev eth0 parent 1:0 protocol all prio 1 u32 match u32
0xa000001 0xffffffff at 12 classid 1:2

(I replaced parent 1:1 by parent 1:0). 

I tried this setup and it works as expected (at least : packets from the
server gets matched, other don't. I have used tc -s class show dev eth0
to see it).

Do I miss something ? 

Thank you.

-- 
Clement MOREAU <clement.moreau@inventel.fr>


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-05-05 11:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-05  6:46 [LARTC] Simple HTB setup with tcng Clement MOREAU
2004-05-05  7:59 ` lartc
2004-05-05  8:15 ` Clement MOREAU
2004-05-05 11:44 ` lartc

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.