- 1
- 0
- 约1.22万字
- 约 9页
- 2017-05-27 发布于河南
- 举报
使用rate-limit来限制流量
使用rate-limit来限制流量
?1. 在全局模式下开启cef:
????Router(config)#ip cef
????2. 定义标准或者扩展访问列表:
????Router(config)#access-list 2 permit 55
????3. 在希望限制的端口上进行rate-limit:
????Rounter(config-if)#rate-limit output access-group 2 128000 16000 16000 conform-action transmit exceed-action drop
rate-limit的命令格式:
????#rate-limit {input|output} [access-group number] bps burst-normal burst-max conform-action action exceed-action action
????input|output:这是定义数据流量的方向。
????access-group number:定义的访问列表的号码。
????bps:定义流量速率的上限,单位是bps。
????burst-normal burst-max:定义的数据容量的大小,一般采用8000,16000,32000,单位是字节,当到达的数据超过此容量时,将触发某个动作,丢弃或转发等,从而达到限速的目的。
????conform-action和exceed-action:分别指在速率限制以下的流量和超过速率限制的流量的处理策略。
????action:是处理策略,包括drop和transmit等。
配置指定的访问速率和分布式访问速率策略,你可以使用rate-limit 端口配置命令.移除rate limit配置,在原命令上加上no移除.指令:rate-limit {input | output} [access-group [rate-limit] acl-index] bps burst-normal burst-max conform-action conform-action exceed-action exceed-actionno rate-limit {input | output} [access-group [rate-limit] acl-index] bps burst-normal burst-max conform-action conform-action exceed-action conform-action参数描述: input?? ??在入口上对接受的packets应用一个访问速率策略output ?? 在出口上对发送的packets应用一个访问速率策略access-group 可选项,在指定的访问控制列表上应用访问速率策略 --通常在对指定的ip和应用程序限速的情况下使用rate-limit 可选项,这个是rate-limit访问控制策略acl-index 可选项,Access list number.bps 平均速率(bits/每秒),为8kbp的倍数burst-normal 普通的最大速率,The minimum value is bps divided by 2000.burst-max 非正常时的最大速率(单位字节)conform-action 相应的行为动作1.continue --Evaluates the next rate-limit command.2.drop 丢弃该包3.set-dscp-continue -----Sets the differentiated services code point (DSCP) (0to 63) and evaluate the next rate-limit command.4.set-dscp-transmit―------Sends the DSCP and transmit the packet.5.set-mpls-exp-transmit―--Sets the MPLS experimental bits (0 to 7) and sendsthe packet.6.set-prec-continue―---Sets the IP precedence (0 to 7) and evaluates the nextrate-limit command.7.set-qos-continue―---Sets the QoS group ID (1 to 99) and evaluates the nextrate-limit command.8.transm
原创力文档

文档评论(0)