# QoS

## 1. Function Overview

QoS (Quality of Service) is a technology for reserving a specified bandwidth for communications over a network, guaranteeing a fixed speed of communication.
Application data is classified and grouped, and then forwarded by group priority level, referring to the DSCP in the IP header or the CoS in the IEEE802.1Q tag.

## 2. Definition of Terms Used

CoS (IEEE 802.1p Class of Service)

This expresses priority as a 3-bit field in the VLAN tag header, with a value from 0–7.
Also called 802.1p user priority.

IP Precedence

This expresses priority as a 3-bit field in the TOS field of the IP header, with a value from 0–7.
Used to indicate the traffic class of the frame in question, for the device that receives the frame.

DSCP (Diffserv Code Point)

This expresses priority as a 6-bit field in the TOS field of the IP header, with a value from 0–63.
Since DSCP uses the same TOS field as IP precedence, it is compatible with IP-Precedence.
Used to indicate the traffic class of the frame in question, for the device that receives the frame.

Default CoS

This is the CoS value that is assigned to an untagged frame for the purpose of internal processing.

Transmission queue

This product has eight transmission queues per port. The transmission queues are numbered from ID 0–7, with larger ID numbers being given higher priority.

Trust mode

This indicates what will be the basis for deciding (trusting) the transmission queue ID.
The CoS value or DSCP value of the received frames can be used to differentiate them, or a priority order specified for each receiving port can be applied.
Settings can be configured for each LAN/SFP port and logical interface. Note that the settings for LAN/SFP ports that belong to a logical interface cannot be changed.
The default status (when QoS is enabled) is set to “CoS”.

Transmission queue ID conversion table

This is a conversion table used when deciding on the transmission queue ID from either the CoS value or the DSCP value.
There are two kinds of transmission queue ID conversion tables, the CoS-transmission queue ID conversion table and the DSCP-transmission queue ID conversion table. Each kind is used with its own trust mode.
Mapping can be freely changed by the user.

Port priority

This is the priority order assigned for each reception port. If the trust mode is “port priority,” frames received at that port are placed in the transmission queue according to the port’s priority setting.

Class map

This defines the conditions by which packets are classified into traffic classes.
Packets can be associated and used with policy maps, and QoS processing (pre-marking, transmission queue specification, metering/policing/remarking) per traffic class can be defined.

Policy map

This is an element for performing a QoS processing series on the receiving port. This cannot be used by itself, but rather is associated and used with 1–8 class maps.
When a policy map is applied to a LAN/SFP port and logical interface, traffic is classified per class map that is associated with the policy map for the packets received on the relevant port.
Also, QoS processing (pre-marking, transmission queue specification, metering/policing/remarking) set per traffic class can be performed.

Policer

This is a group series of metering/policing/remarking settings.
There are two types of policers, an individual policer for metering that targets one traffic class, and a group policer that meters multiple traffic classes by putting them together.

## 3. Function Details

### 3.1. Enabling or disabling QoS control

When shipped from the factory, the QoS control of this product is set to disable.
To enable QoS control, use the qos enable command. To disable this, use the no qos command.
Most QoS control commands cannot be executed if QoS is not enabled.
The QoS function status can be checked using the show qos command.
In order to enable QoS control, the system’s flow control must be disabled.

### 3.2. QoS processing flow

The QoS processing flow is shown below.

### 3.3. Transmission queue assignments

When this product receives a frame, it determines the initial value of the transmission queue ID according to the CoS value or DSCP value within the frame and the port priority of the reception port.
Of the factors such as the frame’s CoS value, DSCP value, and port priority, the port’s trust mode determines which factor will be the basis for determining the transmission queue.
The trust mode can be changed by the qos trust command. The default value (when QoS is enabled) is set to CoS.

The transmission queue is assigned per trust mode, using the following rules.

- When trust mode is “CoS”

  - When the received frame is a frame with a VLAN tag, the CoS value within the tag is used to determine the transmission queue ID.

  - When the received frame is a frame without a VLAN tag, the default CoS that is managed by this product is used to determine the transmission queue ID.
    The default setting (when QoS is enabled) and the default CoS are set to “0”. The setting can be changed using the qos cos command.

  - Conversion from the CoS value to the transmission queue ID is performed by the CoS-transmission queue ID conversion table.
    One such table is maintained by the system, and with the default settings (when QoS is enabled), the settings are as follows. The setting can be changed using the qos cos-queue command.

    CoS value | Transmission queue ID | Traffic Type
    --- | --- | ---
    0 | 2 | Best Effort
    1 | 0 | Background
    2 | 1 | Standard(spare)
    3 | 3 | Excellent Effort(Business Critical)
    4 | 4 | Controlled Load(Streaming Multimedia)
    5 | 5 | Video(Interactive Media) less than 100 msec latency and jitter
    6 | 6 | Voice(Interactive Media) less than 10 msec latency and jitter
    7 | 7 | Network Control(Reserved Traffic)

- When trust mode is “DSCP”

  - The DSCP value in the IP header is used to determine the transmission queue ID.

  - Conversion from the DSCP value to the transmission queue ID is performed by the DSCP-transmission queue ID conversion table.
    One such table is maintained by the system, and with the default settings (when QoS is enabled), the settings are as follows. The setting can be changed using the qos dscp-queue command.

    DSCP value | Transmission queue ID | Traffic Type
    --- | --- | ---
    0 - 7 | 2 | Best Effort
    8 –15 | 0 | Background
    16 - 23 | 1 | Standard(spare)
    24 - 31 | 3 | Excellent Effort(Business Critical)
    32 - 39 | 4 | Controlled Load(Streaming Multimedia)
    40 - 47 | 5 | Video(Interactive Media) less than 100 msec latency and jitter
    48 - 55 | 6 | Voice(Interactive Media) less than 10 msec latency and jitter
    56 - 63 | 7 | Network Control(Reserved Traffic)

- When trust mode is “port priority”

  - The transmission queue ID is determined by the port priority.

  - By default (when QoS is enabled), port priority is set to 2. The setting can be changed using the qos port-priority-queue command.

If the trust mode is “CoS” or “DSCP,” the transmission queue ID might be reassigned due to QoS processing (see below) by the policy map.
In this case, the new transmission queue ID is reassigned based on the transmission queue ID conversion table that corresponds to the port’s trust mode.

- Pre-marking

  - Refer to “Pre-marking” for details.

- Specify transmission queue

  - When the trust mode is “CoS”, specify the CoS value that corresponds to the transmission queue ID, using the set cos-queue command.

  - When the trust mode is “DSCP”, specify the DSCP value that corresponds to the transmission queue ID, using the set dscp-queue command.

- Remark

  - Refer to Metering/policing/remarking for details.

If the trust mode is “port priority,” the transmission queue ID cannot be changed by the policy map’s QoS processing. (It is not possible to apply a policy map that includes pre-marking, transmission queue specification, and remarking settings.)

### 3.4. Transmission queue assignments (frames sent from the network switch unit)

As an exception to the transmission queue assignments, frames sent from the network switch unit (CPU) are automatically assigned the transmission queue determined by the system. (They are not given transmission queue assignments based on the trust mode.)
The qos queue sent-from-cpu command can be used to change the transmission queue that is assigned, and by default the transmission queue ID is set to 7.

### 3.5. Traffic classification

Traffic classification is a function to classify received frames, based on a class map that defines the conditions of the IP header, TCP header, and so on.
The conditions that can be classified and the commands for settings are shown in the table below.

- Conditions that can be classified, and commands for settings

  Classification condition | Condition-setting command | Class map setting command | Number that can be registered per class map
  --- | --- | --- | ---
  Source/destination MAC address | access-list (*Note 3) | match access-list | 1
  Source/destination IP address | 1
  IP protocol type (*Note 1) | 1
  Ethernet frame type number | match ethertype | 1
  CoS value for VLAN tag header | match cos | 8
  Precedence value for IP header | match ip-precedence | 8
  DSCP value for IP header | match ip-dscp | 8
  VLAN ID (*Note 2) | match vlan, match vlan-range | 30

  (*Note 1) IPv6 is not subject to classification by IP protocol type.
  (*Note 2) Does not include isolated or community VLANs in a private VLAN.
  (*Note 3) Up to 39 conditions can be set in the access list for traffic classification.

- Traffic is classified per class map.

- One classification condition type can be set for one class map. Policer-based QoS processing (metering/policing/remarking) and pre-marking, as well as specifying the transmission queue can be done for frames that match the conditions.

- If classification conditions are not specified, all frames are classified into the corresponding traffic class.

- For classification based on CoS, IP precedence, DSCP, and the VLAN ID, multiple classifications can be made for one class map.

- Associating multiple class maps to a policy map will make it possible to classify complex traffic for the receiving port. Up to eight class maps can be associated to one policy map.

- Information for the class map that was set can be confirmed using the show class-map command.

- Information for the policy map that was set can be confirmed using the show policy-map command.

- Use the show qos map-status command to check the port to which the policy map is applied, and the policy map to which the class map is associated.

### 3.6. Pre-marking

Pre-marking is a function to change (assign) the CoS, IP precedence, and DSCP values for received frames classified into traffic classes.
Pre-marking is set using the policy map and class mode commands shown below.

- Pre-marking setting commands

  Pre-marking target | Command for settings
  --- | ---
  CoS | set cos
  IP Precedence | set ip-precedence
  DSCP | set ip-dscp

- The DSCP values that can be premarked include the value recommended in the RFC and those not found in the RFC, for a total of four. (This rule also applies to DSCP values that are used in remarking.)

- Only one pre-marking setting can be made for a class map. This cannot be used together when specifying a transmission queue (set cos-queue, set ip-dscp-queue).

- When pre-marking, the transmission queue will be reassigned based on the changed value and the transmission queue ID conversion table that corresponds to the trust mode.

### 3.7. Metering/policing/remarking

Bandwidth can be controlled by measuring the bandwidth used, and discarding or reprioritizing packets according to the measurement results.
The processing series for metering, policing and remarking is done per “policer”.

- Processing summary for bandwidth control

  Process name | Summary
  --- | ---
  Metering | This measures how much bandwidth is being taken up by the classified traffic based on the traffic rate and burst size, and classifies this into three bandwidth classes (green, yellow and red). Actions such as discarding (policing) and remarking can be specified for each classified bandwidth class.
  Policing | The bandwidth usage can be kept within a certain amount by discarding frames, using bandwidth class information.
  Remark | The CoS, IP precedence, and DSCP values for a frame can be changed using the bandwidth class information.

Metering, policing, and remarking cannot be performed for the following logical interfaces.

1. Logical interface grouped across the member switches that make up the stack (green I/F below)

#### 3.7.1. Policer types

There are two types of policers: an individual policer that performs metering/policing/remarking on one traffic class, and an aggregate policer that performs these actions on multiple aggregated traffic classes.

