Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: Christian Parpart <cparpart@surakware.net>
To: lartc@vger.kernel.org
Subject: [LARTC] iptables marked packets want's to be queued.
Date: Mon, 15 Apr 2002 08:43:32 +0000	[thread overview]
Message-ID: <marc-lartc-101886075504631@msgid-missing> (raw)

Hi all,

that is yet another problem I can't solve.
I want to use the iptables to match the packets to be queued but do not know 
how to tell my tc queues wich marked packages to use.

EXAMPLE: 

ppp0 with (768Kbit downstream and 128Kbit upstream)
the privileges local port 27005 should get 512/96

# the marked packets below shall be privileged.
$IPTABLES -t mangle -A PREROUTING -o ppp0 -p udp --sport 27005 \
          -j MARK --set-mark 21
$IPTABLES -t mangle -A POSTROUTING -i ppp0 -p udp --dport 27005 \
          -j MARK --set-mark 22
# the other packets may get the remaining bandwidth

# attach cbq to device ppp0 with handle 1: (1:0 ?)
$TC qdisc add dev ppp0 root handle 1: cbq bandwidth 768Kbit avpkt mpu 64

# create the root class (1:1)
$TC class add dev ppp0 parent 1:0 classid :1 est 1sec 4sec cbq \
    bandwidth 768Kbit rate 768Kbit

# create class A (privileged 1:10)
$TC class add dev ppp0 parent 1:1 classid 1:10 est 1sec 4sec cbq \
    bandwidth 768Kbit rate 512Kbit allot 1514 maxburst 50 avpkt 1000

$TC qdisc add dev ppp0 parent 1:10 sfq quantum 1514b perturb 15

# create class B (the remaining 1:20)
$TC class add dev ppp0 parent 1:1 class 1:20 est 1sec 4sec cbq \
    bandwidth 768Kbit rate 256Kbit allot 1514 maxburst 50 avpkt 1000

$TC qdisc add dev ppp0 parent 1:20 sfq quantum 1514b perturb 15

END EXAMPLE.

So. But how do I tell TC to use the iptables marked packets to queue?

Many many thanks,
Christian.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

             reply	other threads:[~2002-04-15  8:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-15  8:43 Christian Parpart [this message]
2002-04-15  9:02 ` [LARTC] iptables marked packets want's to be queued Stef Coene
2002-04-15  9:03 ` Stef Coene
2002-04-15 10:27 ` Christian Parpart

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-101886075504631@msgid-missing \
    --to=cparpart@surakware.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox