[c-nsp] TOS byte map to DSCP or precedence?

Tim Franklin tim at colt.net
Thu Aug 26 11:14:30 EDT 2004


cisco-nsp-bounces at puck.nether.net wrote:
> Is there a direct mapping of the TOS byte to DSCP?  DSCP is
> contained as part
> of the TOS byte according to all of the documentation, but I
> can't find a way
> to translate, say, a TOS byte of 150 to a DSCP (or even
> precedence).  Does
> anyone know if this is possible?

Yes.  Precedence / TOS fills the byte as:

P2 P1 P0 T3 T2 T1 T0 U

where P2-P0 are precedence, T3-T0 are ToS, and U is unused.

DSCP fills the byte as:

D5 D4 D3 D2 D1 D0 U U

where D5-D0 are DSCP and U is unused.

So you can map between the two by converting the bit-patterns, eg TOS byte
of 150 is 10010110, or Precedence 4, ToS 1011, DSCP 100101 (this isn't
explicitly defined as a DSCP).

Regards,
Tim.

--
____________   Tim Franklin                 e: tim at colt.net
\C/\O/\L/\T/   Product Engineering Manager  w: www.colt.net
 V  V  V  V    Managed Data Services        t: +44 20 7863 5714
                                            f: +44 20 7863 5876




More information about the cisco-nsp mailing list