< Home

Overview of MQC

Modular QoS Command-Line Interface (MQC) allows you to classify packets based on packet characteristics and specify the same service for packets of the same type. This allows different types of packets to be provided with differentiated services.

As more services are deployed on a network, service deployment becomes increasingly complex because traffic of different services or users requires differentiated services. Using MQC configuration, you can classify network traffic in a fine-grained way and specify the services provided to different types of traffic according to your needs. MQC enhances serviceability of your network.

MQC Entities

MQC involves three entities: traffic classifier, traffic behavior, and traffic policy.

Traffic classifier

A traffic classifier defines a group of traffic matching rules to classify packets. When configuring a traffic classifier, you need to specify the following items:
  • Name of a traffic classifier
  • Traffic classification rule
  • Relationship between multiple traffic classification rules in a traffic classifier
Traffic classification rules are classified into Layer 2 rules, Layer 3 rules, basic ACL6 rules, advanced ACL6 rules, and user-defined ACL rules, as listed in Table 1.
Table 1 Traffic classification rules

Type

Traffic Classification Rule

Layer 2 rule

  • Destination MAC address
  • Source MAC address
  • VLAN ID in the outer tag of VLAN-tagged packets
  • 802.1p priority in the outer tag of VLAN-tagged packets
  • VLAN ID in the inner tag of VLAN-tagged packets
  • 802.1p priority in the inner tag of VLAN-tagged packets
  • Protocol field in the Layer 2 header: The device supports Layer 2 protocols including ARP, IP, MPLS, and RARP.
  • Matching fields in ACL 4000 to ACL 4999: Traffic is classified based on Layer 2 ACLs.
  • Discarded packets: Discarded packets are matched, and actions such as traffic statistics collection and mirroring are performed on them for analysis.
  • All packets: All data packets can be classified if they need to be centrally processed.
  • Inbound interface
  • Outbound interface

Layer 3 rule

  • DSCP priority in IP packets
  • IP precedence in IP packets
  • IP protocol type (IPv4 or IPv6)
  • TCP-flag in TCP packets
  • Matching fields in ACL 2000 to ACL 3999
  • VNI ID of inner VXLAN packets

Basic ACL6 rule

Matching fields in ACL6 2000 to ACL6 2999

Advanced ACL6 rule

Matching fields in ACL6 3000 to ACL6 3999

User-defined ACL rule

Matching fields in ACL 5000 to ACL 5999

The relationship between rules in a traffic classifier can be AND or OR. The default relationship is OR.
  • OR: A packet matches a traffic classifier if it matches one of the rules.

  • AND: If a traffic classifier contains ACL rules, a packet matches the traffic classifier only if it matches one ACL rule and all the non-ACL rules. If a traffic classifier does not contain ACL rules, a packet matches the traffic classifier only if it matches all the rules in the classifier.

Traffic classifier c1 is used as an example. It includes the following rules:
  • ACL rules:
    • Matching ACL 3000
    • Matching ACL 3001
  • Non-ACL rules:
    • Matching packets tagged with VLAN 10
    • Matching packets with the inbound interface being GE0/0/1

If the relationship between rules in traffic classifier c1 is OR, a packet matches traffic classifier c1 if it meets any of the preceding rules.

If the relationship between rules in traffic classifier c1 is AND, a packet matches traffic classifier c1 only when it meets the preceding rules: The VLAN ID is 10, the inbound interface is GE0/0/1, and ACL 3000 or 3001 is matched.

Traffic behavior

A traffic behavior defines an action for packets of a specified type. When configuring a traffic behavior, you need to specify the following items:
  • Name of a traffic behavior
  • Action in a traffic behavior
The switch supports actions including packet filtering, priority re-marking, flow ID re-marking, redirection, traffic policing, and traffic statistics collection. If multiple non-conflicting actions are defined in a traffic behavior, these actions can be configured successfully and all of them take effect. If multiple actions in a traffic behavior conflict, either of the following situations will occur:
  • When conflicting actions are defined in the traffic behavior view, the system reports an error, and the command fails to be executed.
  • When a traffic policy is applied, the system reports an error, and the traffic policy fails to be applied.

Traffic policy

In Figure 1, a traffic policy binds traffic classifiers and traffic behaviors, and then actions defined in traffic behaviors are taken for classified packets.
Figure 1 Traffic classifiers and traffic behaviors in a traffic policy
When configuring and applying a traffic policy, you need to specify the following items:
  • Name of a traffic policy
  • Association between a traffic classifier and traffic behavior, which specify the actions to be performed for packets matching a traffic classifier
  • View in which a traffic policy is applied, for example, interface view, VLAN view, or system view
  • Direction in which a traffic policy is applied: When applying a traffic policy, you can specify the inbound or outbound parameter to implement policy control on incoming or outgoing packets.

MQC Configuration Process

Figure 2 outlines the MQC configuration process in the following steps:
  1. Configure a traffic classifier. The traffic classifier defines a group of matching rules to classify packets and is the basis for providing differentiated services.

  2. Configure a traffic behavior. The traffic behavior defines a flow control or resource allocation action for packets matching traffic classification rules.

  3. Configure a traffic policy. Create a traffic policy and bind specified traffic classifiers and traffic behaviors to it.

  4. Apply a traffic policy. Apply the traffic policy to the system, an interface, or a VLAN.

Figure 2 MQC configuration process

Relevant Information

Technology Forum

QoS Issues - Issue 2 QoS Implementation - MQC

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >