...
In basic mode on ESR routers and WLC controllers, classification (routing traffic to the queue) and relabeling works only on the input (QoS must be enabled on the interface through which traffic arrives).
Configuration algorithm
Step | Description | Command | Keys |
---|---|---|---|
1 | Enable QoS on the interface/tunnel/network bridge. If QoS policy is not assigned on the interface, the interface operates in BasicQoS mode. | esr(config-if-gi)# qos enable | |
2 | Set the trust mode for 802.1p and DSCP codes values in incoming packets (optional). | esr(config)# qos trust <MODE> | <MODE> – trust mode for 802.1p and DSCP codes values, takes one of the following values:
|
3 | Set the match between DSCP codes values of incoming packets and outgoing queues. The given match works for incoming interfaces/tunnels/bridge on which QoS is enabled (optional). | esr(config)# qos map dscp-queue <DSCP> to <QUEUE> | <DSCP> – service classifier in a packet IP header, takes values in the range of [0..63]; <QUEUE> – queue identifier, takes values in the range of [1..8]. Default values:
|
4 | Set the match between 802.1p codes values of incoming packets and outgoing queues. The given match works for incoming interfaces/tunnels/bridge on which QoS is enabled (optional). | esr(config)# qos map cos-queue <COS> to <QUEUE> | <COS> – service classifier in 802.1q packet tag, takes values in the range of [0..7]; <QUEUE> – queue identifier, takes values in the range of [1..8]. Default values:
|
5 | Set the match between DSCP codes values of incoming packets and outgoing DSCP codes (if remarking is required). The given match works for incoming interfaces/tunnels/bridge on which QoS is enabled. | esr(config)# qos map dscp-queue <DSCP> to <DSCP> | <DSCP> – service classifier in a packet IP header, takes values in the range of [0..63]. |
6 | Enable DSCP codes changes according to the DSCP-Mutation table (if remarking is required). | esr(config)# qos dscp mutation | |
7 | Set the number of the default queue to which all traffic except IP falls into the trust mode for DSCP priorities. | esr(config)# qos queue default <QUEUE> | <QUEUE> – queue identifier, takes values in the range of [1..8]. |
8 | Set the amount of priority queues. The remaining queues are weighted (optional). | esr(config)# priority-queue out num-of-queues <VALUE> | <VALUE> – amount of queues, takes values of [0..8], where:
The priority queues are allocated, starting from the 8th one, decreasing the queue number. Default value: 8. |
9 | Define the weights for corresponding weighted queues. | esr(config)# qos wrr-queue <QUEUE> bandwidth <WEIGHT> | <QUEUE> – queue identifier, takes values in the range of [1..8]; <WEIGHT> – weight value, takes values in the range of [1..255]. The default value: weight 1 for all queues. |
10 | Set the outgoing traffic rate limiting for a certain queue or interface in total. The command is relevant only for BasicQoS mode of the interface. If the incoming traffic was classified by advanced QoS, the limiting will not work (if the incoming rate limiting is required). | esr(config-if-gi)# traffic-shape { <BANDWIDTH> [BURST] | | <QUEUE> – queue identifier, takes values in the range of [1..8]. <BANDWIDTH> – average traffic rate in Kbps, takes the value of [3000..10000000] for TengigabitEthernet interfaces and [64..1000000] for other interfaces and tunnels; <BURST> – size of the restrictive threshold in KB, takes the value [4..16000]. 128 KB. Default value: Disabled. |
11 | Set the incoming traffic rate limiting (if the outgoing rate limiting is required). | esr(config-if-gi)# rate-limit <BANDWIDTH> [BURST] | <BANDWIDTH> – average traffic rate in Kbps, takes the value of [3000..10000000] for TengigabitEthernet interfaces and [64..1000000] for other interfaces and tunnels; <BURST> – size of the restrictive threshold in KB, takes the value [4..16000]. 128 KB. Default value: Disabled. |
Configuration example
Objective:
...
In advanced mode on ESR routers, classification of incoming traffic is possible on both incoming and outgoing interfaces.
Step | Description | Command | Keys |
---|---|---|---|
1 | Create access lists to define the traffic to which the advanced QoS should be applied. | See section Access list (ACL) configuration. | |
2 | Create QoS class and switch to the class parameters configuration mode. | esr(config)# class-map <NAME> | <NAME> – name of the class being created, set by the string of up to 31 characters. |
3 | Specify QoS class description (optional). | esr(config-class-map)# description <description> | <description> – up to 255 characters.. |
4 | Specify the traffic related to the configured class by access control list (ACL). | esr(config-class-map)# match access-group <NAME> | <NAME> – access control list name, set by the string of up to 31 characters. |
5 | Specify DSCP code value which will be set in IP packets corresponding to the class being configured (cannot be assigned simultaneously with IP Precedence and CoS fields) (if remarking is required). | esr(config-class-map)# set dscp <DSCP> | <DSCP> – DSCP code value, takes values in the range of [0..63]. |
6 | Specify IP Precedence code value which will be set in IP packets corresponding to the class being configured (cannot be assigned simultaneously with DSCP and CoS fields) (if remarking is required). | esr(config-class-map)# set ip-precedence <IPP> | <IPP> – IP Precedence code value, takes values in the range of [0..7]. |
7 | Specify 802.1p priority value which will be set in packets corresponding to the class being configured (cannot be assigned simultaneously with DSCP and IP Precedence fields) (if remarking is required). | esr(config-class-map)# set сos <COS> | <COS> – priority 802.1p value, takes values of [0..7]. |
8 | Create QoS policy and switch to the policy parameters configuration mode. | esr(config)# policy-map <NAME> esr(config-policy-map)# | <NAME> – name of the policy being created, set by the string of up to 31 characters. |
9 | Specify QoS policy description (optional). | esr(config-policy-map)# description <description> | <description> – up to 255 characters.. |
10 | Set the committed outgoing bandwidth for the policy in total. | esr(config-policy-map)# shape average { <BANDWIDTH> | percent <BANDWIDTH_PERCENT> } [BURST] | <BANDWIDTH> – committed bandwidth in Kbps, takes the value of [64..10000000]; <BANDWIDTH_PERCENT> – committed bandwidth in %, calculated from (in order from higher priority to lower priority value):
Takes value of [1..100]. <BURST> – size of the restrictive threshold in KB, takes the value [128..16000]. 128 KB. |
11 | Enable automatic bandwidth allocation between classes without bandwidth configuration, including the default class (if required). | esr(config-policy-map)# shape auto-distribution | |
12 | Include the specified QoS class in the policy and switch to the class parameters configuration mode within the policy. | esr(config-policy-map)# class <NAME> | <NAME> – name of the class being bound, set by the string of up to 31 characters. When specifying the 'class-default' value, the incoming unclassified traffic falls into the given class. |
13 | Include QoS policy in QoS class to create hierarchical QoS. | esr(config-class-policy-map)# service-policy <NAME> | <NAME> – policy name, set by the string of up to 31 characters. Inserted policy must already be created. |
14 | Set the committed outgoing bandwidth for the class within the policy (if required). | esr(config-class-policy-map)# shape average { <BANDWIDTH> | percent <BANDWIDTH_PERCENT> } [BURST] | <BANDWIDTH> – committed bandwidth in Kbps, takes the value of [64..10000000]; <BANDWIDTH_PERCENT> – committed bandwidth in %, calculated from (in order from higher priority to lower priority value):
Takes value of [1..100]. <BURST> – size of the restrictive threshold in KB, takes the value [4..16000]. Default value: 128 KB. |
15 | Set the shared outgoing bandwidth for a specific class. The class may occupy the bandwidth if a lower priority class has not occupied its committed bandwidth (if required). | esr(config-class-policy-map)# shape peak { <BANDWIDTH> | percent <BANDWIDTH_PERCENT> } [BURST] | |
16 | Specify class operation mode (optional). | esr(config-class-policy-map)# mode <MODE> | <MODE> – class mode:
Default value: FIFO. |
17 | Specify the class priority in WRR process (if required). | esr(config-class-policy-map)# priority class <PRIORITY> | <PRIORITY> – priority of class in WRR process, takes values of [1..8]. Classes with the highest priority are proceeded first. |
18 | Switch the class to the StrictPriority mode and specify the class priority (if required). | esr(config-class-policy-map)# priority level <PRIORITY> | <PRIORITY> – priority level in StrictPriority process, takes values of [1..8]. Classes with the highest priority are proceeded first. The default value: tha class operates in WRR mode, the priority is not specified. |
19 | Specify the limited number of virtual queues (optional). | esr(config-class-policy-map)# fair-queue <QUEUE-LIMIT> | <QUEUE-LIMIT> – limited number of virtual queues, takes values in the range of [16..4096]. Default value: 16. |
20 | Specify the limited number of packets for a virtual queue (optional). | esr(config-class-policy-map)# queue-limit <QUEUE-LIMIT> | <QUEUE-LIMIT> – limited number of packets in a virtual queue, takes values in the range of [2..4096]. Default value: 127. |
21 | Specify RED (Random Early Detection) parameters (if required). | esr(config-class-policy-map)# random-detect <LIMIT> <MIN> <MAX> <APS> <APS-NUM> <PROBABILITY> | <LIMIT> – limited size of a queue in bytes, takes values of in the range of [1..1000000]; <MIN> – minimum size of a queue in bytes, takes value in the range of [1..1000000]; <MAX> – maximum size of a queue in bytes, takes value in the range of [1..1000000]; <APS> – average size of a queue in bytes, takes value in the range of [1..10000000]; <APS-NUM> – number of average size packets allowed for short-term transmission; <PROBABILITY> – probability of packet drop, takes values of [0..100]. When specifying the values, the following rules should be fulfilled:
|
22 | Specify GRED (Generalized Random Early Detection) parameters (if required). | esr(config-class-policy-map)# random-detect queue <QUEUE-NUM> | <QUEUE-NUM> – queue number [1..16]; <DSCP> – DSCP code value, takes values in the range of [0..63]; <IPP> – IP Precedence code value, takes values in the range of [0..7]; <PRECEDENCE> – IP Precedence value [0..7]; <LIMIT> – limited size of a queue in bytes, takes values of in the range of [1..1000000]; <MIN> – minimum size of a queue in bytes, takes value in the range of [1..1000000]; <MAX> – maximum size of a queue in bytes, takes value in the range of [1..1000000]; <APS> – average size of a queue in bytes, takes value in the range of [1..10000000]; <APS-NUM> – number of average size packets allowed for short-term transmission; <PROBABILITY> – probability of packet drop, takes values of [0..100]. When specifying the values, the following rules should be fulfilled:
|
23 | Enable tcp headers compression protocol for the certain class traffic (if required). | esr(config-class-policy-map)# compression header ip tcp | |
24 | Enable QoS on the interface/tunnel/network bridge. | esr(config-if-gi)# qos enable | |
25 | Define the QoS policy on a configured interface/tunnel/network bridge to classify input and prioritize output traffic. | esr(config-if-gi)# service-policy { input | output } <NAME> | <NAME> – QoS policy name, set by the string of up to 31 characters. |
Configuration example
Objective:
...
Блок кода |
---|
esr# do show qos policy statistics gigabitethernet 1/0/20 |
Scroll Pagebreak |
---|