DSCP

Map Diffserv Code Points

DSCP

Show or set the DSCP map, which translates an incoming DiffServ code point into a new code point, an internal priority and a drop-first (congestion) bit. The map can be global or per port. There are no sub-command keywords.

dscp <pbmp> [Mode=<mode>] [<source> [<mapped> [<prio> [<cng>]]]]

  • <pbmp> is required. If it covers all Ethernet ports, the global map is used.

  • With no <source>, all 64 code points are shown. With <source> alone, only that one is shown.

  • With <mapped>, the entry is set, optionally with internal priority <prio> and <cng> (non-zero marks the packets drop-first).

  • Mode= selects the map mode when setting. When only showing, it is ignored with WARNING: ignore mode argument.

  • Numbers can be decimal or 0x hex.

The shell prints a <unit>:<port> dscp map: header and one `` <src>-><mapped> prio=<p> cng=<0|1>`` line per code point. When showing all 64, only code points that are remapped to a different value are listed.

Showing is read-only. Setting changes how live traffic is classified, behind SONiC’s back (SONiC programs this map from DSCP_TO_TC_MAP).

Unvalidated — Show how DSCP 46 is mapped on ce0 (read-only)

drivshell> dscp ce0 46

Unvalidated — Keep DSCP 46 but give it internal priority 5 (changes the ASIC)

drivshell> dscp ce0 46 46 5

Built-in help

Usages:
  dscp pbmp [Mode=<mode>][source [mapped [prio [cng]]]]
        - map source dscp to mapped

Further reading

BCM_SDK命令, 交换芯片Helix4 L2 L3功能验证.