DSCP / ToS Decoder

Decode QoS markings.

Enter a DSCP class (EF, AF41, CS6), a DSCP value (0–63), or a ToS/DS byte in hex (0xB8) or decimal. Get the class name, DSCP bits, the full ToS byte, and IP precedence.

decode — dscp/tos
#
accepts class name, DSCP 0–63, ToS byte as decimal 0–255 or hex 0x00–0xFF
Not recognized
DSCP class
DSCP value
DSCP bits
IP precedence
ToS / DS byte (dec)
ToS / DS byte (hex)
ToS byte bits
ClassDSCPBitsToS hexTypical use
How it works

The second byte of the IPv4 header was originally the Type of Service (ToS) byte. RFC 2474 redefined its upper 6 bits as the DSCP (Differentiated Services Code Point) and the lower 2 bits as ECN. So the DSCP value occupies bits 0–5 of the DS field, and the ToS byte equals DSCP × 4 (a left shift of 2).

That's why EF (DSCP 46) shows up as ToS 0xB8, and CS6 (DSCP 48) as 0xC0 — values you'll recognize from show policy-map output and packet captures.

The class families

CS0–CS7 (Class Selector) are backward-compatible with the old 3-bit IP Precedence. AFxy (Assured Forwarding) encode a class x (1–4) and a drop precedence y (1–3). EF (Expedited Forwarding) is the low-latency class for voice. Default/BE is DSCP 0.

FAQ
Is DSCP 46 the same as EF?

Yes. EF (Expedited Forwarding) is DSCP 46, binary 101110, ToS byte 0xB8.

How does DSCP relate to IP precedence?

IP precedence is the top 3 bits of the DS field. The Class Selector code points (CS0–CS7) map one-to-one onto the eight precedence values for backward compatibility.

What about the lower 2 bits?

They carry ECN (Explicit Congestion Notification), independent of DSCP. This tool reports the DSCP and the resulting ToS byte with ECN bits as 0.