All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom <ml@b2f-tom.dnsalias.org>
To: lartc@vger.kernel.org
Subject: [LARTC] Packets Redirection
Date: Thu, 24 Oct 2002 06:22:21 +0000	[thread overview]
Message-ID: <marc-lartc-103544064405271@msgid-missing> (raw)

Hi all,

I use a Debian Woody with Kernel 2.4.18 patched with the HTB queue. I use 
the tc binay given within the HTB targz. Iptables 1.2.6a
I wrote this script based on the ADSL Bandwith management howto :

DEV=eth0
RATEUP\x128

tc qdisc add dev $DEV root handle 1: htb default 22
tc class add dev $DEV parent 1: classid 1:1 htb rate ${RATEUP}kbit
tc class add dev $DEV parent 1:1 classid 1:20 htb rate $[$RATEUP/7]kbit 
ceil ${RATEUP}kbit prio 0
tc class add dev $DEV parent 1:1 classid 1:21 htb rate $[$RATEUP/7]kbit 
ceil 88kbit prio 1
tc class add dev $DEV parent 1:1 classid 1:22 htb rate $[$RATEUP/7]kbit 
ceil 88kbit prio 2

tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10
tc qdisc add dev $DEV parent 1:21 handle 21: sfq perturb 10
tc qdisc add dev $DEV parent 1:22 handle 22: sfq perturb 10
tc filter add dev $DEV parent 1:0 prio 0 protocol ip handle 20 fw flowid 1:20
tc filter add dev $DEV parent 1:0 prio 0 protocol ip handle 21 fw flowid 1:21
tc filter add dev $DEV parent 1:0 prio 0 protocol ip handle 22 fw flowid 1:22

iptables -t mangle -N MYSHAPER-OUT
iptables -t mangle -I POSTROUTING -o $DEV -j MYSHAPER-OUT
iptables -t mangle -A MYSHAPER-OUT -p tcp --dport 20 -j MARK --set-mark 22
iptables -t mangle -A MYSHAPER-OUT -p icmp -j MARK --set-mark 20
iptables -t mangle -A MYSHAPER-OUT -p udp -j MARK --set-mark 21

I transfered a file by ftp. The packets was sent through the class 22 and 
its bandwith limited to 88kbits, which is normal. But i sent pings and 
thoose packets were sent through the class 22 too which is not normal due 
to the mangle packets marking.
I know which class was used by looking the tc classes status. Why icmp 
packets was not sent through class 20 ?

Any help would be appriciated. Thanks and have a nice day.



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

             reply	other threads:[~2002-10-24  6:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-24  6:22 Tom [this message]
2002-10-24  8:43 ` [LARTC] Packets Redirection Walter Haidinger
2002-10-24 11:17 ` Stef Coene
2002-10-24 11:27 ` Tom
2002-10-24 11:37 ` Stef Coene

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-103544064405271@msgid-missing \
    --to=ml@b2f-tom.dnsalias.org \
    --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.