Hello
I've been messing with traffic controlling for some time and encountered singularities I'd like to talk about.
First explaining of my pow (can't tell how much each point is relevant)
Box with Debian, Intel PII*2 old and fancy:), ADSL link with dyn IP,
some servers (f. ex. squid), loc net with dhcp, (although IP statically given by
MAC); MASQ.
Such circumstances made me make a script which involves:
-recalculation in each ppp up/down (dynamic IP)
-filter rules/link sharing depending on list of local hosts (also used by
dhcp)
-sharing bandwidth with traffic to/generated by server box
So we've got imq (from http://pupa.da.ru/- simple and stable as far as I'm
using it) for download sharing and shaping,
also 'iptables PREROUTING MARK' and 'tc filter fw' for do the same for upload (am I right that u32 can't do it?);
else is done with HTB and u32.
Each host has its own (including the router- mentioned above) HTB parent class where fw filter puts flow,
in that class are attached interactive prio and bulk subclasses
and filters, for example:
tcaddcls parent 1:1 htb rate $(($UPLOAD/$NUM_HOSTS)) ceil $NUM_HOSTS prio 0
tcfltadd parent 1:${parent_id} prio 2 u32 \
match ip protocol 6 0xff \
match u8 0x05 0x0f at 0 \
match u16 0x0000 0xffc0 at 2 \
match u8 0x11 0xff at 33 \
flowid 1:${CL_ID}
and it works great!!! .debs for buddys created at my repository.
So what's mail for?:-)
Issues:
Yesterday I've read somewhere (don't remeber) that HTB can't have filters attached to classes except root (and leaves?). BUT IT WORKS. ???
Confused, I listed filters: all attached to 1: but with many different handles like:
filter parent 1: protocol ip pref 1 fw handle 0x1 classid 1:11
filter parent 1: protocol ip pref 2 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:11 (matches)
filter parent 1: protocol ip pref 2 u32 fh 801::802 order 2050 key ht 801 bkt 0 flowid 1:11 (matches)
Maybe provided info explains all but for me all of it works magically ;)
I'd like to know what mean above params- I understand them only intuitively now (by means of reading HOWTO chapter about hashing).
I mean: do 'tc filter show dev' listing (which part I presented) can explain how really filtering works in this situation? (a way how packets are directed into and from the classes?)
I must decrease link throughput a bit to avoid latencies.
Problem is that sometimes link is saturated at 170kbit, sometimes at 150kbit.
That ppp link is on pppoa; max throughput is correlated with packet/s ratio, as i noticed (using iptraf). Am I right? How to deal with it?
Using #ifconfig $iface txqueulen $n affects latency. What else (for e. dropping)? How to choose best value?
Furthermore, couple of days ago I wondered about HFSC. I've collected infos and 'stuff' (it's messy; I still have questions, not with hfsc idea itself though; I've read all of trash.net and proposed places, BSD altq man- which hfsc differs I guess and some discussions here from archives).
The same 'trick' with filters as in HTB doesn't working.
Creating more hfsc qdiscs, directing packets to them with fw filter, and directing back to classes at root with u32 doesn't working neither.
(well, I'm not absolutely sure, I haven't played much).
I've been compiling iproute-ss040702 and it haven't done well.
Some compilation errors at atm.h, l:235 with 'void __user'.
Using kernel-headers-2.6.7-1-686-smp.
Such made tc binary print deranged 'tc show class' but seems working well.
It's got problems with hfsc too- anyone can tell me does that iproute version work well with hfsc? (supposing correct compilation) Does it have patch from trash.net?
it would be lovely to have some help :-)
Krzysiek, kyf@xxxxxxxxx _______________________________________________ LARTC mailing list / LARTC@xxxxxxxxxxxxxxx http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/