已阅读5页,还剩4页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
使用rate-limit来限制流量1. 在全局模式下开启cef:Router(config)#ip cef2. 定义标准或者扩展访问列表:Router(config)#access-list 2 permit 553. 在希望限制的端口上进行rate-limit:Rounter(config-if)#rate-limit output access-group 2 128000 16000 16000 conform-action transmit exceed-action droprate-limit的命令格式:#rate-limit input|output access-group number bps burst-normal burst-max conform-action action exceed-action actioninput|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.transmit-Sends the packet.exceed-action-Action to take on packets that exceed the specified ratelimit. Specify one of the following keywords:1.continue-Evaluates the next rate-limit command.2.drop-Drops the packet.3.set-dscp-continue-Sets the DSCP (0 to 63) and evaluates the next rate-limit command.4.set-dscp-transmit-Sends the DSCP and sends the packet.5.set-mpls-exp-continue-Sets the MPLS experimental bits (0 to 7) andevaluates the next rate-limit command.6.set-mpls-exp-transmit-Sets the MPLS experimental bits (0 to 7) and sendsthe packet.7.set-prec-continue-Sets the IP precedence (0 to 7) and evaluates the nextrate-limit command.8.set-prec-transmit-Sets the IP precedence (0 to 7) and sends the packet.9.set-qos-continue-Sets the QoS group ID (1 to 99) and evaluates the nextrate-limit command.10.set-qos-transmit-Sets the QoS group ID (1 to 99) and sends the packet.11.transmit-Sends the packet.默认情况下: 访问速率和分布式访问速率策略are disabled.命令模式:Interface configurationCommand HistoryRelease Modification11.1 CC This command was introduced.12.1(5)T The conform and exceed actions were added for the MPLS experimentalfield.Usage Guidelines使用多个访问速率策略, 在不同的interface下输入分布式访问速率策略只在 Cisco 7000 series routers with an RSP7000 或者Cisco 7500series routers with VIP2-40 or greater interface processor下能够使用. A VIP2-50interface processor is strongly recommended when the aggregate line rate ofthe port adapters on the VIP is greater than DS3. A VIP2-50 interfaceprocessor is required for OC-3 rates.访问速率和分布式访问速率策略只能对ip传输可用. 访问速率和分布式访问速率策略不支持FastEtherChannel, tunnel, 或者 PRI interfaces, 也不支持任何不支持Cisco快速转发(CEF)上的接口.Cisco快速转发必须在配置访问速率和分布式访问速率策略前先enabled.ExamplesIn the following example, the rate is limited by application:All World Wide Web traffic is sent. However, the MPLS experimental field forweb traffic that conforms to the first rate policy is set to 5. Fornonconforming traffic, the IP precedence is set to 0 (best effort). See thefollowing commands in the example:rate-limit input rate-limit access-group 101 20000000 24000 32000 conform-actionset-mpls-exp-transmit 5 exceed-action set-mpls-exp-transmit 0access-list 101 permit tcp any any eq wwwFTP traffic is sent with an MPLS experimental field of 5 if it conforms to thesecond rate policy. If the FTP traffic exceeds the rate policy, it is dropped.See the following commands in the example:rate-limit input access-group 102 10000000 24000 32000conform-action set-mpls-exp-transmit 5 exceed-action dropaccess-list 102 permit tcp any any eq ftpAny remaining traffic is limited to 8 Mbps, with a normal burst size of 16,000bytes and an excess burst size of 24000 bytes. Traffic that conforms is sentwith an MPLS experimental field of 5. Traffic that does not conform isdropped. See the following command in the example:rate-limit input 8000000 16000 24000 conform-action set-mpls-exp-transmit 5exceed-action dropNotice that two access lists are created to classify the web and FTP trafficso that they can be handled separately by the CAR feature:interface Hssi0/0/0description 45Mbps to R2rate-limit input rate-limit access-group 101 20000000 24000 32000conform-action set-mpls-exp-transmit 5 exceed-action set-mpls-exp-transmit 0rate-limit input access-group 102 10000000 24000 32000conform-action set-mpls-exp-transmit 5 exceed-action droprate-limit input 8000000 16000 24000 conform-actionset-mpls-exp-transmit 5 exceed-action dropip address 50 52!access-list 101 permit tcp any any eq wwwaccess-list 102 permit tcp any any eq ftpIn the following example, the MPLS experimental field is set and the packet issent:interface FastEtheret1/1/0rate-limit input 8000 1000 1000 access-group conform-actionset mpls-exp-transmit 5 exceed-action set-mpls-exp-transmit 5posted 2009-08-21 09:11yitongtianxia 阅读(32) |评论 (0)|2009年8月20日端口带宽限制端口带宽限制网络传输速率变慢的主要原因,往往是某些用户对网络的滥用。当使用MRTG等流量监控软件检测到流量来源于某个端口时,可以在核心交换机、汇聚交换机,甚至接入交换机上,对相应的端口作必要的处理,限制其传输带宽,从而限制每个用户所允许的最大流量,以便使其他网络用户能够恢复正常的网络应用服务。第一步:进入全配置模式。Switch# config terminal第二步:指定欲配置的接口。Switch(config)# interface interface-id第三步:配置端口带宽控制。其中,input/output表明在输入和输出方向应用该带宽限制,通常情况下,应当进行双向限制。access-group acl-index用于定义使用该带宽限制的访问列表。bps用于定义限制带宽,以bps为单位,并采用8 kbps的增量。burst-normal用于定义所允许的普通突发速率,burst-max用于定义所允许的最大突发速率。conform-action conform-action用于指定在规定最大带宽时所执行的操作,通常为transmit,即允许发送。exceed-action exceed-action则用于指定在规定最大带宽时所执行的操作,通常为drop,即丢弃。Switch(config-if)# rate-limit input | output access-group acl-index bps burst-normal burst-max conform-action conform-action exceed-action exceed-action第四步:返回特权配置模式。Switch(config-if)# end第五步:显示并校验该接口当前的配置。Switch# show interface interface-id第六步:保存带宽限制配置。Switch# copy running-config startup-config例如,若欲限制GigabitEthernet4/4带宽为128 kbps,当连接的普通突发速率、最大突发在8 kBytes(即64 kbps)9 kBytes(即72 kbps)范围内时,所执行的操作是transmit(传输即发送);当超出该范围时,则相应的操作就是drop。其中,128 000用于限制最大带宽,8 000和9 000则用于限制突发连接,保证不因个别用户的大量传输而使整个链路性能大幅度下降。限制输入和输出速率后,该端口配置如下:interface GigabitEthernet4/4no switchportdescription tushuguanip address 48ip access-group 120 inip access-group 120 outrate-limit output access-group 102 128000 8000 9000 conform-action transmit exceed-action droprate-limit input access-group 102 128000 8000 9000 conform-action transmit exceed-action drop!IP访问列表只需设置应用带宽限制的IP地址范围( 55)即可,内容如下:access-list 102 permit ip 55 any【注意】在启用宽带限制之前,必须先在全局模式下执行“ip cef”命令,启用交换机的快速转发技术。posted 2009-08-20 11:33yitongtianxia 阅读(32) |评论 (0)|保护端口说明及配置步骤保护端口保护端口可以确保同一交换机上的端口之间不进行通信。保护端口不向其他保护端口转发任何传输,包括单播、多播和广播包。传输不能在第二层保护端口间进行,所有保护端口间的传输都必须通过第三层设备转发。保护端口与非保护端口间的传输不受任何影响。第一步:进入全局配置模式。Switch# config terminal第二步:指定欲配置的接口。Switch(config)# interface interface-id第三步:将接口配置为保护端口。Switch(config-if)# switchport protected第四步:返回特权配置模式。Switch(config-if)# end第五步:显示并校验该接口当前的配置。Switch# show interfaces interface-id switchport第六步:保存配置。Switch# copy running-config startup-config若欲禁用保护端口,可以使用“no switchport protected”接口配置命令。posted 2009-08-20 09:06yitongtianxia 阅读(7) |评论 (0)|端口阻塞的说明及配置步骤端口阻塞默认状态下,未知目的MAC地址的泛洪包被允许从端口向外传输。如果未知的单播和多播通信被转发到保护端口,将导致安全问题。可以采用阻塞端口的方式,防止未知的单播和多播通信被转在端口间转发。第一步:进入全局配置模式。Switch# config terminal第二步:指定欲配置的接口。Switch(config)# interface interface-id第三步:禁止未知多播从该端口向外传输。Switch(config-if)# switchport block multicast第四步:禁止未知单播从该端口向外传输。Switch(config-if)# switchport block unicast第五步:返回特权配置模式。Switch(config-if)# end第六步:显示并校验该接口当前的配置。Switch# show interfaces interface-id switchport第七步:保存配置。Switch# copy running-config startup-configposted 2009-08-20 08:57yitongtianxia 阅读(25) |评论 (0)|2009年8月19日端口安全配置步骤及说明借助安全端口,可以只允许指定的MAC地址或指定数量的MAC地址访问某个端口,从而避免未经授权的计算机接入网络,或限制某个端口所连接的计算机数量,从而确保网络接入的安全。当配置端口安全时,应当注意以下问题:1、安全端口不能是Trunk端口。2、安全端口不能是Switch Port Analyzer (SPAN)的目的端口。3、安全端口不能是属于EtherChannel的端口。4、安全端口不能是private-VLAN端口。一配置安全端口第一步:进入全局配置模式。Switch# configure terminal第二步:指定欲配置端口安全的接口。Switch(config)# interface interface_id第三步:将接口设置为访问模式。Switch(config-if)# switchport mode access第四步:在接口启用端口安全。Switch(config-if)# switchport port-security第五步:(可选)在接口设置安全MAC地址的最大数量,以限制该端口所连接的计算机数量。取值范围为13 072,默认值是1。Switch(config-if)# switchport port-security maximum value第六步:(可选)设置违例发生后的处理模式。当安全违例事件发生时,将端口置于restrict或shutdown模式。选择restrict模式时,当非法MAC地址或太多MAC连接至该接口时,将丢弃数据包,并向网管计算机发送SNMP陷阱通知。选择shutdown模式时,发生安全错误的端口将被置于error-disable状态,除非网络管理员使用no shutdown命令手工激活,否则该端口失效。Switch(config-if)# switchport port-security violation restrict | shutdown第七步:设置坏包速率限制。Switch(config-if)# switchport port-security limit rate invalid-source-mac第八步:(可选)为该接口指定安全MAC地址。也可以使用该命令指定最大安全MAC 地址数。如果指定的MAC地址数量少于安全地址的最大数量,动态学习的MAC地址将被保留。Switch(config-if)# switchport port-security mac-address mac_address第九步:在端口启动sticky learning。Switch(config-if)# switchport port-security mac-address sticky第十步:返回特权EXEC模式。Switch(config-if)# end第十一步:查看并校验配置。Switch# show port-security address interface interface_idSwitch# show port-security address第十二步:保存当前配置。Switch# copy runni
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年江苏省徐州市政务服务中心(窗口人员)招聘笔试模拟试题及答案详解
- 2026年黄山市徽州区政务服务中心(窗口人员)招聘笔试备考试题及答案详解
- 2026年吕梁地区汾阳市政务服务中心(窗口人员)招聘考试备考题库及答案详解
- 2026年辽宁省本溪市政务服务中心(窗口人员)招聘笔试参考题库及答案详解
- 2026年衡水市桃城区医疗系统事业编人员招聘笔试备考试题及答案详解
- 2026-2027学年人教版八上物理 第二章 声现象 单元测试卷
- 2026年湖州市吴兴区医疗系统事业编人员招聘笔试参考试题及答案详解
- 2026年哈尔滨市动力区工会人员招聘考试模拟试题及答案详解
- 2026年辽阳市宏伟区政务服务中心(窗口人员)招聘考试参考题库及答案详解
- 2026年北京市房山区政务服务中心(窗口人员)招聘考试模拟试题及答案详解
- “筑梦航天”青少年航天知识大赛试题与答案
- 公安刑侦业务知识培训课件
- 雷电灾害专项应急预案
- rma销货退回管理办法
- CJ/T 158-2002城市污水处理厂管道和设备色标
- 2025年版!药食同源物质目录(106种)
- 《海洋遥感技术》课件
- (高清版)DB23∕T 3699-2024 养老机构失智症老人照护规范
- DL∕T 802.8-2023 电力电缆导管技术条件 第8部分:塑钢复合电缆导管
- 变压器局部放电的
- 高中新生入学登记表
评论
0/150
提交评论