1、交换机QOS配置模板交换机QOS配置模板2009-5-12 来源:ruijie 作者:ruijie 【大 中 小】 点击:728 次 police在class 配置模式下使用此命令为该数据流中定义policer,目前的policer 支持限制该数据流的带宽和为带宽超限部分指定处理动作。police rate-bps burst-byte exceed-actiondrop | dscp dscp-valuerate-bps 每秒钟的带宽限制量,对于10/100M 以太网接口来说取值范围是1100Mbsp,对于1000M 以太网接口来说取值范围是81000Mbsp。burst-byte 猝发流量
2、限制值,单位是比特(byte)。exceed-action drop 丢弃带宽超限部分的报文。exceed-action dscp dscp-value 改写带宽超限部分报文的DSCP 值。dscp-value 的取值范围是0, 8, 10, 16, 18, 24, 26, 32, 34, 40, 46, 48, 56.缺省值缺省没有设置任何policer。命令模式class 配置模式。使用指导目前的policer 支持限制该数据流的带宽和为带宽超限部分指定处理动作;rate-bps是每秒钟的带宽限制量,对于10/100M 以太网接口来说取值范围是1100Mbsp,对于1000M 以太网接口来
3、说取值范围是81000Mbsp; burst-byte是猝发流量限制值,单位是比特(byte)。您可以在命令中指定关键字drop 来丢弃带宽超限部分的报文;您也可以在命令各种指定dscpdscp-value来改写带宽超限部分报文的DSCP 值;使用show policy-map 命令查看设置。配置示例:Switch(config)#access-list 15 permit tcp host 192.1.1.1Switch(config)#class-map class1Switch(config-cmap)#match access-group 15Switch(config-cmap)#e
4、xitSwitch(config)# policy-map policy1Switch(config-pmap)#class class1Switch(config-pmap-c)#police 100000 exceed-action dscp 22Switch(config-pmap-c)#set ip dscp 8Switch(config-pmap-c)#exitSwitch(config-pmap)#exitSwitch(config)#interface fastethernet 0/2Switch(config-if)#service-policy input policy命令描
5、述class-map 创建一个class map,并进入class map 配置模式。match access-group 创建一个class map 的匹配标准。policy-map 创建一个policy map,并进入policy map 配置模式。class 创建一个在该policy map 中使用的数据分类,并进入数据分类配置模式。set ip dscp 为该数据流中的IP 报文设置新的ip dscp 值。相关命令show policy-map 显示一个QoS policy map 实体的内容。 policy-map创建一个policy map,并进入policy map 配置模式。使
6、用该命令的no 选项删除policy map。policy-map policy-map-nameno policy-map policy-map-name语法描述policy-map-name policy map 的名字。缺省值缺省没有设置任何policy map。使用指导使用show policy-map 命令查看设置。范例以下的设置步骤创建了一个名为policy1 的policy-map:并进入policy-map 模式:Switch(config)# policy-map policy1Switch(config-pmap)#命令描述show policy-map 显示一个QoS p
7、olicy map 实体的内容。 例:带宽限制为2M,burst-byte是猝发流量限制值32768 (32K burst bytes) 配置模版: config tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#policy-map test2006-04-10 08:45:40 5-CONFIG:Configured from outbandSwitch(config-pmap)#exit2006-04-10 08:45:42 5-CONFIG:Configured from outban
8、dSwitch(config)#class test12006-04-10 08:45:57 5-CONFIG:Configured from outbandSwitch(config-cmap)#exit2006-04-10 08:46:07 5-CONFIG:Configured from outbandSwitch(config)#policy-map test2006-04-10 08:46:15 5-CONFIG:Configured from outbandSwitch(config-pmap)#class test12006-04-10 08:46:22 5-CONFIG:Con
9、figured from outbandSwitch(config-pmap-c)#police ? Bits per second (1M - 100M and multiple of 1M for ports on static module; 8M - 1000M and multiple of 8M for portson dynamic module) Switch(config-pmap-c)#police 2000000 ? 131072 128K burst bytes (valid for only Gigabit ports) 16384 16K burst bytes 2
10、62144 256K burst bytes (valid for only Gigabit ports) 32768 32K burst bytes 4096 4K burst bytes 524288 512K burst bytes (valid for only Gigabit ports) 65536 64K burst bytes 8192 8K burst bytes Switch(config-pmap-c)#police 2000000 32768 ? exceed-action When the specified rate is exceeded, specify tha
11、t the switch actions Switch(config-pmap-c)#police 2000000 32768 2006-04-10 08:57:31 5-CONFIG:Configured from outbandSwitch(config-pmap-c)#end2006-04-10 08:58:01 5-CONFIG:Configured from outbandSwitch#wrBuilding configuration.OKSwitch#show policy-map Policy Map Name: test Class Map Name: test1 Rate b
12、ps limit(bps): 2000000 Burst byte limit(byte): 32768 Exceed-action: drop Switch#config tSwitch(config)#interface f 0/2Switch(config-if)#service-policy input test2006-04-10 09:18:20 5-CONFIG:Configured from outbandSwitch(config-if)#end2006-04-10 09:18:26 5-CONFIG:Configured from outbandSwitch#show po
13、licy-map Policy Map Name: test Class Map Name: test1 Rate bps limit(bps): 2000000 Burst byte limit(byte): 32768 Exceed-action: drop Switch# s2126g配置实例: Building configuration.Current configuration : 3292 bytes !version 1.0!hostname Switchvlan 1!vlan 539!vlan 601.vlan 620!ip access-list extended qos
14、permit ip any any!class-map qos match access-group qos!policy-map qos class qos police 8000000 131072!interface fastEthernet 0/1 dot1x port-control auto dot1x dynamic-vlan enable. interface fastEthernet 0/24dot1x port-control auto dot1x dynamic-vlan enable !interface gigabitEthernet 2/1 switchport mode trunk service-policy input qos!end该文章转自大赛人网站(技能大赛技术资源网)-DasaiR 原文链接:
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1