From: Stephen Hemminger <shemminger@vyatta.com>
To: thomas yang <lampsu@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [iproute2] a 'ip rule ...' bug?
Date: Mon, 29 Mar 2010 19:42:14 -0700 [thread overview]
Message-ID: <20100329194214.3ea61b67@s6510> (raw)
In-Reply-To: <f4f837ab1003260515y54f0db76vc19c966f39e1d3a1@mail.gmail.com>
On Fri, 26 Mar 2010 20:15:30 +0800
thomas yang <lampsu@gmail.com> wrote:
> in /etc/iproute2/rt_dsfield
> ...
> # Newer RFC2597 values
> 0x28 AF11
> 0x30 AF12
> 0x38 AF13
> ...
> ---in ip man page ---
> ip rule add - insert a new rule
>
> tos TOS
> dsfield TOS
> select the TOS value to match.
> ---
Read the syntax on the man page:
ip rule [ list | add | del | flush ] SELECTOR ACTION
SELECTOR := [ from PREFIX ] [ to PREFIX ] [ tos TOS ] [ fwmark
FWMARK[/MASK] ] [ dev STRING ] [ pref NUMBER ]
There is no mention of dsfield argument.
>
> [root@localhost ~]# ip rule add dsfield 0x28 table 200
> Error: argument "dsfield" is wrong: Failed to parse rule type
>
> why???
> how to match 'dsfield' ?
>
> [root@localhost ~]# ip rule add tos 0x28 table 200
> RTNETLINK answers: Invalid argument
>
> (My OS is Fedora 11 : kernel-2.6.30.10-105.2.23.fc11.i586 ,
> iproute-2.6.29-2.fc11.i586 ;
> on my another linux box ( Fedora 7) 'ip rule' also has the same
> problem to match tos and dsfield. )
TOS field is masked by down to only 2 bits.
See include/net/route.h in kernel source.
I think the reason was that with original TOS (pre dsfield) route design,
the implementors wanted to save space.
prev parent reply other threads:[~2010-03-30 2:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-26 12:15 [iproute2] a 'ip rule ...' bug? thomas yang
2010-03-30 2:42 ` Stephen Hemminger [this message]
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=20100329194214.3ea61b67@s6510 \
--to=shemminger@vyatta.com \
--cc=lampsu@gmail.com \
--cc=netdev@vger.kernel.org \
/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).