- Individual policer
  Metering/policing/remarking is done per traffic class.
  The settings are specified using police and remark-map commands in the policy map/class mode.

- Aggregate policer
  Metering/policing/remarking is done on multiple traffic classes, which are aggregated.
  The aggregate policer can be created using the aggregate-police command, and the content can be specified by the aggregate policer mode’s police command and remark-map command.
  To apply a created aggregate policer to a traffic class, use the police-aggregate command.

- The commands used to make settings for an individual policer and an aggregate policer respectively are as follows.

  Content of setting | Individual policer | Aggregate policer
  --- | --- | ---
  Create policer | - | aggregate-police
  Policer settings (Metering/policing/remarking) | police single-rate, police twin-rate (Policy map class mode) | police single-rate, police twin-rate (Aggregate policer mode)
  Apply policer to traffic class | police-aggregate
  Detailed remarking settings | remark-map (Policy map/class mode) | remark-map (Aggregate policer mode)

#### 3.7.2. Metering settings

There are two types of metering: single rate policer (RFC2697) and twin rate policer (RFC2698).
The type of metering to use and the control parameters are specified using the police command (policy map/class mode or aggregate policer mode).

- Single rate policer (RFC2697)
  Single rate policers separate the frames within a traffic class into three bandwidth classes: “green” (conforming), “yellow” (exceeding) or “red” (violating), based on the traffic rate (CIR) and burst size (CBS, EBS).

  - Single rage policer control parameters
    If the burst size was not set appropriately, the throughput might decrease in some cases.

    Parameter | Explanation
    --- | ---
    CIR (Committed Information Rate) | This is the amount of tokens that is periodically stored in buckets. The amount can be specified in the range of 1–102,300,000 kbps.
    CBS (Committed Burst Size) | This is the amount of traffic that can be removed at one time from the first token bucket (a conforming token bucket). The amount can be specified in the range of 11–2,097,120 kByte.
    EBS (Exceed Burst Size) | This is the amount of traffic that can be removed at one time from the second token bucket (an exceeding token bucket). The amount can be specified in the range of 11–2,097,120 kByte.

- Twin rate policer (RFC2698)
  Twin rate policers separate the frames within a traffic class into three bandwidth classes: “green” (conforming), “yellow” (exceeding) or “red” (violating), based on the traffic rate (CIR, PIR) and burst size (CBS, PBS).

  - Twin rage policer control parameters
    If the burst size was not set appropriately, the throughput might decrease in some cases.

    Parameter | Explanation
    --- | ---
    CIR (Committed Information Rate) | This is the amount of tokens periodically stored in the second token bucket (confirming token bucket). The amount can be specified in the range of 1–102,300,000 kbps.
    PIR (Peak Information Rate) | This is the amount of tokens periodically stored in the first token bucket (peak token bucket). The amount can be specified in the range of 1–102,300,000 kbps. However, a value smaller than the CIR cannot be specified.
    CBS (Committed Burst Size) | This is the amount of token traffic that can be removed at one time from the conforming token bucket. The amount can be specified in the range of 11–2,097,120 kByte.
    PBS (Peak Burst Size) | This is the amount of token traffic that can be removed at one time from the peak token bucket. The amount can be specified in the range of 11–2,097,120 kByte.

#### 3.7.3. Metering action (policing/remarking) settings

To specify the action for a bandwidth class that was categorized by metering, use the police command (in policy map/class mode or aggregate policer mode).
This product lets you define the following actions for each bandwidth class.

- Specifying bandwidth class actions

  Bandwidth class | Forward | Discard | Remark
  --- | --- | --- | ---
  Green | Yes | No | No
  Yellow | Yes | Yes | ○ (only one or the other)
  Red | No | Yes

- Detailed remarking settings are specified using the remark-map command (policy map/class mode or aggregate policer mode).
  As with pre-marking, remarking to DSCP values can use the value recommended by RFC (refer to separate table 1. “Standard PHB (RFC recommended value)” and those not found in the RFC, for total of four.
  When remarking, the transmission queue will be reassigned based on the changed value and the transmission queue ID conversion table that corresponds to the trust mode.

- If metering is not done, all frames that have been classified into traffic classes will be handled as the green bandwidth class.

### 3.8. Storing in the transmission queue

Frames are stored in the transmission queue that is finally determined through a series of QoS processing.
In order to resolve transmission queue congestion, this product provides a system to select and discard frames.

- This product uses the tail drop method to resolve overflow in the transmission queue.
  When the threshold values shown below for the bandwidth class that is classified by metering have been exceeded, the frame in question will be discarded.
  Frames discarded by tail drop are counted by the frame counter.

  Bandwidth class | Tail drop threshold value (%)
  --- | ---
  Green + Yellow | 100%
  Red | 60%

- It is not possible to change the threshold value.

- The usage of the transmission queue can be checked using the show qos queue-counters command.

- The number of packets discarded by tail drop can be checked using the show interface, show frame-counter command.

### 3.9. Scheduling

Scheduling is used to determine what rules are used to send out the frames that are stored in the transmission queue.
Appropriate control of the scheduling along with the system to control congestion will help ensure QoS. (Inappropriate scheduling will result in degradation of QoS.)

This product supports two types of scheduling for the transmission queue, the strict priority system (SP) and the weighted round-robin (WRR) system.
SP and WRR can also be integrated in the interface and used together. (When doing so, SP will be given priority during processing.)

- Strict priority system (SP: Strict Priority) The higher the queue priority, the higher the transmission priority.
  When a frame is stored in a high-priority queue, it can never be transmitted from a lower-priority queue.

- Weighted round-robin system (WRR: Weighted Round Robin)
  Each queue is assigned a weight and transmits frames accordingly. A weight of 1–32 can be set.
  Frames can also be transmitted from a lower-priority queue, within a specified percentage.

The transmission queue settings are made for the entire system, not for each interface.
Use the qos wrr-weight command to set the weight.
The default setting (when QoS is enabled) and the scheduling setting is “SP” for all queues.

### 3.10. Shaping

If a frame is forwarded from a broadband network to a narrowband network at the same transmission speed when connecting to a network with different bandwidth, the frame cannot be forwarded, which may result in insufficient bandwidth.
Shaping is a function that monitors the frame transmission speed, and restricts the forwarding rate to a specific amount by temporarily buffering frames with a speed that exceeds the limit, and then transmitting them.
Shaping on this product is realized by using a single token bucket.

- Single token bucket

- Shaping can be specified for individual ports and for individual queues, respectively using the following commands.

  Object of shaping | Command for settings
  --- | ---
  By port | traffic-shape rate
  By transmission queue | traffic-shape queue rate

- Specify the upper limit of the transmission rate (CIR) and the burst size (BC).

  - Upper limit of transmission rate (CIR): Can be specified from 50 to 100,000,000 kbps.

  - Burst size (BC): Can be specified from 16 to 4,000 kbytes. However, this is specified in 4 Kbyte units.

  - If shaping is used both by queue and by port, shaping by port is applied after shaping by queue.

- The default setting (when QoS is enabled) and the shaping setting is “disable” for all ports and all queues.

### 3.11. Optimizing web conference application settings

QoS settings for web conference application software can be configured easily via the Web GUI.
By merely using simple operations to select the web conference application to use, communication can be prioritized for that web conference application, such as Zoom Meetings or Microsoft Teams.

- Page for optimizing web conference application settings

Optimizing web conference application settings involves configuring the following settings.

- Enable QoS.

- Set the trust mode for all ports to DSCP.

- Assign the DSCP value for the web conference application to be optimized to a high-priority sending queue. The DSCP values used for web conference applications are indicated below.
  To use the web conference application settings to change the DSCP value used by the web conference application to a non-default value, use the qos dscp-queue command to change the link between the DSCP value and sending queue.

  - Zoom Meetings

    - 56 (Audio)

    - 40 (Video/Screen sharing)

  - Microsoft Teams

    - 46 (Audio)

    - 34 (Video)

    - 18 (Application/Screen sharing)

- Assign the DSCP value not used by the web conference application being optimized to the lowest-priority sending queue.

- Change the scheduling mode for all sending queues to the absolute priority method.

This web conference application setting optimization function includes functionality for configuring QoS settings for individual switches. To fully maximize the benefits of QoS settings, they must be configured for the entire network, including the router, at the same time.
If the DSCP value for the web conference application was changed to a non-default value, also change the DSCP sending queue assignment settings separately.

Separate table 1: Standard PHB (RFC recommended value)

PHB | DSCP value | RFC
--- | --- | ---
Default | 0 | RFC2474
CS (Class Selector) | CS0 | 0 | RFC2474
CS1 | 8
CS2 | 16
CS3 | 24
CS4 | 32
CS5 | 40
CS6 | 48
CS7 | 56
AF (Assured Forwarding) | AF11 | 10 | RFC2597
AF12 | 12
AF13 | 14
AF21 | 18
AF22 | 20
AF23 | 22
AF31 | 26
AF32 | 28
AF33 | 30
AF41 | 34
AF42 | 36
AF43 | 38
EF (Expedited Forwarding) | 46 | RFC2598

## 4. Related Commands

Related commands are indicated below.
For details, refer to the Command Reference.

Operations | Operating commands
--- | ---
Enabling or disabling QoS control | qos enable
Set default CoS | qos cos
Change trust mode | qos trust
Generate policy map for received frames | policy-map
Apply policy map for received frames | service-policy input
Show status of QoS function setting | show qos
Show QoS information for LAN/SFP port | show qos interface
Show egress queue usage ratio | show qos queue-counters
Show policy map information | show policy-map
Show map status | show qos map-status
Set CoS-transmission queue ID conversion table | qos cos-queue
Set DSCP-transmission queue ID conversion table | qos dscp-queue
Set port priority order | qos port-priority-queue
Set priority order of frames sent from the network switch unit | qos queue sent-from-cpu
Generate class map (traffic category conditions) | class-map
Associate class map | class
Set traffic classification conditions (access-group) | match access-list
Set traffic classification conditions (CoS) | match cos
Set traffic classification conditions (TOS precedence) | match ip-precedence
Set traffic classification conditions (DSCP) | match ip-dscp
Set traffic classification conditions (Ethernet Type) | match ethertype
Set traffic classification conditions (VLAN ID) | match vlan
Set traffic classification conditions (VLAN ID range) | match vlan-range
Show class map information | show class-map
Set pre-marking (CoS) | set cos
Set pre-marking (TOS precedence) | set ip-precedence
Set pre-marking (DSCP) | set ip-dscp
Set individual policer / aggregate policer (single rate) | police signle-rate
Set individual policer / aggregate policer (twin rate) | police twin-rate
Set remarking for individual policer / aggregate policer | remark-map
Create aggregate policer | aggregate-police
Show aggregate policer | show aggregate-police
Apply aggregate policer | police-aggregate
Show metering counter | show qos metering-counters
Clear metering counter | clear qos metering-counters
Set egress queue (CoS-Queue) | set cos-queue
Set egress queue (DSCP-Queue) | set ip-dscp-queue
Set egress queue scheduling | qos wrr-weight
Set traffic shaping (individual port) | traffic-shape rate
Set traffic shaping (individual queue) | traffic-shape queue rate

## 5. Examples of Command Execution

### 5.1. Priority control (SP) using DSCP values

This example allocates the transmission queue based on the DSCP value of the frame, for priority control (SP).
When the DSCP = 56, 46, 8, 0 frame is received, large frames for DSCP values from LAN port #3 will be processed with priority by SP priority control.

- DSCP priority control (SP): setting example

- Prioritizing the input frame is done as follows.

  - DSCP = 56 frame is set at priority level 7

  - DSCP = 46 frame is set at priority level 5

  - DSCP = 8 frame is set at priority level 1

  - DSCP = 0 frame is set at priority level 0

1. Enable QoS and set the trust mode for the reception ports (LAN ports #1 and #2).

       Yamaha(config)#qos enable (1)
       Yamaha(config)#interface port1.1 (2)
       Yamaha(config-if)#qos trust dscp (3)
       Yamaha(config-if)#exit
       Yamaha(config)#interface port1.2 (4)
       Yamaha(config-if)#qos trust dscp (5)
       Yamaha(config-if)#exit

   1 | Enable QoS
   2 | Setting for LAN port #1
   3 | Change the trust mode to DSCP
   4 | Setting for LAN port #2
   5 | Change the trust mode to DSCP

2. Set the DSCP - transmission queue ID conversion table.
   As the transmission queue ID corresponding to DSCP value = 46, 56 is the default, there is no need to make this setting, but it is listed for purposes of clarity.

       Yamaha(config)#qos dscp-queue 56 7 (1)
       Yamaha(config)#qos dscp-queue 46 5 (2)
       Yamaha(config)#qos dscp-queue 8 1 (3)
       Yamaha(config)#qos dscp-queue 0 0 (4)

   1 | Store frames with DSCP = 56 in transmission queue #7
   2 | Store frames with DSCP = 46 in transmission queue #5
   3 | Store frames with DSCP = 8 in transmission queue #1
   4 | Store frames with DSCP = 0 in transmission queue #0

3. This sets the scheduling method per transmission queue.
   As this is the default, there is no need to make this setting, but it is listed for purposes of clarity.

       Yamaha(config)# no qos wrr-weight 7 (1)
       Yamaha(config)# no qos wrr-weight 5 (2)
       Yamaha(config)# no qos wrr-weight 1 (3)
       Yamaha(config)# no qos wrr-weight 0 (4)

   1 | Queue: 7 SP method
   2 | Queue: 5 SP method
   3 | Queue: 1 SP method
   4 | Queue: 0 SP method

### 5.2. Priority control (SP+WRR) using an access list

This example classifies traffic by using the source IP address, and sets the priority control (WRR).

- Priority control (SP+WRR) setting example

- Classification conditions and priority setting for input frames

  - The packet from 192.168.10.2 is classified as traffic A, and is set with a priority level of 7 during packet transmission

  - The packet from 192.168.20.2 is classified as traffic B, and is set with a priority level of 6 during packet transmission

  - The packet from 192.168.30.2 is classified as traffic C, and is set with a priority level of 5 during packet transmission

  - The packet from 192.168.40.2 is classified as traffic D, and is set with a priority level of 4 during packet transmission

  - The packet from 192.168.50.2 is classified as traffic E, and is set with a priority level of 3 during packet transmission

  - The packet from 192.168.60.2 is classified as traffic F, and is set with a priority level of 2 during packet transmission

  - The packet from 192.168.70.2 is classified as traffic G, and is set with a priority level of 1 during packet transmission

  - The packet from 192.168.80.2 is classified as traffic H, and is set with a priority level of 0 during packet transmission

- Scheduling method
  Configure the settings in a combination of SP and WRR.

  Queue ID | Method | Weight (%)
  --- | --- | ---
  7 | SP | -
  6 | SP | -
  5 | SP | -
  4 | WRR | 8 (40.0%)
  3 | WRR | 6 (30.0%)
  2 | WRR | 3 (15.0%)
  1 | WRR | 2 (10.0%)
  0 | WRR | 1 (5.0%)

1. This enables QoS, defines the access lists for traffic A–H, and defines the traffic classes that will be set in the LAN ports.

       Yamaha(config)#qos enable (1)
       Yamaha(config)#access-list 1 permit any 192.168.10.2 0.0.0.0 any (2)
       Yamaha(config)#class-map cmap-A
       Yamaha(config-cmap)#match access-list 1
       Yamaha(config-cmap)#exit
       Yamaha(config)#access-list 2 permit any 192.168.20.2 0.0.0.0 any (3)
       Yamaha(config)#class-map cmap-B
       Yamaha(config-cmap)#match access-list 2
       Yamaha(config-cmap)#exit
       Yamaha(config)#access-list 3 permit any 192.168.30.2 0.0.0.0 any (4)
       Yamaha(config)#class-map cmap-C
       Yamaha(config-cmap)#match access-list 3
       Yamaha(config-cmap)#exit
       Yamaha(config)#access-list 4 permit any 192.168.40.2 0.0.0.0 any (5)
       Yamaha(config)#class-map cmap-D
       Yamaha(config-cmap)#match access-list 4
       Yamaha(config-cmap)#exit
       Yamaha(config)#access-list 5 permit any 192.168.50.2 0.0.0.0 any (6)
       Yamaha(config)#class-map cmap-E
       Yamaha(config-cmap)#match access-list 5
       Yamaha(config-cmap)#exit
       Yamaha(config)#access-list 6 permit any 192.168.60.2 0.0.0.0 any (7)
       Yamaha(config)#class-map cmap-F
       Yamaha(config-cmap)#match access-list 6
       Yamaha(config-cmap)#exit
       Yamaha(config)#access-list 7 permit any 192.168.70.2 0.0.0.0 any (8)
       Yamaha(config)#class-map cmap-G
       Yamaha(config-cmap)#match access-list 7
       Yamaha(config-cmap)#exit
       Yamaha(config)#access-list 8 permit any 192.168.80.2 0.0.0.0 any (9)
       Yamaha(config)#class-map cmap-H
       Yamaha(config-cmap)#match access-list 8
       Yamaha(config-cmap)#exit

   1 | Enable QoS
   2 | Traffic A
   3 | Traffic B
   4 | Traffic C
   5 | Traffic D
   6 | Traffic E
   7 | Traffic F
   8 | Traffic G
   9 | Traffic H

2. This reverts the CoS - transmission queue ID conversion table to the default setting.

       Yamaha(config)#no qos cos-queue 0
       Yamaha(config)#no qos cos-queue 1
       Yamaha(config)#no qos cos-queue 2
       Yamaha(config)#no qos cos-queue 3
       Yamaha(config)#no qos cos-queue 4
       Yamaha(config)#no qos cos-queue 5
       Yamaha(config)#no qos cos-queue 6
       Yamaha(config)#no qos cos-queue 7

3. Generate and apply the policy to LAN port #1 (port1.1).
   This sets a transmission queue with CoS value 7 to traffic-A, and a transmission queue with CoS value 6 to traffic-B.

       Yamaha(config)#policy-map pmap1
       Yamaha(config-pmap)#class cmap-A
       Yamaha(config-pmap-c)#set cos-queue 7 (1)
       Yamaha(config-pmap-c)#exit
       Yamaha(config-pmap)#class cmap-B
       Yamaha(config-pmap-c)#set cos-queue 6 (2)
       Yamaha(config-pmap-c)#exit
       Yamaha(config-pmap)#exit
       Yamaha(config)#interface port1.1 (3)
       Yamaha(config-if)#service-policy input pmap1 (4)
       Yamaha(config-if)# exit

   1 | Traffic-A is given local priority 7
   2 | Traffic-B is given local priority 6
   3 | LAN port #1
   4 | Apply the policy to received frames

4. Generate and apply the policy to LAN port #2 (port1.2).
   This sets a transmission queue with CoS value 5 to traffic-C, and a transmission queue with CoS value 4 to traffic-D.

       Yamaha(config)#policy-map pmap2
       Yamaha(config-pmap)#class cmap-C
       Yamaha(config-pmap-c)#set cos-queue 5 (1)
       Yamaha(config-pmap-c)#exit
       Yamaha(config-pmap)#class cmap-D
       Yamaha(config-pmap-c)#set cos-queue 4 (2)
       Yamaha(config-pmap-c)#exit
       Yamaha(config-pmap)#exit
       Yamaha(config)#interface port1.2 (3)
       Yamaha(config-if)#service-policy input pmap2 (4)
       Yamaha(config-if)# exit

   1 | Traffic-C is given local priority 5
   2 | Traffic-D is given local priority 4
   3 | LAN port #2
   4 | Apply the policy to received frames

5. Generate and apply the policy to LAN port #3 (port1.3).
   This sets a transmission queue with CoS value 3 to traffic-E, and a transmission queue with CoS value 0 to traffic-F.

       Yamaha(config)#policy-map pmap3
       Yamaha(config-pmap)#class cmap-E
       Yamaha(config-pmap-c)#set cos-queue 3 (1)
       Yamaha(config-pmap-c)#exit
       Yamaha(config-pmap)#class cmap-F
       Yamaha(config-pmap-c)#set cos-queue 0 (2)
       Yamaha(config-pmap-c)#exit
       Yamaha(config-pmap)#exit
       Yamaha(config)#interface port1.3 (3)
       Yamaha(config-if)#service-policy input pmap3  (4)
       Yamaha(config-if)# exit

   1 | Traffic-E is given local priority 3
   2 | Traffic-F is given local priority 2
   3 | LAN port #3
   4 | Apply the policy to received frames

6. Generate and apply the policy to LAN port #4 (port1.4).
   This sets a transmission queue with CoS value 2 to traffic-G, and a transmission queue with CoS value 1 to traffic-H.

       Yamaha(config)#policy-map pmap4
       Yamaha(config-pmap)#class cmap-G
       Yamaha(config-pmap-c)#set cos-queue 2 (1)
       Yamaha(config-pmap-c)#exit
       Yamaha(config-pmap)#class cmap-H
       Yamaha(config-pmap-c)#set cos-queue 1 (2)
       Yamaha(config-pmap-c)#exit
       Yamaha(config-pmap)#exit
       Yamaha(config)#interface port1.4 (3)
       Yamaha(config-if)#service-policy input pmap4 (4)
       Yamaha(config-if)#exit

   1 | Traffic-G is given local priority 1
   2 | Traffic-H is given local priority 0
   3 | LAN port #4
   4 | Apply the policy to received frames

7. This sets the scheduling method for the transmission queue.
   As the queue IDs 5, 6, and 7 are the defaults, there is no need to make this setting, but it is listed for purposes of clarity.

       Yamaha(config)#qos wrr-weight 0 1 (1)
       Yamaha(config)#qos wrr-weight 1 2 (2)
       Yamaha(config)#qos wrr-weight 2 3 (3)
       Yamaha(config)#qos wrr-weight 3 6 (4)
       Yamaha(config)#qos wrr-weight 4 8 (5)
       Yamaha(config)#no qos wrr-weight 5 (6)
       Yamaha(config)#no qos wrr-weight 6 (7)
       Yamaha(config)#no qos wrr-weight 7 (8)

   1 | Transmission queue 0: WRR method, weight of 1
   2 | Transmission queue 1: WRR method, weight of 2
   3 | Transmission queue 2: WRR method, weight of 3
   4 | Transmission queue 3: WRR method, weight of 6
   5 | Transmission queue 4: WRR method, weight of 8
   6 | Transmission queue 5: SP method
   7 | Transmission queue 6: SP method
   8 | Transmission queue 7: SP method

### 5.3. Priority control using port priority trust mode

The transmission queue is determined according to the port priority order that is specified for each reception port.

- Priority control using port priority: setting example

- Set priority for each reception port

  - Set LAN port #1 (port1.1) to priority order 6.

  - Set LAN port #2 (port1.2) to priority order 4.

  - Set LAN port #3 (port1.3) to priority order 2.

1. Enable QoS and set the trust mode for the reception ports (LAN ports #1, #2, and #3).

       Yamaha(config)#qos enable (1)
       Yamaha(config)#interface port1.1 (2)
       Yamaha(config-if)#qos trust port-priority (3)
       Yamaha(config-if)#qos port-priority-queue 6 (4)
       Yamaha(config-if)#exit
       Yamaha(config)#interface port1.2 (5)
       Yamaha(config-if)#qos trust port-priority (6)
       Yamaha(config-if)#qos port-priority-queue 4 (7)
       Yamaha(config-if)#exit
       Yamaha(config)#interface port1.3 (8)
       Yamaha(config-if)#qos trust port-priority (9)
       Yamaha(config-if)#qos port-priority-queue 2 (10)
       Yamaha(config-if)#exit

   1 | Enable QoS
   2 | Setting for LAN port #1
   3 | Change the trust mode to “port priority”
   4 | Set the port priority to 6
   5 | Setting for LAN port #2
   6 | Change the trust mode to “port priority”
   7 | Set the port priority to 4
   8 | Setting for LAN port #3
   9 | Change the trust mode to “port priority”
   10 | Set the port priority to 2

### 5.4. Bandwidth control using access list (twin rate / individual policer)

This example sets bandwidth control by using the source IP address. A twin rate policer and an individual policer are used for metering.

- Bandwidth control setting example

- Classification conditions and bandwidth limits for input frames

  - Packets from 192.168.10.2 are classified as traffic A packets, with a committed information rate (CIR) (guaranteed reception rate) of 25 Mbps.

  - Packets from 192.168.20.2 are classified as traffic B packets, with a committed information rate (CIR) (guaranteed reception rate) of 15 Mbps.

  - Packets from 192.168.30.2 are classified as traffic C packets, with a committed information rate (CIR) (guaranteed reception rate) of 10 Mbps.

1. Enable QoS, define the access lists for traffic A–C, and define the traffic classes that will be set for the LAN ports.

       Yamaha(config)#qos enable (1)
       Yamaha(config)#access-list 1 permit any 192.168.10.2 0.0.0.0 any (2)
       Yamaha(config)#class-map cmap-A
       Yamaha(config-cmap)#match access-list 1
       Yamaha(config-cmap)#exit
       Yamaha(config)#access-list 2 permit any 192.168.20.2 0.0.0.0 any (3)
       Yamaha(config)#class-map cmap-B
       Yamaha(config-cmap)#match access-list 2
       Yamaha(config-cmap)#exit
       Yamaha(config)#access-list 3 permit any 192.168.30.2 0.0.0.0 any (4)
       Yamaha(config)#class-map cmap-C
       Yamaha(config-cmap)#match access-list 3
       Yamaha(config-cmap)#exit

   1 | Enable QoS
   2 | Traffic A
   3 | Traffic B
   4 | Traffic C

2. Generate and apply the policy to LAN port #1 (port1.1).
   Individually specify metering for traffic A through traffic C.
   In the twin rate policer, bandwidth for green can be allocated (guaranteed) by discarding yellow and red.

       Yamaha(config)#policy-map pmap1
       Yamaha(config-pmap)#class cmap-A (1)
       Yamaha(config-pmap-c)#police twin-rate 25000 25000 156 50 yellow-action drop red-action drop
       Yamaha(config-pmap-c)#exit
       Yamaha(config-pmap)#class cmap-B (2)
       Yamaha(config-pmap-c)#police twin-rate 15000 15000 93 50 yellow-action drop red-action drop
       Yamaha(config-pmap-c)#exit
       Yamaha(config-pmap)#class cmap-C (3)
       Yamaha(config-pmap-c)#police twin-rate 10000 10000 62 50 yellow-action drop red-action drop
       Yamaha(config-pmap-c)#exit
       Yamaha(config-pmap)#exit
       Yamaha(config)#interface port1.1 (4)
       Yamaha(config-if)#service-policy input pmap1 (5)
       Yamaha(config-if)#exit

   1 | Traffic-A metering setting
   2 | Traffic-B metering setting
   3 | Traffic-C metering setting
   4 | LAN port 1
   5 | Apply the policy to received frames The metering setting values are shown below. Metering type: Twin rate policer Traffic-A: CIR, PIR (25,000 kbps), CBS (156 kbyte), PBS (50 kbyte) Traffic-B: CIR, PIR (15,000 kbps), CBS (93 kbyte), PBS (50 kbyte) Traffic-C: CIR, PIR (10,000 kbps), CBS (62 kbyte), PBS (50 kbyte) The following calculation is used to find the CBS, with a round-trip time of 0.05 sec. CBS = CIR (bps) ÷ 8 (bit) × 0.05 (second)

### 5.5. Bandwidth control using access list (single rate / aggregate policer)

This example sets bandwidth control by using the source IP address. A single rate policer and an aggregate policer are used for metering.

- Bandwidth control setting example

- Classification conditions and bandwidth limits for input frames

  - Packets from 192.168.10.2 are classified as traffic A.

  - Packets from 192.168.20.2 are classified as traffic B.

  - Packets from 192.168.30.2 are classified as traffic C.

  - The reception rate is restricted to 25 Mbps for traffic A, B, and C collectively.

  - Bandwidth class “yellow” is remarked as DSCP = 0, and sent with low priority.

1. Enable QoS, define the access lists for traffic A–C, and define the traffic classes that will be set for the LAN ports.

       Yamaha(config)#qos enable (1)
       Yamaha(config)#access-list 1 permit any 192.168.10.2 0.0.0.0 any (2)
       Yamaha(config)#class-map cmap-A
       Yamaha(config-cmap)#match access-list 1
       Yamaha(config-cmap)#exit
       Yamaha(config)#access-list 2 permit any 192.168.20.2 0.0.0.0 any (3)
       Yamaha(config)#class-map cmap-B
       Yamaha(config-cmap)#match access-list 2
       Yamaha(config-cmap)#exit
       Yamaha(config)#access-list 3 permit any 192.168.30.2 0.0.0.0 any (4)
       Yamaha(config)#class-map cmap-C
       Yamaha(config-cmap)#match access-list 3
       Yamaha(config-cmap)#exit

   1 | Enable QoS
   2 | Traffic A
   3 | Traffic B
   4 | Traffic C

2. Set the DSCP–transmission queue ID conversion table.
   Assign the lowest-priority transmission queue to the DSCP value (0) used for remarking “yellow.”

       Yamaha(config)#qos dscp-queue 0 0

3. Create an aggregate policer.

       Yamaha(config)#aggregate-police agp1 (1)
       Yamaha(config-agg-policer)#police single-rate 25000 156 50 yellow-action remark red-action drop
       Yamaha(config-agg-policer)#remark-map yellow ip-dscp 0
       Yamaha(config-agg-policer)#exit

   1 | Create an aggregate policer The aggregate policer’s metering setting values are as follows. Metering type: Single rate policer Remark “yellow” to DSCP value = 0 CIR (25,000 kbps), CBS (156 kbyte), EBS (50 kbyte) The following calculation is used to find the CBS, with a round-trip time of 0.05 sec. CBS = CIR (bps) ÷ 8 (bit) × 0.05 (second)

4. Generate and apply the policy to LAN port #1 (port1.1).
   Specify metering (aggregate policer) for the aggregated traffic of A through C.

       Yamaha(config)#policy-map pmap1
       Yamaha(config-pmap)#class cmap-A (1)
       Yamaha(config-pmap-c)#police-aggregate agp1
       Yamaha(config-pmap-c)#exit
       Yamaha(config-pmap)#class cmap-B (2)
       Yamaha(config-pmap-c)#police-aggregate agp1
       Yamaha(config-pmap-c)#exit
       Yamaha(config-pmap)#class cmap-C (3)
       Yamaha(config-pmap-c)#police-aggregate agp1
       Yamaha(config-pmap-c)#exit
       Yamaha(config-pmap)#exit
       Yamaha(config)#interface port1.1 (4)
       Yamaha(config-if)#service-policy input pmap1 (5)
       Yamaha(config-if)#exit

   1 | Traffic-A metering setting
   2 | Traffic-B metering setting
   3 | Traffic-C metering setting
   4 | LAN port 1
   5 | Apply the policy to received frames

## 6. Points of Caution

- LAN/SFP ports that use settings different from those shown below cannot be aggregated as a logical interface.

  - Trust mode

  - Default CoS

  - Port priority

- LAN/SFP ports on which policy maps have been applied cannot belong to a logical interface.

- Policy maps cannot be applied to a LAN/SFP port that belongs to a logical interface.

- Conditions might not be determined correctly for fragment packets. Specifically, if layer 4 information (source port number, destination port number, and various TCP flags) is included in the conditions, correct information cannot be determined because the information is not included in the second and subsequent fragment packets. If there is a possibility of processing fragment packets, do not include layer 4 information in the conditions.

## 7. Related Documentation

None

## 8. Trademarks and Trade Names

- Zoom is a trademark or registered trademark of Zoom Video Communications, Inc. in the United States and other countries.

- Microsoft Teams is a trademark or registered trademark of Microsoft Corporation in the United States and other countries.

Search result
No more search results.
There are no topics that match your search query.