Egress queue mapping

Treatment of egress packets is governed by the mapping of forwarding classes to egress queues. Two egress queue mappings are supported, at interface-level and at subinterface-level:

  • The interface-level forwarding class to queue mapping is configured using the following command:

    qos forwarding-classes forwarding-class <name> output queue <value>

  • The subinterface-level forwarding class to queue mapping is configured via an output class map using the following command:

    qos output-class-map forwarding-class <name> queue name <value>

Packets tagged with a forwarding class at egress of the interface or subinterface are forwarded to the associated queue.

No default queues are created at the subinterface level. As a result, all subinterface traffic by default uses interface-level queues. Subinterface level queues are created only after an output class map is associated with a subinterface.

Interface-level queues

On 7730 SXR platforms, 12 egress queues (default name: queue-0 to queue-11) are always available on every interface.

Default interface queues

The following table shows the default settings applied to the interface-level queues.

Table 1. Default interface queues
default-queue-name queue-index committed-burst-size maximum-burst-size peak-rate-percent weight scheduling-class
queue-0 0 default max 100 1 0
queue-1 1 default max 100 1 0
queue-2 2 default max 100 1 2
queue-3 3 default max 100 1 2
queue-4 4 default max 100 1 4
queue-5 5 default max 100 1 4
queue-6 6 default max 100 1 6
queue-7 7 default max 100 1 6
queue-8 8 default max 100 1 0
queue-9 9 default max 100 1 0
queue-10 10 default max 100 1 0
queue-11 11 default max 100 1 0

Interface queue settings include the following parameters:

  • committed-burst-size: defines the guaranteed portion of the queue length based on the global qos buffer-management committed-burst-size-table configuration.
  • maximum-burst-size: defines the maximum queue length. A value of max corresponds to 10 ms buffering capacity at the peak rate.
  • peak-rate-percent: defines the peak queue rate as a percentage of the interface rate.

Custom queue names

If the default queue names are updated to custom-defined queue names, each custom queue inherits the default values originally associated with its queue-index value.

Subinterface-level queues

No default queues are created at the subinterface level. As a result, the default interface-level queue settings as described in the preceding section are applied to the subinterface-level traffic by default. To create custom subinterface-level queues, define an output class map and associate it with a subinterface. The output class map defines only the forwarding class to queue mapping (and is typically based on custom-defined forwarding class and queue names). No default output class map is provided.

Queue attributes are defined separately using a buffer allocation profile, while all queue scheduling is defined using egress scheduling parameters for the subinterface.

Egress queue mapping configuration

To configure egress queue mapping, perform the following high-level steps:

  1. Configure the queue names and indexes.
  2. Configure the forwarding class names, index values, and interface-level FC to queue mapping.
  3. Configure an output class map to define the subinterface-level FC to queue mapping.
  4. Apply the queue settings to the interface QoS configuration.
  5. Apply the output class map to the subinterface QoS configuration.
Note: For the queue mapping to function properly, a classifier (DSCP, dot1p, or MPLS) must also be assigned to the ingress interfaces to classify incoming packets with an FC value.

Example 1: Mapping without output class map

By default, no output class map exists on a subinterface. The following figure shows such an example, in which the subinterface has no output class map associated. As a result, no queue mapping occurs on the subinterface and the queues are mapped using the interface-level mapping instead.

Figure 1. Egress queue mapping example without an output class map
Based on input classification, packets can arrive at egress tagged with one of the following three forwarding-classes:
  1. best-effort or expedited as defined by the DSCP policy
  2. af8 as defined by the default forwarding-class setting defined at subinterface level

Because no output class map exists, all forwarding classes are directed to interface-level queues.

The following examples show the configurations applied in this example.

Queue configuration (example 1)

--{ + candidate shared default }--[ ]--
# info qos
    qos {
        queues {
            queue best-effort-queue {
                queue-index 0
            }
            queue expedited-queue {
                queue-index 7
            }
            queue queue-8 {
                queue-index 8
            }
        }
    }

Forwarding class configuration (example 1)

--{ + candidate shared default }--[ ]--
# info qos
    qos {
        forwarding-classes {
            forwarding-class af8 {
                forwarding-class-index 8
                output {
                    queue queue-8
                }
            }
            forwarding-class best-effort {
                forwarding-class-index 0
                output {
                    queue best-effort-queue
                }
            }
            forwarding-class expedited {
                forwarding-class-index 7
                output {
                    queue expedited-queue
                }
            }
        }
    }

DSCP classifiers configuration (example 1)

--{ + candidate shared default }--[ ]--
# info qos
    qos {
        classifiers {
            dscp-policy example-dscp-policy {
                dscp 0 {
                    forwarding-class best-effort
                    profile out
                }
                dscp 50 {
                    forwarding-class expedited
                    profile in-plus
                }
            }
        }
    }

QoS interface configuration (example 1)

--{ + candidate shared default }--[ ]--
# info qos
    qos {
        interfaces {
            interface eth-1/1 {
                interface-ref {
                    interface ethernet-1/1
                }
                output {
                    queues {
                        queue best-effort-queue {
                        }
                        queue expedited-queue {
                        }
                    }
                }
            }
        }
    }

