Skip to contentSkip to conversation

PARAMs

LARTC James Lista 3 participants 3 messages Nov 26, 2004 – Nov 29, 2004

lore
Share & tools
lore
#0 lore raw

buddies,

im newbie to traffic control and been studying htb scripts (examples), I wonder how to use params, this line below for ex.:
--------
$TC filter add dev $WAN parent 1: protocol ip prio 10 u32 match ip protocol 6 0xff match u 8 0x05 0x0f at 0 match u16 0x0000 0xffc0 at 2 match u8 0x10 0xff at 33 flowid 1:$VIP
--------

I understood it is adding a filter to go to class $VIP in device wan (eth0 in my case)........
I also understant that "match ip protocol 6" <-- 6 = TCP - I see that in /etc/protocols, but why that 0xff after it ?

can someone explain the rest of the params ? I donnot understant those params like prio 10, u32, match u16 0x0000 0xffc0, etc !

thanks in advance

James

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw
Quoted 2 lines · James Lista

buddies,

<snip>

Quoted 7 lines

I understood it is adding a filter to go to class $VIP in device wan (eth0 in my case)........
I also understant that "match ip protocol 6" <-- 6 = TCP - I see that in /etc/protocols, but why that 0xff after it ?

can someone explain the rest of the params ? I donnot understant those params like prio 10, u32, match u16 0x0000 0xffc0, etc !

This is the only documentation I have been able to track down in my travels about the u32 classifier[1]. I don't know why there's an 0xff after match 'ip protocol 6'. You get the same thing for '[d|s]port 53 0xff' matches, too. I think those keywords are syntactic sugar.

[1] http://lartc.org/howto/lartc.adv-filter.html

Signature · 8 lines
Jason Boxman
Perl Programmer / *NIX Systems Administrator
Shimberg Center for Affordable Housing | University of Florida
http://edseek.com/ - Linux and FOSS stuff

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#2 lore raw
In reply to James Lista
Quoted 10 lines · James Lista

buddies,

im newbie to traffic control and been studying htb scripts (examples), I wonder how to use params, this line below for ex.:
--------
$TC filter add dev $WAN parent 1: protocol ip prio 10 u32 match ip protocol 6 0xff match u 8 0x05 0x0f at 0 match u16 0x0000 0xffc0 at 2 match u8 0x10 0xff at 33 flowid 1:$VIP
--------

Quoted 7 lines

I understood it is adding a filter to go to class $VIP in device wan (eth0 in my case)........
I also understant that "match ip protocol 6" <-- 6 = TCP - I see that in /etc/protocols, but why that 0xff after it ?

can someone explain the rest of the params ? I donnot understant those params like prio 10, u32, match u16 0x0000 0xffc0, etc !

Start reading and reading and reading and more reading:
http://www.lartc.org
http://www.docum.org

Stef

Signature · 6 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/