All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] iptables marked packets and TC
@ 2002-05-15 17:03 Chris Ellsworth
  2002-05-16 17:52 ` Chris Ellsworth
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Ellsworth @ 2002-05-15 17:03 UTC (permalink / raw)
  To: lartc

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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [LARTC] iptables marked packets and TC
  2002-05-15 17:03 [LARTC] iptables marked packets and TC Chris Ellsworth
@ 2002-05-16 17:52 ` Chris Ellsworth
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Ellsworth @ 2002-05-16 17:52 UTC (permalink / raw)
  To: lartc

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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-05-16 17:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-15 17:03 [LARTC] iptables marked packets and TC Chris Ellsworth
2002-05-16 17:52 ` Chris Ellsworth

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.