Logo

MonoCalc

/

DSCP and ToS Converter

Networking

Common DSCP Quick Reference

NameDSCPToS HexUse Case

Default (BE)

00x00Best-effort traffic

CS1

80x20Scavenger / background

AF21

180x48Business-critical data

AF31

260x68Streaming video

AF41

340x88Interactive video (conferencing)

CS5

400xA0VoIP signaling (SIP/H.323)

EF

460xB8VoIP bearer (RTP audio)

CS6

480xC0Routing protocols (OSPF, BGP)

About This Tool

DSCP and ToS Converter – Translate QoS Values Instantly

Network QoS (Quality of Service) configuration requires working with several overlapping representations of the same priority information: DSCP decimal values, ToS byte decimals, ToS hex codes, IP Precedence levels, and PHB class names such as EF, AF41, and CS3. This converter lets you enter any one format and immediately see all the others — eliminating the manual arithmetic that leads to misconfigured policy maps and ACLs.

Understanding the DS Byte

The IPv4 ToS (Type of Service) byte was redefined by RFC 2474 (1998) as the DS byte. Its 8 bits are split into two independent fields:

  • DSCP (bits 7–2): a 6-bit Differentiated Services Code Point that encodes QoS priority. Values range from 0 (best effort) to 63.
  • ECN (bits 1–0): a 2-bit Explicit Congestion Notification field added by RFC 3168. Standard traffic sets these bits to 00; ECN-capable endpoints negotiate 01 or 10.

The ToS byte therefore equals DSCP × 4 for standard (non-ECN) traffic. For example, EF has DSCP 46: 46 × 4 = 184 decimal = 0xB8 hex = 10111000 binary.

DSCP to ToS Hex Conversion Formula

The conversion is a simple left-shift: ToS = DSCP << 2. In decimal arithmetic: ToS = DSCP × 4. To go the other direction: DSCP = ToS >> 2 (integer division by 4, ignoring the lower 2 ECN bits). Applying these formulas manually for every class in a QoS policy is error-prone — this tool automates the entire translation in both directions.

IP Precedence Backward Compatibility

The original RFC 791 ToS byte included a 3-bit IP Precedence subfield occupying bits 7–5. Network equipment predating DiffServ still honors these 8 priority levels (Routine through Network Control). DSCP preserves backward compatibility through the Class Selector (CS) PHBs: CS0–CS7 equal DSCP values 0, 8, 16, 24, 32, 40, 48, and 56 respectively — each a multiple of 8, keeping the upper 3 bits identical to the old IP Precedence value.

PHB Classes and Traffic Mapping

RFC 4594 defines a standard enterprise QoS model with four PHB categories:

  • Default (DSCP 0): best-effort forwarding with no guarantees — suitable for background web browsing and bulk file transfers.
  • Assured Forwarding (AF11–AF43): twelve codepoints across four classes and three drop precedences. Used for differentiated data traffic with probabilistic loss protection under congestion.
  • Expedited Forwarding (EF, DSCP 46): strict priority with guaranteed bandwidth, minimal latency, and low jitter. The standard choice for VoIP bearer (RTP) streams.
  • Class Selectors (CS1–CS7): compatible with IP Precedence for legacy equipment. CS6 and CS7 are typically reserved for network control plane traffic (OSPF, BGP, EIGRP).

Practical Use: QoS Policy Maps

When configuring a router or switch, you may encounter QoS policy maps that use DSCP decimal values, others that use hex ToS bytes (especially in firewall ACLs), and legacy equipment that only understands IP Precedence levels. Common examples:

  • Cisco IOS set dscp ef marks VoIP RTP with DSCP 46 — ToS byte 0xB8.
  • Linux tc / iptables rules often specify the ToS hex byte directly: --tos 0x68 for AF31 (DSCP 26, streaming video).
  • Wireshark DSCP filters use decimal: ip.dsfield.dscp == 46.
  • Juniper JunOS uses DSCP names directly: forwarding-class assured-forwarding loss-priority low.

How to Use This Converter

Select your input format — DSCP decimal, ToS decimal, ToS hex, or IP Precedence — and type your value. The converter instantly displays all equivalent representations alongside the matching PHB class, traffic class, and drop precedence. The DS byte structure diagram shows the bit-level layout so you can visually verify the split between the DSCP field (bits 7–2) and the ECN field (bits 1–0). A quick-reference table of the most common DSCP assignments is always visible for fast lookups without needing to enter a value.

Frequently Asked Questions

Is the DSCP and ToS Converter free?

Yes, DSCP and ToS Converter is totally free :)

Can I use the DSCP and ToS Converter offline?

Yes, you can install the webapp as PWA.

Is it safe to use DSCP and ToS Converter?

Yes, any data related to DSCP and ToS Converter only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

How does this DSCP and ToS Converter work?

Enter a value in any of the four input modes — DSCP decimal (0–63), ToS byte decimal (0–255), ToS hex (e.g. 0xB8), or IP Precedence (0–7) — and the tool instantly converts to all other representations. It also shows the matching PHB class, traffic class, drop precedence, and common use case from the RFC 2474 / RFC 4594 standard table.

What is the relationship between DSCP and the ToS byte?

The ToS (Type of Service) byte in the IPv4 header was redefined by RFC 2474 as the DS byte. The upper 6 bits form the DSCP field, and the lower 2 bits are used for ECN. To convert DSCP to a ToS byte, left-shift the DSCP value by 2 bits (or multiply by 4). For example, EF (DSCP 46) gives ToS byte 184 (0xB8).

What is IP Precedence and how does it map to DSCP?

IP Precedence is the 3-bit subfield in the original RFC 791 ToS byte, occupying bits 7–5. Its 8 levels (0–7) map directly to the DSCP Class Selector codepoints: IP Precedence N equals DSCP N×8. For instance, IP Precedence 5 (Critical) maps to CS5, DSCP 40, ToS byte 160. DSCP is backward-compatible with IP Precedence via the Class Selector PHBs.

What DSCP value should I use for VoIP, video, and data traffic?

For VoIP bearer (RTP audio) use EF (DSCP 46, ToS 0xB8). For video conferencing use AF41 (DSCP 34). For streaming video use AF31 (DSCP 26). For SIP/H.323 signaling use CS3 (DSCP 24) or CS5 (DSCP 40). For business-critical data use AF21–AF23 (DSCP 18–22). These assignments follow the Cisco QoS Baseline and RFC 4594.

What is ECN and why do the lower 2 bits matter?

ECN (Explicit Congestion Notification) occupies the lower 2 bits of the DS byte (RFC 3168). Normal IP traffic sets these bits to 00. ECN-capable endpoints negotiate 01 or 10, and routers under congestion mark packets with 11 (CE — Congestion Experienced) instead of dropping them. DSCP marking only concerns the upper 6 bits; the ECN bits are independent. This converter assumes ECN = 00 for all calculations unless reading a full ToS byte.

Are DSCP markings guaranteed end-to-end across the internet?

No. DSCP markings are honored only within a single administrative domain (e.g. your enterprise LAN or a single ISP). Internet Service Providers typically remark or strip DSCP values at their ingress edges. End-to-end QoS requires negotiated SLAs across every autonomous system, which is uncommon outside of private MPLS networks or DiffServ-aware transit providers.