* tc and traffic established,related
@ 2009-07-21 15:13 Fabio Marcone
2009-07-21 15:18 ` Pascal Hambourg
0 siblings, 1 reply; 3+ messages in thread
From: Fabio Marcone @ 2009-07-21 15:13 UTC (permalink / raw)
To: netfilter
Hi!
I'm studying traffic shaping and I have some doubts...
I have a linux router and I mark packets from lan to wan and I use a tc
class to limit datarate (selecting packets by mark).
but how can I recognize answer packets? How can I know is a packet is
about a connection previously established?
If I succeed I can limit upload and download rate of a particular
connection...
Thanks in advance,
Fabio
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: tc and traffic established,related
2009-07-21 15:13 tc and traffic established,related Fabio Marcone
@ 2009-07-21 15:18 ` Pascal Hambourg
2009-07-21 15:48 ` Julien Vehent
0 siblings, 1 reply; 3+ messages in thread
From: Pascal Hambourg @ 2009-07-21 15:18 UTC (permalink / raw)
To: netfilter
Hello,
Fabio Marcone a écrit :
>
> I have a linux router and I mark packets from lan to wan and I use a tc
> class to limit datarate (selecting packets by mark).
> but how can I recognize answer packets? How can I know is a packet is
> about a connection previously established?
See the CONNMARK target and the connmark match.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: tc and traffic established,related
2009-07-21 15:18 ` Pascal Hambourg
@ 2009-07-21 15:48 ` Julien Vehent
0 siblings, 0 replies; 3+ messages in thread
From: Julien Vehent @ 2009-07-21 15:48 UTC (permalink / raw)
To: netfilter
On Tue, 21 Jul 2009 17:18:37 +0200, Pascal Hambourg
<pascal.mail@plouf.fr.eu.org> wrote:
> Hello,
>
> Fabio Marcone a écrit :
>>
>> I have a linux router and I mark packets from lan to wan and I use a tc
>> class to limit datarate (selecting packets by mark).
>> but how can I recognize answer packets? How can I know is a packet is
>> about a connection previously established?
>
> See the CONNMARK target and the connmark match.
>
>
When you mark a packet, you can propagate this mark to the connexion the
packet is from using the rule:
iptables -t mangle -A OUTPUT -j CONNMARK --restore-mark
And then, the mark will appear in /proc/net/ip_conntrack and all the
packets of this connexion will be marked.
--
julien
http://jve.linuxwall.info/blog
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-21 15:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-21 15:13 tc and traffic established,related Fabio Marcone
2009-07-21 15:18 ` Pascal Hambourg
2009-07-21 15:48 ` Julien Vehent
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox