From: Joe Buehler <aspam@cox.net>
To: Mikael Abrahamsson <swmike@swm.pp.se>
Cc: Stephen Hemminger <shemminger@vyatta.com>,
Eric Dumazet <eric.dumazet@gmail.com>,
netdev@vger.kernel.org
Subject: Re: DSCP values in TCP handshake
Date: Mon, 18 Apr 2011 15:01:30 -0400 [thread overview]
Message-ID: <4DAC8A8A.1010401@cox.net> (raw)
In-Reply-To: <alpine.DEB.2.00.1104181750150.14027@uplift.swm.pp.se>
> <http://tools.ietf.org/html/rfc2873> says this is ok, but I would like
> default to be that if incoming SYN has a certain DSCP value, the SYN+ACK
> should mirror this value if the application doesn't explicitly set
> anything else.
>
> I was under the impression that mirroring was done historically, but
> this has changed? Looking at how my apache server is behaving in 2.6.32,
> it seems it uses 0x0 for the whole TOS byte by default. I send it 0x20
> and it responds with 0x0. SSH does the same thing.
In my case I just need the SYN-ACK to reflect the incoming SYN. To get
it I am going to use iptables like so (barring bugs on my part -- still
testing this...):
iptables -t mangle -A PREROUTING -m tcp -p tcp --tcp-flags SYN,RST,ACK
SYN -m dscp --dscp 0 -j CONNMARK --set-mark 0
iptables -t mangle -A POSTROUTING -m tcp -p tcp --tcp-flags SYN,RST,ACK
SYN,ACK -m connmark --mark 0 -j DSCP --set-dscp 0
(repeat for the other 63 values of DSCP...)
The argument I have seen for not making reflection standard behavior is
that it is not always appropriate for the application. For example, web
servers have short requests but large responses so non-identical DSCP
values might make more sense.
Thanks for all the replies.
Joe Buehler
next prev parent reply other threads:[~2011-04-18 19:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-18 13:48 DSCP values in TCP handshake Joe Buehler
2011-04-18 14:05 ` Eric Dumazet
2011-04-18 15:38 ` Stephen Hemminger
2011-04-18 15:57 ` Mikael Abrahamsson
2011-04-18 19:01 ` Joe Buehler [this message]
2011-04-18 19:16 ` Mikael Abrahamsson
2011-04-18 21:49 ` Stephen Hemminger
2011-04-19 3:50 ` Mikael Abrahamsson
2011-04-19 4:16 ` Stephen Hemminger
2011-04-19 4:28 ` Mikael Abrahamsson
2011-04-19 15:09 ` Matt Mathis
2011-04-19 17:38 ` Mikael Abrahamsson
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=4DAC8A8A.1010401@cox.net \
--to=aspam@cox.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
--cc=swmike@swm.pp.se \
/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;
as well as URLs for NNTP newsgroup(s).