On Mon, 11 Jul 2005, gypsy wrote:
My needs is limiting the outbound traffic of an smtp mail server.
It is connected to a gateway via 100Mbit ethernet. I want limits its
outbound traffic to max 3 Mbit.
HTB:
tc qdisc add dev $DEV root handle 1: htb default 20
Create the root and set the default for traffic to filter/class "20".
Needed (filter/class "20")?
tc class add dev $DEV parent 1: classid 1:1 htb rate 3000kbit burst 6k
Create the class 1:1, set maximum rate to 3mbit. Can be useful increase
the 6k burst?
tc class add dev $DEV parent 1:1 classid 1:20 htb rate 3000kbit \
burst 6k quantum 1500 prio 1
??? what do the "quantum 1500" part?
tc filter add dev $DEV parent 1: protocol ip prio 5 u32 \
match ip sport 25 0xffff flowid 1:20
Create a filter for smtp traffic?
Why "sport 25"?
I am interested in outgoing traffic.
This box receive the outgoing mails from other internal servers and
do the delivery. No other activity/traff.
So can be useful that it receive traffic from local server at full speed,
but delivery it at limited rate (the problem is mailing list users that
sometime distribuite big mail (0.5-2 MB) to 1.000-3.000 subscribers
causing peak that ... :-(
Really I am thinking to use it to shape the total traffic from a server
with no differentiation on services (so I can use it in mail or httpd
server ...).
Regards, B.
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc