DSCP

The Internet Engineering Task Force (IETF) redefined the type of service (ToS) for IPv4 packets and Traffic Class (TC) for IPv6 packets as the Differentiated Service (DS) field for the DiffServ model. The value of the DS field is the DiffServ code point (DSCP) value. This is shown in Figure 1.

Figure 1 DS field format

In an IPv4 packet, the six left-most bits (0 to 5) in the DS field are defined as the DSCP value, and the two right-most bits (6 and 7) are reserved bits. Bits 0 to 2 are the Class Selector Code Point (CSCP) value, indicating a class of DSCP. Devices that support the DiffServ function perform forwarding behaviors for packets based on the DSCP value.

An IPv6 packet contains the Traffic Class field. The Traffic Class field is 8 bits long and functions the same as the ToS field in an IPv4 packet to identify the service type.

Generally, each protocol has a default DSCP value, and the DSCP values of some protocols can be configured using the host-packet type command or the corresponding commands for changing the DSCP values of the protocols. In this case, the rules for the DSCP values to take effect as follows:

  • If a protocol has its own command for changing the DSCP value, the DSCP value configured using its own command takes effect regardless of whether the DSCP value is controlled by the host-packet type command.
  • If a protocol does not have its own command for changing the DSCP value and the DSCP value is controlled by the host-packet type command, the DSCP value configured using the command takes effect.
  • If a protocol does not have its own command for changing the DSCP value and the DSCP value is not controlled by the host-packet type command, the default DSCP value takes effect.

For details about the DSCP value and meaning of each PHB, see DSCP and PHB.

ToS/DSCP Value and Its Modification Method

Table 1 ToS/DSCP value of IPv4 and its modification method

Protocol

Default ToS/DSCP Value

Controlled by the host-packet type Command

Modification Command for Each Protocol

ICMP_ECHO

0

No

ping -dscp dscp-value

ICMP_ECHO_REPLY

0

No

N/A

ICMP Error

6

No

N/A

DNS

0

No

N/A

FTP

6

Yes (host-packet type management-protocol)

N/A

TFTP

6

Yes (host-packet type management-protocol)

N/A

SNMP

6

Yes (host-packet type management-protocol)

snmp-agent packet-priority snmp priority-level

SSH

6

Yes (host-packet type management-protocol)

ssh server dscp value

Telnet

6

Yes (host-packet type management-protocol)

telnet server dscp value

Syslog (UDP)

0

Yes (host-packet type management-protocol)

info-center syslog packet-priority priority-level

The info-center syslog packet-priority priority-level command takes precedence over the host-packet type management-protocol command.

Syslog (TCP)

0

No

info-center syslog packet-priority priority-level

HWTACACS

6

Yes (host-packet type management-protocol)

N/A

RADIUS

6

No

N/A

NTP

6

Yes (host-packet type control-protocol)

N/A

BFD

7

No

tos-exp tos-value (BFD session view)

tos-exp tos-value { dynamic | static } (BFD view)

IGMP

6

No

N/A

PIM

6

No

N/A

CUSP

6

Yes (host-packet type control-protocol)

N/A

BGP

6

Yes (host-packet type control-protocol)

N/A

LDP

6

Yes (host-packet type control-protocol)

N/A

OSPF

6

Yes (host-packet type control-protocol)

N/A

DHCP Server/DHCP Relay

6

No

dhcp dscp-outbound value

DHCP Snooping

0

No

N/A

GRE

If the inner IP ToS is valid, the ToS/DSCP value of the inner IP packet is inherited. Otherwise, it is set to 6.

No

N/A

IKE

6

No

N/A

VXLAN

If the inner IP ToS is valid, the ToS/DSCP value of the inner IP packet is inherited. Otherwise, it is set to 6.

No

N/A

RSVP-TE

6

No

N/A

MSDP

6

No

N/A

Traffic Class/DSCP Value and Its Modification Method

Table 2 Traffic class/DSCP value of IPv6 and its modification method

Protocol

Default Traffic Class/DSCP Value

Controlled by the host-packet type Command

Modification Command for Each Protocol

ICMP6_ECHO

0

No

ping ipv6 -tc traffic-class-value

ICMP6_ECHO_REPLY

Copied from the TC/DSCP value of an ICMP6_ECHO message

No

N/A

ICMP6 Error

Copied from the TC/DSCP value of an ICMP6_ECHO message

No

N/A

ND (NS/NA/RS/RA)

6

No

N/A

TNL6 (IPv6 over IPv4)

0

No

N/A

TNL6 (IPv4 over IPv6)

0

No

tunnel ipv4-ipv6 traffic-class class-value

DNSv6

0

No

N/A

FTPv6

6

No

N/A

TFTPv6

6

No

N/A

SNMPv6

6

No

snmp-agent packet-priority snmp priority-level

SSHv6

6

No

N/A

Telnetv6

6

No

N/A

Syslog (UDP)

0

No

info-center syslog packet-priority priority-level

Syslog (TCP)

0

No

info-center syslog packet-priority priority-level

HWTACACS

6

No

N/A

RADIUS

6

No

N/A

NTPv6

6

No

N/A

BFDv6

7

No

tos-exp tos-value (BFD session view)

tos-exp tos-value { dynamic | static } (BFD view)

MLD

6

No

N/A

PIMv6

6

No

N/A

BGP4+

6

No

N/A

OSPFv3

6

No

N/A

DHCPv6

6

No

N/A

GRE

If the inner IP TC is valid, the TC/DSCP value of the inner IP packet is inherited. Otherwise, it is set to 6.

No

N/A

VXLAN

If the inner IP TC is valid, the TC/DSCP value of the inner IP packet is inherited. Otherwise, it is set to 6.

No

N/A

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic