BYTETOOLS

DSCP to ToS Converter

Convert between DSCP values, the legacy ToS byte, IP Precedence and PHB names like EF, AF31 and CS5, in decimal, hex and binary side by side.

EF
PHB name
46
DSCP
184
ToS / DS byte
5
IP Precedence

Every representation of this marking

FieldDecimalHexBinary
DSCP (6 bits)460x2E101110
ToS / DS byte (8 bits)1840xB810111000
IP Precedence (3 bits)50x5101
ECN (2 bits)00x000

EFExpedited Forwarding — VoIP bearer traffic (RFC 3246). IP Precedence 5 is “CRITIC/ECP”.

The ToS byte is simply DSCP × 4 plus the two ECN bits, because DSCP occupies the top six bits of the same octet. Legacy set ip tos commands take the byte value; modern set dscp takes the 6-bit value or the name.

Standard per-hop behaviours

NameDSCPBinaryToSHexPrec.Typical use
CS0 / DF000000000x000Default forwarding — best effort
CS18001000320x201Scavenger / lower-than-best-effort bulk
AF1110001010400x281High-throughput data, low drop precedence
AF1212001100480x301High-throughput data, medium drop precedence
AF1314001110560x381High-throughput data, high drop precedence
CS216010000640x402OAM / network management
AF2118010010720x482Low-latency transactional data, low drop
AF2220010100800x502Low-latency transactional data, medium drop
AF2322010110880x582Low-latency transactional data, high drop
CS324011000960x603Call signalling (SIP, H.323, SCCP)
AF31260110101040x683Multimedia streaming, low drop
AF32280111001120x703Multimedia streaming, medium drop
AF33300111101200x783Multimedia streaming, high drop
CS4321000001280x804Real-time interactive video
AF41341000101360x884Multimedia conferencing, low drop
AF42361001001440x904Multimedia conferencing, medium drop
AF43381001101520x984Multimedia conferencing, high drop
CS5401010001600xA05Broadcast video
VA441011001760xB05Voice-Admit — capacity-admitted voice
EF461011101840xB85Expedited Forwarding — VoIP bearer traffic
CS6481100001920xC06Network control (routing protocols)
CS7561110002240xE07Reserved for network control

What is the DSCP to ToS Converter?

QoS markings get written four different ways depending on which command you are reading, and this converter lines all of them up.

  • Converts in four directions: DSCP, PHB name, ToS byte and IP Precedence
  • Every field shown in decimal, hexadecimal and binary at the same time
  • Full CS0–CS7, AF11–AF43, EF and VA table with typical uses and source RFCs
  • ECN bits handled separately, so the full DS octet is always correct
  • Copyable plain-text summary including the Cisco set dscp and set ip tos forms
  • Reference table highlights the marking you entered — all computed locally

How to use the DSCP to ToS Converter

  1. 1

    Choose what you are converting from: a DSCP value, a PHB name, a ToS byte or an IP Precedence level.

  2. 2

    Type the value — names like EF, AF31, CS5, VA and DF all work, and ToS accepts 184 or 0xB8.

  3. 3

    Pick the ECN bits if you care about the full octet; they are read from the byte automatically in ToS mode.

  4. 4

    Read the four-row table for decimal, hex and binary of DSCP, the ToS byte, IP Precedence and ECN.

  5. 5

    Scroll to the standard PHB table to compare your marking against the whole set.

About the DSCP to ToS Converter

QoS markings get written four different ways depending on which command you are reading, and this converter lines all of them up. Enter a DSCP value, a per-hop-behaviour name such as EF or AF31, a ToS byte in decimal or hex, or an IP Precedence level, and you get every other representation in decimal, hexadecimal and binary at once.

The relationship is simple once you see it: DSCP occupies the top six bits of the same octet the old ToS byte used, so the ToS value is just DSCP × 4, plus the two ECN bits in the bottom. IP Precedence is the top three bits, which is DSCP shifted right by three. EF, DSCP 46, is therefore ToS 184 — the 0xB8 you see in packet captures.

A full table of the standard per-hop behaviours from RFC 2474, 2597, 3246 and 5865 sits underneath, listing each name with its DSCP, binary, ToS, hex, precedence and typical use, and highlighting the marking you entered. It is meant for lining up a Cisco set dscp command against a legacy set ip tos value, or against what you actually see in a capture. Everything is computed locally in your browser and nothing is uploaded.

Frequently asked questions

How do I convert DSCP to a ToS value?

Multiply the DSCP value by 4. DSCP is the top six bits of the same byte the old ToS field used, so shifting left by two positions gives the byte value. DSCP 46 (EF) becomes ToS 184, which is 0xB8 in hex.

What DSCP value is EF?

EF, Expedited Forwarding, is DSCP 46 — binary 101110. It maps to ToS byte 184 (0xB8) and IP Precedence 5. It is the standard marking for VoIP bearer traffic, which needs low latency and low jitter above all else.

What do the AF class numbers mean?

In AFxy, x is the class from 1 to 4 and y is the drop precedence from 1 to 3. The DSCP value is 8x + 2y, so AF31 is 26 and AF43 is 38. Higher classes get better forwarding; higher drop precedence gets discarded first when a queue fills.

Is IP Precedence the same as DSCP?

Not quite. IP Precedence is the old three-bit field, and DSCP extended it to six bits in the same octet. The top three bits still line up, so DSCP 40 (CS5) is IP Precedence 5 — which is why the class selector code points exist at all: they are backward compatible with precedence.

What are the ECN bits and do they affect the DSCP?

The two lowest bits of the DS octet carry Explicit Congestion Notification, which routers use to signal congestion without dropping packets. They are separate from DSCP, but they are part of the same byte — which is why a ToS value read off the wire may not be an exact multiple of four.

Which DSCP should I use for voice and video?

The common convention is EF (46) for voice payload, CS3 (24) for call signalling, AF41 (34) for interactive video and CS6 (48) for network control. Those are defaults, not law — check what your carrier honours, because many remark or ignore markings at the edge.

Related tools