From: "Chris Ellsworth" <cke@highlandshighspeed.net>
To: lartc@vger.kernel.org
Subject: [LARTC] iptables marked packets and TC
Date: Thu, 16 May 2002 17:52:27 +0000 [thread overview]
Message-ID: <marc-lartc-102157161302369@msgid-missing> (raw)
In-Reply-To: <marc-lartc-102148377429133@msgid-missing>
I have been trying to shape the traffice on a bridge i have iptables
succesfully marking packes but have not been able to get TC to read
the marked packets from Iptables and filter them into CBQ my current
config is as follows
tcclass_add="tc class add dev brint_ext parent 1: classid"
tcclass_rate="cbq allot 1514 avpkt 1000 bounded isolated
rate"
tcclass_end=""
tc qdisc add dev brint_ext root handle 1: cbq bandwidth 192kbps avpkt
1000
$tcclass_add 1:1 $tcclass_rate 10kbps
$tcclass_add 1:2 $tcclass_rate 10kbps
$tcclass_add 1:3 $tcclass_rate 20kbps
$tcclass_add 1:4 $tcclass_rate 20kbps
$tcclass_add 1:5 $tcclass_rate 30kbps
$tcclass_add 1:6 $tcclass_rate 30kbps
iptables -t mangle -N SHAPE
# iptables -t mangle -A PREROUTING -j QUEUE
iptables -t mangle -A PREROUTING -s 65.215.218.0/24 -j SHAPE
iptables -t mangle -A PREROUTING -d 65.215.218.0/24 -j SHAPE
iptables -t mangle -A PREROUTING -s 192.168.1.0/24 -j SHAPE
iptables -t mangle -A PREROUTING -d 192.168.1.0/24 -j SHAPE
iptables_src="iptables -t mangle -A SHAPE -s"
iptables_dst="iptables -t mangle -A SHAPE -d"
iptables_end="-j MARK --set-mark"
$iptables_src 65.215.218.49 $iptables_end 1
$iptables_dst 65.215.218.49 $iptables_end 2
$iptables_src 65.215.218.50 $iptables_end 3
$iptables_dst 65.215.218.50 $iptables_end 4
$iptables_src 65.215.218.51 $iptables_end 5
$iptables_dst 65.215.218.51 $iptables_end 6
tcf_add="tc filter add dev brint_ext protocol ip parent 1:0"
tcf_add2="prio 1 u32 match ip"
$tcf_add $tcf_add2 src 65.215.218.49 flowid 1:1
$tcf_add $tcf_add2 dst 65.215.218.49 flowid 1:2
# tcf_add="tc filter add dev brint_ext parent"
# tcf_2nd="protocol ip prio 1 handle"
# tcf_3rd="fw flowid"
# $tcf_add 1:0 $tcf_2nd 1 $tcf_3rd 1:1
# $tcf_add 1:0 $tcf_2nd 2 $tcf_3rd 1:2
# $tcf_add 1:0 $tcf_2nd 3 $tcf_3rd 1:3
# $tcf_add 1:0 $tcf_2nd 4 $tcf_3rd 1:4
# $tcf_add 1:0 $tcf_2nd 5 $tcf_3rd 1:5
# $tcf_add 1:0 $tcf_2nd 6 $tcf_3rd 1:6
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
prev parent reply other threads:[~2002-05-16 17:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-15 17:03 [LARTC] iptables marked packets and TC Chris Ellsworth
2002-05-16 17:52 ` Chris Ellsworth [this message]
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-102157161302369@msgid-missing \
--to=cke@highlandshighspeed.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.