Configure Policy-driven Dynamic Load Balancing

This chapter describes configuring the policy-driven Dynamic Load Balancing for Quality of Service.

Policy-driven Dynamic Load Balancing

Dynamic Load Balancing (DLB) is an advanced hashing mechanism that

  • enhances traditional ECMP forwarding,

  • optimizes traffic distribution by considering the link load, and

  • dynamically directs traffic over underutilized links

This occurs at the Layer 3 and is often implemented in modern networking hardware such as N9364E-SG2 Silicon One switches.

The policy-driven Dynamic Load Balancing (DLB) feature is introduced on the N9364E-SG2 Silicon One switches in Cisco NX-OS Release 10.5(3)F. For more information about Dynamic Load Balancing, see Cisco Nexus 9000 Series NX-OS Unicast Routing Configuration Guide on Cisco.com.

Dynamic Load Balancing supports two modes:

  • Flowlet Load Balancing (FLB)—In this mode, load balancing occurs at flowlet level based on DRE metrics. This is the default mode. Flowlets are bursts of packets from a flow, identified by their 5-tuple (or selected fields from the packet), that are separated by large enough gaps such that they can be routed independently without causing reordering.

  • Per-packet Load Balancing (PLB)—In this mode, the load balancing decision occurs at a per-packet level instead of the flowlet level. Per-packet Load Balancing can be used for scenarios where the endpoints (for example, Smart NICs) allow for packet re-ordering. This mode distributes traffic packet by packet across all available links in a DLB ECMP group and spreads out the traffic, reducing network congestion.

Configure policy-driven Dynamic Load Balancing

Use this procedure to configure QoS for policy-driven Dynamic Load Balancing (DLB).


Note


Interface label is shared among the interfaces by default for the same policy. To get unique stats, use the policy with a different name. In total, 6 unique QoS policies can be applied on the SG2 switches.


Procedure

SUMMARY STEPS

  1. Use the configure terminal command to enter global configuration mode.
  2. Use the class-map type qos match-all class-name command to create a named object that represents a class of traffic. Class-map names can contain alphabetic, hyphen, or underscore characters; are case sensitive; and can be up to 40 characters.
  3. Enter the match dscp dscp-value command to specify the DSCP value that matches for classifying packets into this class. You can configure a DSCP value in the range of 0 to 63 or the listed values.
  4. Use the policy-map type qos policy-name command to create a named object that represents a set of policies which are applied to a set of traffic classes. Policy-map names can contain alphabetic, hyphen, or underscore characters; are case sensitive; and can be up to 40 characters.
  5. Use the class class-name command to associate a class map with the policy map and enter the configuration mode for the specified system class.
  6. Use the set dlb mode [flowlet | per-packet] command to enable DLB mode for the ingress traffic.
  7. Use the interface interface slot/port command to enter the interface configuration mode.
  8. Enter the service-policy type qos input policy-name command in the interface mode to add classification to the interface and ensure that the packets matching previously configured values, for example, DSCP, pick the respective DLB mode.

DETAILED STEPS


Step 1

Use the configure terminal command to enter global configuration mode.

Example:

switch# configure terminal
switch(config)#

Step 2

Use the class-map type qos match-all class-name command to create a named object that represents a class of traffic. Class-map names can contain alphabetic, hyphen, or underscore characters; are case sensitive; and can be up to 40 characters.

Example:

switch(config)# class-map type qos match-all
        dlb-class
switch(config-cmap-qos)#

Step 3

Enter the match dscp dscp-value command to specify the DSCP value that matches for classifying packets into this class. You can configure a DSCP value in the range of 0 to 63 or the listed values.

Note

 

The QoS classification criteria such as IP precedence, DSCP, IP and IPv6 ACL, and IP RTP is supported. For more information, see the About Classification section from the Configuring Classification chapter.

Example:

switch(config-cmap-qos)# match dscp 26
switch(config-cmap-qos)#

Step 4

Use the policy-map type qos policy-name command to create a named object that represents a set of policies which are applied to a set of traffic classes. Policy-map names can contain alphabetic, hyphen, or underscore characters; are case sensitive; and can be up to 40 characters.

Example:

switch(config-cmap-qos)# policy-map type qos dlb-policy
switch(config-pmap-qos)#

Step 5

Use the class class-name command to associate a class map with the policy map and enter the configuration mode for the specified system class.

Note

 

The associated class map must be the same type as the policy map type.

Example:

switch(config-pmap-qos)# class dlb-class
switch(config-pmap-c-qos)#

Step 6

Use the set dlb mode [flowlet | per-packet] command to enable DLB mode for the ingress traffic.

When the DLB mode is set, the flows which match the class-name are load balanced dynamically. Rest of the flows use the regular ECMP.

  • flowlet—sets the DLB mode to FLB

  • per-packet—sets the DLB mode to PLB

Note

 

The policy-driven DLB mode should match with the mode set by the QoS policy.

For more information about the policy-driven mode, refer to Configure Dynamic Load Balancing in Cisco Nexus 9000 Series NX-OS Unicast Routing Configuration Guide on Cisco.com.

Example:

switch(config-pmap-c-qos)# set dlb mode per-packet
switch(config-pmap-c-qos)#

Step 7

Use the interface interface slot/port command to enter the interface configuration mode.

Note

 

The DLB policy must be applied only on interfaces and not at the system level.

Example:

switch(config-pmap-c-qos)# interface Ethernet1/1
switch(config-if)#

Step 8

Enter the service-policy type qos input policy-name command in the interface mode to add classification to the interface and ensure that the packets matching previously configured values, for example, DSCP, pick the respective DLB mode.

Example:

switch(config-if)# service-policy type qos input dlb-policy
switch(config-if)#

Verify policy-driven Dynamic Load Balancing configuration

Run the show commands listed in the table to view the required information of the policy-driven DLB configuration in QoS.

Table 1. Show commands

Command

Purpose

show policy-map type qos

Displays information about all configured policy maps, all policy maps of type qos show if any DLB mode is configured.

show policy-map interface interface slot/port type qos

Displays information about policy maps, with DLB mode configured, that are applied to the specified interface.

show running config

Displays the current configuration of QoS policies on the switch including the details about class maps, policy maps, and QoS-related configurations applied to interfaces.

Configuration example for Policy-driven Dynamic Load Balancing

This section provides a sample configuration where flows coming on interface Ethernet 1/1 with dscp value 26 undergo dynamic load balancing and all other flows use regular ECMP.

switch# configure terminal
switch(config)# class-map type qos match-all dlb-class
switch(config-cmap-qos)# match dscp 26
switch(config-cmap-qos)# policy-map type qos dlb-policy
switch(config-pmap-qos)# class dlb-class
switch(config-pmap-c-qos)# set dlb mode per-packet
switch(config-pmap-c-qos)# interface Ethernet1/1
switch(config-if)# service-policy type qos input dlb-policy