Hello,
Thanks for your reply.
Quote:
Originally posted by frostschutz
Well, you'll need (at least) two classes per user, one for local, and one for generic traffic. If you want to impose a limit on both (e.g. user is only allowed to take 500kbit in total, not 500 local + 128 generic = 628kbit), you'll have to add a parent class, so the local class and generic class can borrow from each other (distribute load).
|
Yes it should be like: 500 local + 128 generic = 628kbit
Quote:
This does not look right. Just because you add a rule in Postrouting, doesn't mean it's download, same for Prerouting and upload. Go to www.docum.org and have a look at the KPTD.
|
thanks, I'll do. but after researching during these days it made me understand those classes, and those "parrent" and what do they do. I also found one script which I'm *rewriting* at the moment...
Quote:
So I take it that you're talking about a standalone machine, not a router? The above iptables rules make even less sense then.
|
Soz for not writing at the beggining, it is a router running NAT and supposed to shape a traffic for:
LAN_nets (are the PC in the LAN (here users are connected to 100mbit link)
local_nets (which means these IP subnets are in my country)
and all other (mean any other IP space not matching those above.
Quote:
Looks like a router after all. Why else need two eth devices? You don't need IMQ in this case - you can shape upload on eth1 and download on eth0. (Can't shape download for the local machine this way then, though).
|
thanks for clearing this up. but if I wanna make different pipes to lan? or I just need 3rd class here?
btw, on the internet there are lots of examples like :
-j IMQ --todev 0
-j IMQ --todev 1
and so on...
what if I for example do shaping like:
LAN_nets download --todev 0
LAN_nets upload --todev 1
local_nets download --todev 2
local_nets upload --todev 3
0/0 download --todev 4
0/0 upload --todev 5
and do shaping on those IMQ devices?
Or even with those LAN, LOCAL and 0/0 nets it is possible with only eth0, eth1 and with 3 classes per user?
Quote:
There aren't many examples around for network differenciation.
|
seems so..
Quote:
I only have one script, for setting up shaping on a router for LAN clients, you can check it out here: http://www.metamorpher.de/fairnat/ - it's one of the most complicated bash scripts I've ever written. The commands aren't very easy to copy though, because the rates and everything actually gets calculated by the script and passed to bash functions as parameters.
|
so You're the author of this script?
grats

It'll be good to have as an example and copy some strings.
I also recompile kernel with:
Code:
In linux/net/sched/sch_htb.c, change
#define HTB_HYSTERESIS 1
to
#define HTB_HYSTERESIS 0
It's supposed to improve accuracy at loss of speed.
In linux/net/sched/sch_sfq.c, change
#define SFQ_DEPTH 128
to
#define SFQ_DEPTH 16
Btw, what hardware do I need for such job?
(CPU/RAM)
There will be ~300 users (some are NAT'ed some just routed (they get PUBLIC IP)
Thanks once again for sharing your knowledge.
Jarek