Unexpected log output..

Maciej Soltysiak solt@dns.toxicfilms.tv
Thu, 6 Dec 2001 08:55:33 +0100 (CET)


> > TOS=0x00
>
> Type of service
>
>
> > PREC=0x00
>
> I don't know
Maybe PREC stands for Precedence,
AFAIK the TOS Byte consists of 3 fields:
- The Precedence Bits [3bits]
- The TOS Value (the actual value we often refer to) [4bits]
- Must Be Zero [1bit], and really it is the RFC MUST.


it looks like this:

...aaabbbbc...
where a bits are PREC
where b bits are TOS
where c bit is MBZ

Precedence bits are used by routers as an extension to TOS,
eg. the packets with 11010000 are likely to be handled before a packet
with
00010000 (where 1000 stands of course for minimize delay)
I have read that Precedence Bits were for military use only,
but hey, linux sends its icmp with PREC set to 110, and TOS to 1000
so the total value for icmp on linux is:
11010000 (bin) = 0xc0 (hex) = 208 (dec)

Many routers also set PREC bits to 5 or 6 (101... or 110...) to let the
messages and error reporting go smoother.

Heh, i did not want to make a lecture on this, but it happend... :)
Anyway, hope it make sense.

Best Regards,
Maciej Soltysiak