CBQ configuration example

Network requirements

As shown in Figure 21, configure a QoS policy to meet the following requirements:

Before performing the configuration, make sure that:

Configuration procedure

Configure Router A:

# Define three classes to match the IP packets with the DSCP values AF11, AF21, and EF, respectively.

<RouterA> system-view
[RouterA] traffic classifier af11_class
[RouterA-classifier-af11_class] if-match dscp af11
[RouterA-classifier-af11_class] quit
[RouterA]traffic classifier af21_class
[RouterA-classifier-af21_class] if-match dscp af21
[RouterA-classifier-af21_class] quit
[RouterA] traffic classifier ef_class
[RouterA-classifier-ef_class] if-match dscp ef
[RouterA-classifier-ef_class] quit

# Define two traffic behaviors, and enable AF and set a minimum guaranteed bandwidth percentage of 5% in each traffic behavior.

[RouterA] traffic behavior af11_behav
[RouterA-behavior-af11_behav] queue af bandwidth pct 5
[RouterA-behavior-af11_behav] quit
[RouterA] traffic behavior af21_behav
[RouterA-behavior-af21_behav] queue af bandwidth pct 5
[RouterA-behavior-af21_behav] quit

# Define a traffic behavior, and enable EF and set a maximum bandwidth percentage of 30% (both bandwidth and delay are guaranteed for EF traffic) in the traffic behavior.

[RouterA] traffic behavior ef_behav
[RouterA-behavior-ef_behav] queue ef bandwidth pct 30
[RouterA-behavior-ef_behav] quit

# Define a QoS policy and associate the configured traffic behaviors with classes in the QoS policy.

[RouterA] qos policy dscp
[RouterA-qospolicy-dscp] classifier af11_class behavior af11_behav
[RouterA-qospolicy-dscp] classifier af21_class behavior af21_behav
[RouterA-qospolicy-dscp] classifier ef_class behavior ef_behav
[RouterA-qospolicy-dscp] quit

# Apply the QoS policy to the outgoing traffic of ATM PVC ATM 1/0.

[RouterA] interface atm 1/0
[RouterA-atm1/0] ip address 1.1.1.1 255.255.255.0
[RouterA-atm1/0] pvc qostest 0/40
[RouterA-atm-pvc-atm1/0-0/40-qostest] qos apply policy dscp outbound

The configuration enables EF traffic to be forwarded preferentially when congestion occurs.