QoS subinterface configuration (example 1)

--{ + candidate shared default }--[ ]--
# info qos
    qos {
        interfaces {
            interface eth-1/1.10 {
                interface-ref {
                    interface ethernet-1/1
                    subinterface 10
                }
                input {
                    classifiers {
                        dscp-policy example-dscp-policy
                        default {
                            forwarding-class af8
                        }
                    }
                }
            }
        }
    }

Example 2: Mapping with output class map

In the following example, a subinterface has an associated output class map that redirects forwarding class best-effort to an interface-level queue and maps forwarding class expedited to a local subinterface queue.

Figure 2. Egress queue mapping example with output class map

The example shows three possibilities for traffic flows. The output class map defines the following mappings:

  1. Forwarding class best-effort is explicitly redirected to the interface level queue (using the re-direct-to remote parameter).
  2. Forwarding class expedited maps to local subinterface queue expedited-queue.
  3. Forwarding class af8 has no explicit output queue mapping; therefore, matching traffic is redirected to the interface level queue.
    Note: As a best practice, always define an explicit output queue mapping for the forwarding class. This item is included in the example only to show the behavior when the output queue mapping is omitted.

The following outputs show the configurations applied in this example.

Queue configuration (example 2)

--{ + candidate shared default }--[  ]--
# info qos
    qos {
        queues {
            queue best-effort-queue {
                queue-index 0
            }
            queue expedited-queue {
                queue-index 7
            }
            queue queue-8 {
                queue-index 8
            }
        }
    }

Forwarding class configuration (example 2)

--{ + candidate shared default }--[  ]--
# info qos
    qos {
        forwarding-classes {
            forwarding-class af8 {
                forwarding-class-index 8
                output {
                    queue queue-8
                }
            }
            forwarding-class best-effort {
                forwarding-class-index 0
                output {
                    queue best-effort-queue
                }
            }
            forwarding-class expedited {
                forwarding-class-index 7
                output {
                    queue expedited-queue
                }
            }
        }
    }

Output class map configuration (example 2)

--{ + candidate shared default }--[  ]--
# info qos
    qos {
        output-class-map example-output-class-map {
            forwarding-class best-effort {
                queue {
                    name best-effort-queue
                    re-direct-to remote
                }
            }
        }
    }

DSCP classifiers configuration (example 2)

--{ + candidate shared default }--[  ]--
# info qos
    qos {
        classifiers {
            dscp-policy example2-dscp-policy {
                dscp 0 {
                    forwarding-class best-effort
                    profile out
                }
                dscp 50 {
                    forwarding-class expedited
                    profile in-plus
                }
            }
        }
    }

QoS interface configuration (example 2)

--{ + candidate shared default }--[  ]--
# info qos
    qos {
        interfaces {
            interface eth-1/1 {
                interface-ref {
                    interface ethernet-1/1
                }
                output {
                    queues {
                        queue best-effort-queue {
                        }
                        queue expedited-queue {
                        }
                    }
                }
            }
        }
    }
Note: The configuration above is shown for illustrative purposes only. Given that interfaces inherit the queue configurations by default, the queues do not need to be explicitly associated with the interface.

QoS subinterface configuration (example 2)

--{ + candidate shared default }--[  ]--
# info qos
    qos {
        interfaces {
            interface eth-1/1.10 {
                interface-ref {
                    interface ethernet-1/1
                    subinterface 10
                }
                input {
                    classifiers {
                        dscp-policy example2-dscp-policy
                        default {
                            forwarding-class af8
                        }
                    }
                }
                output {
                    output-class-map example-output-class-map
                }
            }
        }
    }

Example 3: Mapping with output class map on a LAG

In the following example, a LAG subinterface has an associated output class map that redirects forwarding class af-1 to an interface-level queue, and maps forwarding classes 0 and 7 to local subinterface queues.

Figure 3. Egress queue mapping example with LAG

The example shows three possibilities for traffic flows. The output class map defines the following mappings:

  1. Forwarding class 0 (best-effort) maps to local subinterface queue be.
  2. Forwarding class af-1 is explicitly redirected to the interface level queue (using the re-direct-to remote parameter).
  3. Forwarding class 7 (expedited) maps to local subinterface queue ef.

Forwarding class af-1 on the LAG subinterface maps to queue af1 on each of the LAG member interfaces. And queue names be and ef on LAG subinterface 10 similarly map to each interface's equivalent queues (be and ef) on each member interface's subinterface 10.

The following examples show the configurations applied in this example.

Queue configuration (example 3)

--{ + candidate shared default }--[  ]--
# info qos
    qos {
        queues {
            queue af1 {
                queue-index 1
            }
            queue be {
                queue-index 0
            }
            queue ef {
                queue-index 7
            }
        }
    }

Forwarding class configuration (example 3)

--{ + candidate shared default }--[  ]--
# info qos
    qos {
        forwarding-classes {
            forwarding-class af-1 {
                forwarding-class-index 1
                output {
                    queue af1
                }
            }
            forwarding-class best-effort {
                forwarding-class-index 0
                output {
                    queue be
                }
            }
            forwarding-class expedited {
                forwarding-class-index 7
                output {
                    queue ef
                }
            }
        }
    }

Output class map configuration (example 3)

--{ + candidate shared default }--[  ]--
# info qos
        output-class-map example3-output-class-map {
            forwarding-class af-1 {
                queue {
                    name af1
                    re-direct-to remote
                }
            }
            forwarding-class best-effort {
                queue {
                    name be
                }
            }
            forwarding-class expedited {
                queue {
                    name ef
                }
            }
        }

DSCP classifiers configuration (example 3)

--{ + candidate shared default }--[  ]--
# info qos classifiers dscp-policy
    qos {
        classifiers {
            dscp-policy example3-dscp-policy {
                dscp 0 {
                    forwarding-class best-effort
                    profile out
                }
                dscp 20 {
                    forwarding-class af-1
                    profile in
                }
               dscp 50 {
                    forwarding-class expedited
                    profile in-plus
                }
            }
        }
    }

LAG configuration (example 3)

--{ + candidate shared default }--[  ]--
# info interface lag1
    interface lag1 {
        admin-state enable
        vlan-tagging true
        subinterface 10 {
            vlan {
                encap {
                    single-tagged {
                        vlan-id 10
                    }
                }
            }
        }
        lag {
            lag-type static
            member-speed 100G
        }
    }
--{ + candidate shared default }--[  ]--
# info interface ethernet-1/1
    interface ethernet-1/1 {
        admin-state enable
        ethernet {
            aggregate-id lag1
            port-speed 100G
        }
    }
--{ + candidate shared default }--[  ]--
# info interface ethernet-1/2
    interface ethernet-1/2 {
        admin-state enable
        ethernet {
            aggregate-id lag1
            port-speed 100G
        }
    }

QoS LAG subinterface configuration (example 3)

--{ + candidate shared default }--[  ]--
# info qos
    qos {
        interfaces {
            interface lag1-10 {
                interface-ref {
                    interface lag1
                    subinterface 10
                }
                output {
                    output-class-map example3-output-class-map
                }
            }
        }
    }

LAG queue statistics

For interface-level queues on interfaces that are members of a LAG, every LAG member (interface) has a separate set of 12 queues and the queue statistics per interface are available in state.

For subinterface queues, the output class map is assigned to the LAG interface ID. However, the queues are instantiated per interface or per subinterface (as shown in the preceding example), while the statistics for these queues are maintained per queue and per interface.

Displaying LAG queue statistics

To display the aggregate LAG statistics in this example, use the following command:

info from state qos interfaces interface lag1-10 output queues queue be queue-statistics aggregate-statistics

To display the per-LAG member statistics in this example, use the following command:

info from state qos interfaces interface lag1-10 output queues queue be queue-statistics per-lag-member-statistics

Interface and subinterface queue statistics

For every interface or subinterface-level queue, the system collects the following statistics:

  • transmitted-inplus-packets
  • transmitted-inplus-octets
  • dropped-inplus-packets
  • dropped-inplus-octets
  • transmitted-in-packets
  • transmitted-in-octets
  • dropped-in-packets
  • dropped-in-octets
  • transmitted-out-packets
  • transmitted-out-octets
  • dropped-out-packets
  • dropped-out-octets
  • transmitted-exceed-packets
  • transmitted-exceed-octets
  • dropped-exceed-packets
  • dropped-exceed-octets

At subinterface level, the queue statistics as well as the other queue state are maintained only for the local queues.

Displaying queue statistics

To display queue statistics at interface and subinterface levels, use the following command:

info from state qos interfaces interface <name> output queues queue * queue-statistics

The command output displays statistics for dropped and transmitted traffic by profile.

Display queue statistics

--{ candidate shared default }--[  ]--
# info from state qos interfaces interface eth1.10 output queues queue be-queue
    qos {
        interfaces {
            interface eth1.10 {
                output {
                    queues {
                        queue be-queue {
                            queue-type local
                            forwarding-class [
                                be
                            ]
                            queue-statistics {
                                aggregate-statistics {
                                    in-profile {
                                        transmitted-packets 0
                                        transmitted-octets 0
                                        dropped-packets 0
                                        dropped-octets 0
                                    }
                                    in-plus-profile {
                                        transmitted-packets 0
                                        transmitted-octets 0
                                        dropped-packets 0
                                        dropped-octets 0
                                    }
                                    out-profile {
                                        transmitted-packets 0
                                        transmitted-octets 0
                                        dropped-packets 0
                                        dropped-octets 0
                                    }
                                    exceed-profile {
                                        transmitted-packets 0
                                        transmitted-octets 0
                                        dropped-packets 0
                                        dropped-octets 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }

Clearing queue statistics

To clear queue statistics for an individual queue, use the following tools command:

tools qos interfaces interface <name> output queues queue name queue-statistics clear

To clear queue statistics at interface and subinterface level for all queues at once, use the following tools command:

tools qos interfaces interface <name> output queues clear-statistics