MQC策略已下发到接口GE3/1/1,不删除此接口上的MQC策略,直接在流行为中添加流动作。
图1 动态MQC配置组网图
l 配置acl 2000,匹配源IP为1.1.1.1的数据流
l
配置流分类test_class,匹配acl 2000
l
配置流行为test_behavior,动作为accounting
l
配置QoS策略test_policy,绑定流分类和流行为
l
将QoS策略下发到端口GE3/1/1
l
不删除接口GE3/1/1的QoS策略,在流行为中添加filter
deny动作
#
定义ACL 2000,匹配源IP为1.1.1.1的数据流
[H3C]
acl number 2000
[H3C-acl-basic-2000]
rule 0 permit source 1.1.1.1 0
#
定义流分类test_class,匹配acl 2000
[H3C]
traffic classifier test_class
[H3C-classifier-test_class]
if-match acl 2000
#
定义流行为test_behavior,动作为accounting
[H3C]
traffic behavior test_behavior
[H3C-behavior-test_behavior]
accounting
#
定义QoS策略test_policy,绑定流行为和流动作
[H3C]
qos policy test_policy
[H3C-qospolicy-test_policy]
classifier test_class behavior test_behavior
#
将QoS策略下发到接口g3/1/1入方向
[H3C]
interface GigabitEthernet 3/1/1
[H3C-GigabitEthernet3/1/1]
qos apply policy test_policy inbound
#
验证配置信息
[H3C-GigabitEthernet3/1/1]
display qos policy interface GigabitEthernet 3/1/1
Interface:
GigabitEthernet3/1/1
Direction: Inbound
Policy:
test_policy
Classifier:
test_class
Operator:
AND
Rule(s) : If-match acl
2000
Behavior:
test_behavior
Accounting
Enable:
0
(Packets)
0
(Bytes)
#
不删除接口上下发的策略,直接在流行为中添加流动作filter deny
[H3C]traffic
behavior test_behavior
[H3C-behavior-test_behavior]filter
deny
Please
Wait...
Done.
#
验证添加流动作后的信息
[H3C]dis
qos policy interface GigabitEthernet 3/1/1
Interface:
GigabitEthernet3/1/1
Direction: Inbound
Policy:
test_policy
Classifier:
test_class
Operator:
AND
Rule(s) : If-match acl
2000
Behavior:
test_behavior
Accounting
Enable:
0
(Packets)
0
(Bytes)
Filter Enable: deny
& 说明:
l
动态MQC可以动态添加/删除/修改流分类,流行为,QoS策略,但不能动态修改ACL中rule。
l
本文档不严格与具体软、硬件版本对应。