From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arthur van Leeuwen arthurvl@sci.kun.nl Date: Fri, 02 Feb 2001 18:08:26 +0000 Subject: [LARTC] Re: iptables and DSCP Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org
On Fri, 2 Feb 2001, Pavarani Giovanna wrote:

> Talking about DSCP field...
>
> iptables is said to provide all the features of ipchains and something more and
> better organized, but with ipchains I was able to set all the DSCP values
> in the TOS field, with iptables it seems this is no more possible, only few
> values are permitted.
>
> For example:
>
> > iptables -t mangle -A PREROUTING  -s 10.0.0.2 -j TOS --set-tos 0xb8
>
> gives me:
>
> iptables v1.1.2:Bad TOS value '0xb8'
>
> Am I doing something wrong?

Yes. You need to specify two values, one and-mask and one or-mask, IIRC.
The new value will be the old value anded with your and-mask and then or-ed
with your or-mask.

Doei, Arthur.

-- 
  /\    / |      arthurvl@sci.kun.nl      | Work like you don't need the money
 /__\  /  | A friend is someone with whom | Love like you have never been hurt
/    \/__ | you can dare to be yourself   | Dance like there's nobody watching