class-map match-all a match input-interface FastEthernet0/0policy-map a class a set ip precedence 5interface FastEthernet0/0 service-policy output a二层匹配来自相接的对端设备接口MAC地址流量class-map B match source-add mac 0c00.41fc.0000policy-map B class B set ip dscp efint f0/0 service-policy input B
依赖四层或者高层信息来做marking
class-map match-any apple match access-group name tcp match access-group name udpip access-list extended tcp permit tcp any host 44.1.1.1policy-map apple class apple set ip precedence 4int f0/0 service-policy input appleshow policy-map int
class-map match-all C1
match protocol icmpclass-map match-all C2 match ip recedence 1policy-map P1 class C1 bandwidth 20000 分配带宽为20Mb/s class C2 bandwidth 30000int f0/0 service-policy output P1show policy-map
show int f0/0在默认情况下,可用带宽是总带宽的75%。
用百分比方式来配置CB-WFQ
policy-map P1
class C1 bandwidth percent 20 class C2 bandwidth percent 30 class C3 bandwidth remaining percent 20 (剩余方式)int f0/0 service-policy output P1对默认分类的修改从默认的FIFO队列改为WFQ队列。policy-map P1 class class-default fair-queue 修改CB-WFQ可以占用的带宽数值(默认为75%):int f0/0 max-reserved-bandwidth 100采用MQC的方式配置基本的CB-LLQ
ip access-list extended telnet permit tcp host 12.1.1.1 host 12.1.1.2 eq 23class-map telnet match access-group name telnetpolicy-map telnet priority 8 //代表8KB。int f0/0 service-policy output telnet采用带宽百分比的方式配置低延时队列
policy-map telnet class telnet priority percent 10 CB-WRED基于类的WREDip access-list extended udp
permit ip any any precedence 5 permit udp any any eq ntpclass-map match-any udp match access-group name udppolicy-map WRED class udp bandwidth percent 10 random-detectint f0/0 service-policy output WRED