DSCP, ToS and CoS converter
Enter a DSCP value such as 46 or AF41, or a ToS byte such as 0xB8 as packet captures show it. The page gives the DSCP in decimal, in binary and by name, the ToS byte, the top three bits, which are the IP precedence and which many devices copy into the CoS, and the Wi-Fi priority RFC 8325 recommends. It works in your browser.
How DSCP, ToS and CoS fit together
The DSCP is the top six bits of the byte that IPv4 called Type of Service (ToS) and IPv6 calls Traffic Class. The last two bits of that byte are for ECN, explicit congestion notification. So the ToS byte is the DSCP times 4 when ECN is not in use: DSCP 46 (EF) is the ToS byte 184, 0xB8, which is how many capture tools show it.
The top three bits of the DSCP are the old IP precedence. A class selector, CS0 to CS7, is a DSCP whose last three bits are 0, so CSn is n times 8. In an assured forwarding name AFxy, x is the class and y the drop precedence, and the DSCP is 8x + 2y. Many devices copy the top three bits into their layer 2 marking: the 802.1p CoS, or the Wi-Fi user priority. RFC 8325 notes that this puts EF in priority 5, video, and recommends priority 6, voice, for it on Wi-Fi.
Named DSCP values
The codepoints of the IANA registry, with the service class RFC 4594 gives them and the Wi-Fi user priority (UP) and access category RFC 8325 recommends. Select a name to read it above.
| Name | DSCP | Bits | ToS | Top 3 bits | Service class (RFC 4594) | Wi-Fi UP | What it is for | Defined in |
|---|---|---|---|---|---|---|---|---|
CS0 | 0 | 000000 | 0x00 | 0 | Standard | 0 | Default forwarding: best effort, what unmarked traffic gets. | RFC 2474 |
LE | 1 | 000001 | 0x04 | 0 | Low-Priority Data | 1 | Lower effort: traffic that may wait behind everything else, best effort included. | RFC 8622 |
CS1 | 8 | 001000 | 0x20 | 1 | Low-Priority Data (legacy) | 1 | Class selector 1. RFC 4594 put low-priority data here; RFC 8622 now uses LE for that. | RFC 2474 |
AF11 | 10 | 001010 | 0x28 | 1 | High-Throughput Data | 0 | Assured forwarding class 1, low drop precedence: bulk data such as file transfers. | RFC 2597 |
AF12 | 12 | 001100 | 0x30 | 1 | High-Throughput Data | 0 | Assured forwarding class 1, medium drop precedence. | RFC 2597 |
AF13 | 14 | 001110 | 0x38 | 1 | High-Throughput Data | 0 | Assured forwarding class 1, high drop precedence. | RFC 2597 |
CS2 | 16 | 010000 | 0x40 | 2 | OAM | 0 | Class selector 2: operations, administration and management traffic. | RFC 2474 |
AF21 | 18 | 010010 | 0x48 | 2 | Low-Latency Data | 3 | Assured forwarding class 2, low drop precedence: low-latency data such as transactions. Teams marks screen sharing with it. | RFC 2597 |
AF22 | 20 | 010100 | 0x50 | 2 | Low-Latency Data | 3 | Assured forwarding class 2, medium drop precedence. | RFC 2597 |
AF23 | 22 | 010110 | 0x58 | 2 | Low-Latency Data | 3 | Assured forwarding class 2, high drop precedence. | RFC 2597 |
CS3 | 24 | 011000 | 0x60 | 3 | Broadcast Video | 4 | Class selector 3: broadcast video. | RFC 2474 |
AF31 | 26 | 011010 | 0x68 | 3 | Multimedia Streaming | 4 | Assured forwarding class 3, low drop precedence: streaming audio and video. | RFC 2597 |
AF32 | 28 | 011100 | 0x70 | 3 | Multimedia Streaming | 4 | Assured forwarding class 3, medium drop precedence. | RFC 2597 |
AF33 | 30 | 011110 | 0x78 | 3 | Multimedia Streaming | 4 | Assured forwarding class 3, high drop precedence. | RFC 2597 |
CS4 | 32 | 100000 | 0x80 | 4 | Real-Time Interactive | 4 | Class selector 4: real-time interactive traffic. | RFC 2474 |
AF41 | 34 | 100010 | 0x88 | 4 | Multimedia Conferencing | 4 | Assured forwarding class 4, low drop precedence: video conferencing. Teams marks video with it. | RFC 2597 |
AF42 | 36 | 100100 | 0x90 | 4 | Multimedia Conferencing | 4 | Assured forwarding class 4, medium drop precedence. | RFC 2597 |
AF43 | 38 | 100110 | 0x98 | 4 | Multimedia Conferencing | 4 | Assured forwarding class 4, high drop precedence. | RFC 2597 |
CS5 | 40 | 101000 | 0xA0 | 5 | Signaling | 5 | Class selector 5: call signaling. Teams marks calling and meetings signaling with it. | RFC 2474 |
VOICE-ADMIT | 44 | 101100 | 0xB0 | 5 | 6 | Capacity-admitted traffic, such as voice calls that a call admission control has accepted. | RFC 5865 | |
NQB | 45 | 101101 | 0xB4 | 5 | 0, 3 or 5 | Non-queue-building traffic: small, steady flows that should not wait behind large ones. Networks without it treat it as default. | RFC 9956 | |
EF | 46 | 101110 | 0xB8 | 5 | Telephony | 6 | Expedited forwarding: voice. Teams marks audio with it. | RFC 3246 |
CS6 | 48 | 110000 | 0xC0 | 6 | Network Control | 7 or 0 | Class selector 6: network control, such as routing protocols. | RFC 2474 |
CS7 | 56 | 111000 | 0xE0 | 7 | 7 or 0 | Class selector 7: kept for future network control. | RFC 2474 |
Microsoft Teams
The source ports and DSCP values Microsoft recommends for Teams. Microsoft's page says the port ranges can be changed but the DSCP values cannot, and that the signaling ports cannot be changed either.
| Media | Source ports | Protocol | DSCP | DSCP name |
|---|---|---|---|---|
| Audio | 50000 to 50019 | TCP/UDP | 46 | Expedited Forwarding (EF) |
| Video | 50020 to 50039 | TCP/UDP | 34 | Assured Forwarding (AF41) |
| Application/Screen Sharing | 50040 to 50059 | TCP/UDP | 18 | Assured Forwarding (AF21) |
| Calling and Meetings Signaling | 50070 to 50089 | UDP | 40 | Class Selector 5 (CS5) |
Sources
- Names and values: the IANA registry of Differentiated Services Field Codepoints, from RFC 2474 (class selectors), RFC 2597 (assured forwarding), RFC 3246 (expedited forwarding), RFC 5865 (VOICE-ADMIT), RFC 8622 (LE) and RFC 9956 (NQB).
- Service classes: RFC 4594, figure 3. Wi-Fi user priorities and access categories: RFC 8325, figure 1, with the changes of RFC 8622 for LE and RFC 9956 for NQB.
- Teams: Microsoft's page on implementing Quality of Service in Microsoft Teams.
More Network tools
-
CIDR subnet calculator
Network, broadcast, host range, subnet mask and wildcard mask for IPv4 and IPv6 prefixes.
-
IP range to CIDR converter
Turn a range such as 10.0.0.5-10.0.0.70 into CIDR blocks, merge a list of blocks, and check whether an address is in it.
-
IP address type checker
See whether an address is private, CGNAT, link-local, loopback, documentation, multicast or public, with its RFC.
-
IPv6 expander, compressor and reverse name
Write an IPv6 address in full or in its shortest form, get its ip6.arpa name, or build one from a MAC address.
-
MAC address format converter
Convert MAC addresses between colons, dashes, Cisco's dotted form and plain hex, and read the multicast and local bits.
-
MTU and MSS calculator
Work out the MTU and TCP MSS inside PPPoE, GRE, VXLAN, WireGuard and IPsec, with ping commands that test them.
-
Port number lookup
Look up a port such as 445 or 5985, or a service name, in IANA's registry, with what Windows and Active Directory use it for.
-
DHCP option encoder and decoder
Build or read the hex of option 121 and 249 static routes, option 119 search lists and option 43 for Cisco and UniFi.
-
NPS reason code lookup
Read why Network Policy Server denied a request: events 6273 and 6274, and reason codes such as 16, 48 and 65.
-
Wi-Fi reason and status codes
Look up 802.11 deauthentication and disassociation reason codes and association status codes.