配置实例:
一家公司需求;HTTP流量保障256Kbps带宽,FTP流量保证512Kbps带宽,禁止BT流量.
CBWFQ(config)#
CBWFQ(config)#class-map class_HTTP //定义一个匹配HTTP的类//
CBWFQ(config-cmap)#match protocol http
CBWFQ(config)#
CBWFQ(config)#class-map class_FTP
CBWFQ(config-cmap)#match protocol ftp
CBWFQ(config)#
CBWFQ(config)#class-map class_BT
CBWFQ(config-cmap)#match protocol bittorrent
CBWFQ(config)#
CBWFQ(config)#policy-map CBWFQ //定义策略,调用类class//
CBWFQ(config-pmap)#class class_HTTP
CBWFQ(config-pmap-c)#bandwidth 256
CBWFQ(config-pmap)#
CBWFQ(config-pmap)#class class_FTP
CBWFQ(config-pmap-c)#bandwidth 512
CBWFQ(config-pmap)#
CBWFQ(config-pmap)#class class_BT
CBWFQ(config-pmap-c)#drop
CBWFQ(config-pmap)#
CBWFQ(config-pmap)#class class-default
CBWFQ(config-pmap-c)#fair-queue //网络中剩下的流量除了HTTP,FTP之使用WFQ放到fair-queue中了//
CBWFQ(config)#
CBWFQ#
CBWFQ(config)#int s0/0
CBWFQ(config-if)#service-policy output CBWFQ
转载于:https://blog.51cto.com/104251/987088