QoS mechanisms——分类(MQC)

用MQC进行分类
分类可选的配置是用class map进行的,再用policy map进行调用进行使其生效,MQC分类可用以下方式:
三层
access list
ip precedence value
ip dscp value

QoS group number
MPLS experimental bits(EXP位)
protocol(including NBAR)
using another class map(class map的嵌套)
frame relay DE bit
二层
IEEE 802.1Q/ISL CoS
priority values
input interface
source MAC address
destination MAC address
RTP(UDP) port range
any packet

configuring classification with MQC
在这里插入图片描述1.进入class map配置模式
2.名称最多可以有40个字母数字字符。
3.match all 是默认的匹配策略(matching strategy)
在这里插入图片描述至少使用一个条件来匹配数据包
在这里插入图片描述
一个class map可以用另外一个class map进行分类(简单理解就是嵌套)
举例
1.access-list
access-list 100 permit tcp any any lt 1024 /lt小于等于1024的端口
class-map cisco
match access-group 100
2.ip precedence
class-map IPP
match ip precedence <0-7>
在这里插入图片描述
3.ip dscp value
class-map dscp
match dscp 1 /匹配ipv4和ipv6dscp值为1
match ip dscp 1 /匹配ipv4的dscp值为1
match ip dscp af31 af32 af33 cs3
4.QoS group number
路由器内部使用标签,不会在网络中传递,而其他DSCP IPP都能够往下传递。
流量进入,打上QoS group标记
匹配该标记的流量,做策略,这样可以保证QoS group标记不会传递下去。
定义流量—class-map
设置策略—policy-map
应用策略—service-policy


access-list 100 permit icmp host 1.1.1.1 host 2.2.2.2
class-map qosgroup
  match access-group 100
policy-map qosgroup
  class qosgroup
  set qos-group 123
interface FastEthernet0/0
 service-policy input qosgroup
将1.1.1.1 ping 2.2.2.2的流量设置为qos-group 123
class-map 100k
  match qos-group 123
policy-map 100k
  class 100k
  bandwidth 100
interface FastEthernet0/0
 service-policy output 100k
R1#show policy-map interface f0/0

5、MPLS experimental bits

class-map test
 match mpls experimental topmost 5   匹配EXP的顶层标签 
policy-map x
 class qosgroup
  set mpls experimental topmost 5

6.Protocol (including NBAR)

class-map test
 match protocol …….

7、Using another class map

Class-map Unknown-services
  match not class-map Well-known-services 

8、Frame Relay DE bit

class-map test
 match fr-de

9、IEEE 802.1Q/ISL CoS/Priority values

class-map test
 match cos <0-7>

10、Input interface

class-map match-any Ethernets
  match input-interface Ethernet0/0
  match input-interface Ethernet0/1

11、Source MAC address

class-map test
 match source-address mac aaaa.bbbb.cccc

12、Destination MAC address

class-map test
 match destination-address mac aaaa.bbbb.cccc

13、RTP (UDP) port range

match ip rtp starting-port-number port-range
class-map RTP
  match ip rtp 16384 16383  范围
RTP 承载语音视频流量,实际上匹配的是UDP端口号

14、Any packet

Class-map All-services
  match any 
发布了231 篇原创文章 · 获赞 222 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/qinshangwy/article/details/104902621
QOS