Skip to contentSkip to conversation

tc / MARK question

LARTC Christian Benvenuti 1 participant 1 message Apr 6, 2007

lore
Share & tools
lore
#0 lore raw

Hi Dan,

Quoted 15 lines

Hi,

I have a router, running iptables & tc, with 2 interfaces (eth0 & eth1).

I classify http traffic in iptables (prerouting mangle) coming in on eth0 and going out on eth1 with MARK 0x1, and I also classify return http traffic coming from eth1 -> eth0 with MARK 0x1 as well. I then ACCEPT them in the filter/FORWARD chain based on --mark 0x1.

However, I want to shape this traffic, and limit based on the 0x1 MARK. I want to limit traffic to 4MBit outgoing on eth1 (incoming http), and 4MBit outgoing on eth0 (return http), *independently*, even though they use the same MARK.

Quoted 6 lines

If I use HTB, assigned to egress eth0 and another assigned to eth1, and classify packets based on the MARK 0x1 (from above this is two tcp streams in different connections under the same mark), does tc:

a) Treat the interfaces separately, giving me 4MBit either way independently

This is the correct answer.
Traffic Control is applied to each interface independently. Didn't you notice that when you configure a qdisc/class/filter you must always specify the interface name ? :)
The fact that you use the same MARK in both directions has no influence at all on the queueing.

Quoted 2 lines

b) Treat the interfaces as one (because one MARK is being used), and give me 4MBit total across both streams?

Regards
/Christian
[http://benve.info]

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc