📜 ⬆️ ⬇️

Cisco Modular Command Line QoS

Good afternoon, in this article I would like to talk a little about the method of constructing QoS rules in Cisco devices. First I want to give a brief definition of the concept of QoS.
QoS is the ability of a network to provide improved service for network traffic, regardless of the technologies selected, including Frame Relay, ATM, Ethernet or IP network with routing.
The main function of QoS is to provide improved and more predictable behavior of network services, using mechanisms such as:
We now turn to reviewing the detailed command line QoS control structure in Cisco devices. This model is central to QoS solutions built on the basis of Cisco IOS. In the original, it sounds like a Modular QoS CLI, then I will call it MQC.
MQC divides QoS related tasks into the following modules:

Below is a diagram of the approximate interaction of this algorithm.

image

I will try to take a closer look at the commands related to this configuration mode.
Switch(config)# class-map cisco
Switch(config-cmap)#

The class-map command is used to describe the traffic class.
The traffic class consists of 3 main elements:
data commands.
Below is an example, all the traffic that is allowed through the ACL test will be part of a class known as cisco.
Switch(config)# class-map cisco
Switch(config-cmap)# match access-group name test

The match command is used to define various criteria for classifying packets.
If the package matches the specified criteria:

Packages that do not match the specified criteria:
If there is more than one match in this class, use:
- class-map match-any or
- class-map match-all
If match-any is used, the traffic will move based on the rule, “must meet one of the specified criteria”
If match-all is used, the traffic will move based on the rule, “must meet all specified criteria”
As an example, consider a set of commands:
')
Switch(config)# class-map match-any cisco
Switch(config-cmap)# match access-group name test
Switch(config-cmap)# match interface fastethernet 0/1


If the traffic matches the “allowed” assertion in the test ACL or the traffic is generated by the Fa0 / 1 interface, it will be recognized as part of the traffic known as cisco.
The policy-map command is used to create a traffic policy.
- The assignment of a traffic policy is the configuration of QoS functions that should be associated with traffic that has been classified as user-defined traffic.
The traffic policy also consists of three elements:
Consider an example:

Switch(config)# policy-map policy1
Switch(config-pmap)# class cisco
Switch(config-pmap-c)# bandwidth 3000
Switch(config-pmap)# class class-default
Switch(config-pmap-c)# bandwidth 2000

This policy-map creates a traffic policy called policy1.
Switch(config)# interface fastethernet 0/1
Switch(config-if)# service-policy output policy1


The service policy command is used to attach the traffic policy specified by the policy-map command to an interface.
- It can be applied to both incoming and outgoing packets on the specified interface, so this command should indicate the direction of traffic.
Example:

Switch(config)#interface fastethernet 0/1
Switch(config-if)#service-policy output policy1
Switch(config-if)#exit


All packets leaving the specified interface must be compatible with the criteria specified in the traffic policy named policy1.
Now we will try to combine all that we have got into a single configuration, with some explanations:

1. Add traffic policy to the interface.
Switch(config)#interface fastethernet 0/1
Switch(config-if)#service-policy output policy1
2. Identify the QoS function of this policy using classes.
Switch(config)#policy-map policy1
Switch(config-pmap)#class cisco
Switch(config-pmap-c)#bandwidth 3000
Switch(config-pmap)#class class-default
Switch(config-pmap-c)#bandwidth 2000

3. Classification of traffic flow, as belonging to the specified QoS class.
Switch(config)# class-map match-any cisco
Switch(config-cmap)# match access-group name test
Switch(config-cmap)# match interface fastethernet 0/1


This is how a Cisco IOS based QoS model works, I hope I could at least a little reveal the algorithm of this functionality. Of course, this article is only the tip of the iceberg called QoS, but I hope that it will help you acquire a small base in building QoS policies on Cisco devices.

Source: https://habr.com/ru/post/125368/


All Articles