From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kurt Wagner kwagner@cosy.sbg.ac.at Date: Thu, 15 Feb 2001 14:40:10 +0000 Subject: [LARTC] ip route - TOS argument does not allways work Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org
hi all,

I need different routes for packets with different TOS values, and tried
to do this with ip. I noticed that ip does not recognice all possible
values for the TOS byte, even when I enter them in
/etc/iproute/rt_dsfield.


to demonstrate this, I added prohibit rules for different marked packets
and tried if the packets are dropped when I try to "ping -Q tosvalue
<somehost>":


#: ip route add prohibit default tos 0xb8
#: ip route add prohibit default tos 0x11  
#: ip route add prohibit default tos 0x10 
#: ip route add prohibit default tos 0x02 

#: ip route
<some rules snipped>
prohibit default tos high 
prohibit default tos test 
prohibit default tos lowdelay 
prohibit default tos mincost
default via 192.168.10.1 dev eth0 

#: cat /etc/iproute2/rt_dsfield 
0x11    test
0xb8    high
0xbc    video
0xe0    burstplan
0x10    lowdelay
0x08    throughput
0x04    reliability
0x02    mincost 

so ip look at rt_dsfield and enters the names not the values, that's
fine. but...

#: ping -Q 0xb8 192.168.10.1
PING 192.168.10.1 (192.168.10.1) from 192.168.10.2 : 56(84) bytes of data.
64 bytes from 192.168.10.1: icmp_seq=0 ttl%4 time=1.919 msec

#: ping -Q 0x11 192.168.10.1
connect: Network is unreachable

#: ping -Q 0x10 192.168.10.1
connect: Network is unreachable

#: ping -Q 0x02 192.168.10.1
PING 192.168.10.1 (192.168.10.1) from 192.168.10.2 : 56(84) bytes of data.
64 bytes from 141.201.123.33: icmp_seq=0 ttl%4 time=1.793 msec


so it works for tos=0x10 and 0x11, but not for tos=0xb8 and 0x02.

it is possible to construct more examples which work, or don't work, but I
see no pattern or reason for this strange behavior.



any hints? ideas?


Kurt