Understanding QoS Classification (Trust) on Spectrum Switches

Version 10

    This post discusses the fundamentals of QoS classifications (Trust types) on Mellanox Ethernet Spectrum based switches.

     

     

    References

     

    Overview

    QoS classification depends on the port configuration for QoS trust types. The trust level determines which packet header fields derive the switch-priority and color.

    There are 4 trust configuration types:

    • Trust Port - The switch will use the port default settings (which means that all traffic will receive the same switch priority).
    • Trust Layer-2 (L2) - Trust the PCP and DEI bits on the VLAN header.
      • In case the packet had VLAN header, based on packet PCP and  DEI bits, the packet will be mapped to the configured switch priority.
      • Else (no VLAN), the packet will be mapped according to the default port priority settings.
    • Trust Layer-3 (L3) - Trust the DSCP bits in the IP header
      • In case of an IP header, the packet will be mapped to the switch priority according to the DSCP bits in the IP header.
      • Else (no IP header), the packet will be mapped according to the default port priority settings.
    • Trust Both (both L2 and L3)
      • Based on packet DSCP for IP packet
      • else, based on packet PCP and DEI  for VLAN tagged packets
      • else, based on the port default setting

     

    The following table summarizes the options:

    Ethernet HeaderIP HeaderTrust PortTrust L2Trust L3Trust Both
    Vlan TagYesPort defaultPCP/DEIDSCPDSCP
    UntaggedYesPort defaultPort defaultDSCPDSCP
    Vlan TagNoPort defaultPCP/DEIPort defaultPCP/DEI
    UntaggedNoPort defaultPort defaultPort defaultPort default

     

     

    Configuration

     

    1. Set the trust type

    switch (config) #  interface ethernet 1/1 qos trust [port | L2 | L3 | both]

     

    2. Set the default port to switch priority mapping

    switch (config) # interface ethernet 1/1 qos default switch-priority <0-7>

     

    3. Set the mapping for trust L2

    switch (config) # interface ethernet 1/1 qos map pcp <0-7> dei <dei> to switch-priority <0-7>

     

    4. Set the mapping for trust L3

    switch (config) # interface ethernet 1/1 qos map dscp <0-63> to switch-priority <0-7>

     

     

    Verification

    To get the current QoS configuration (trust), run the show qos command.

    This is the output of the default configuration:

    switch (config) # show qos interface ethernet 1/1

    Eth1/1

    Trust mode: L2

    Default switch-priority: 0

    Default PCP: 0

    Default DEI: 0

    PCP,DEI rewrite: disabled

    IP PCP,DEI rewrite: enable

    DSCP rewrite: disabled

     

    PCP,DEI to switch-priority mapping:

    PCP,DEI  switch-priority

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

    0,0      0

    1,0      1

    2,0      2

    3,0      3

    4,0      4

    5,0      5

    6,0      6

    7,0      7

    0,1      0

    1,1      1

    2,1      2

    3,1      3

    4,1      4

    5,1      5

    6,1      6

    7,1      7

     

    DSCP to switch-priority mapping:

    DSCP  switch-priority

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

    0     0

    1     0

    2     0

    3     0

    4     0

    5     0

    6     0

    7     0

    8     1

    9     1

    10    1

    11    1

    12    1

    13    1

    14    1

    15    1

    16    2

    17    2

    18    2

    19    2

    20    2

    21    2

    22    2

    23    2

    24    3

    25    3

    26    3

    27    3

    28    3

    29    3

    30    3

    31    3

    32    4

    33    4

    34    4

    35    4

    36    4

    37    4

    38    4

    39    4

    40    5

    41    5

    42    5

    43    5

    44    5

    45    5

    46    5

    47    5

    48    6

    49    6

    50    6

    51    6

    52    6

    53    6

    54    6

    55    6

    56    7

    57    7

    58    7

    59    7

    60    7

    61    7

    62    7

    63    7

     

    PCP,DEI rewrite mapping (switch-priority to PCP,DEI):

    switch-priority  PCP,DEI

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

    0                0,0

    1                1,0

    2                2,0

    3                3,0

    4                4,0

    5                5,0

    6                6,0

    7                7,0

     

    DSCP rewrite mapping (switch-priority to DSCP):

    switch-priority  DSCP

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

    0                0

    1                8

    2                16

    3                24

    4                32

    5                40

    6                48

    7                56