All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Cookbook Question
@ 2002-04-16  3:30 Jacob Elder
  0 siblings, 0 replies; only message in thread
From: Jacob Elder @ 2002-04-16  3:30 UTC (permalink / raw)
  To: lartc

I'm tryting to prioritize interactive traffic, working from cookbook section
15.4. I have inserted the requisite chains:

iptables -A PREROUTING -t mangle -p tcp --dport telnet -j TOS --set-tos Minimize-Delay
iptables -A PREROUTING -t mangle -p tcp --dport ftp  -j TOS --set-tos Minimize-Delay
iptables -A PREROUTING -t mangle -p tcp --dport ftp-data -j TOS --set-tos Maximize-Throughput
iptables -A PREROUTING -t mangle -p tcp --dport smtp -j TOS --set-tos Minimize-Cost
iptables -A OUTPUT -t mangle -p tcp --dport telnet -j TOS --set-tos Minimize-Delay
iptables -A OUTPUT -t mangle -p tcp --dport ftp  -j TOS --set-tos Minimize-Delay
iptables -A OUTPUT -t mangle -p tcp --dport ftp-data -j TOS --set-tos Maximize-Throughput
iptables -A OUTPUT -t mangle -p tcp --dport smtp -j TOS --set-tos Minimize-Cost

Simple enough, right?

Now to see if it's working, I adapt another example from section 9.5.3.2 of
the HOWTO, sample configuration for the PRIO qdisc.

tc qdisc add dev ppp0 root handle 1: prio 
tc qdisc add dev ppp0 parent 1:1 handle 10: sfq perturb 5
tc qdisc add dev ppp0 parent 1:2 handle 20: sfq perturb 5
tc qdisc add dev ppp0 parent 1:3 handle 30: sfq perturb 5

No matter what I do, the only counter that ever gets incremented is 20:, and
I can verify with tcpdump that the ToS bits are being set. This is the
result of sending a short email message:

# tc -s qdisc show dev ppp0
qdisc sfq 30: quantum 1514b perturb 5sec 
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0) 

qdisc sfq 20: quantum 1514b perturb 5sec 
 Sent 1514 bytes 20 pkts (dropped 0, overlimits 0) 

qdisc sfq 10: quantum 1514b perturb 5sec 
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0) 

qdisc prio 1: bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
 Sent 1514 bytes 20 pkts (dropped 0, overlimits 0) 

With the chains I'm using, the smtp session should have gone to 30:, right?

I'm running iptables v1.2.6a, iproute 20010824, and linux 2.4.17. Please
help me figure out what I'm doing wrong.

-- 
Jacob Elder
http://www.lucidpark.net/

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-04-16  3:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-16  3:30 [LARTC] Cookbook Question Jacob Elder

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.