All of lore.kernel.org
 help / color / mirror / Atom feed
From: jake@lucidpark.net (Jacob Elder)
To: lartc@vger.kernel.org
Subject: [LARTC] Cookbook Question
Date: Tue, 16 Apr 2002 03:30:44 +0000	[thread overview]
Message-ID: <marc-lartc-101892789103648@msgid-missing> (raw)

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/

                 reply	other threads:[~2002-04-16  3:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-101892789103648@msgid-missing \
    --to=jake@lucidpark.net \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.