Configuring DSCP to CoS Mapping

NetVisor OS supports creating Quality of Service (QoS) maps that configure hardware based mapping of Differentiated Services Code Point (DSCP) value in a received IP header to a Cost of Service (CoS) priority. This helps in prioritizing traffic based on DSCP markings by using the appropriate egress CoS queues to send packets out.

NetVisor OS sets the DSCP value to the 6 upper bits in the 8-bit ToS field of an IP header. Details about the specific values and the proposed traffic disposition can be found in these RFCs :


  • RFC 2474 (DS Fields Definitions)
  • RFC 2475 (DiffServ architecture)
  • RFC 2597 (AF PHB Group)
  • RFC 2780 (IANA Allocation Guidelines)


A quick summary of DSCP in NetVisor OS:


  • DSCP values range from 0 to 63, while packet priorities map to 8 CoS values or priority queues.
  • Standards (IANA) include specific values in their guidelines. These values are used by different vendors to facilitate inter-connectivity.
  • Class selector code points (CS0 through CS7, multiples of 8) are backwards compatible with IP ToS values. These values also serve as base selectors for other values.
  • Assured Forwarding (AF) code points have 4 priority classes, each class has three code points indicating the drop precedence.
    • Class1: AF11/12/13 (DSCP 10, 12, 14)
    • Class2: AF21/22/23 (DSCP 18, 20, 22)
    • Class3: AF31/32/33 (DSCP 26, 28, 30)
    • Class4: AF41/42/43 (DSCP 34, 36, 38
  • 0 is best effort (CoS 0, default)
  • 46 is an Expedited Forwarding (EF) code point, indicating critical traffic.


There are new commands to support this feature:

CLI (network-admin@switch) > dscp-map-create


Create a DSCP priority mapping table with default DSCP to priority mappings.

name name-string

Create a name for the DSCP map

To delete, use the command:

CLI (network-admin@switch) > dscp-map-delete

To view the configuration details, use the command:

CLI (network-admin@switch) > dscp-map-show

This command displays output only if there are maps configured.


CLI (network-admin@switch) > dscp-map-pri-map-modify


Update priority mappings in tables.

dscp-map selector:

name name-string

Specify the name for the DSCP map to modify.

Specify the following pri-map arguments:

pri number

Specify a CoS priority from 0 to 7.

dsmap number-list

Specify a DSCP value(s)as a single value, comma separated list, or a number range.

To view the details, use the command:

CLI (network-admin@switch) > dscp-map-pri-map-show

The dscp-map-pri-map-show displays output only if there are maps configured.


The default values are listed in the following dscp-map-pri-map-show output:


CLI (network-admin@switch) > dscp-map-pri-map-show name dscp-map1

switch  name pri dsmap

------- ---- --- -----------

switch  ds2  0   none

switch  ds2  1   8,10,12,14

switch  ds2  2   16,18,20,22

switch  ds2  3   24,26,28,30

switch  ds2  4   32,34,36,38

switch  ds2  5   40

switch  ds2  6   48

switch  ds2  7   56

The command, port-config-modify, has a new parameter, dscp-map map-name|none to support this feature. 

Using the option none deletes or cancels a DSCP map previously configured on the port.