思科交换机端口限速
- 格式:pdf
- 大小:27.52 KB
- 文档页数:2
interface Serial1clock rate 100no shutip address 1.1.1.1 255.255.255.252service-policy output nimokakaPSClass-map嵌套:有两点理由:在创建class map的时候去调用一个已有的class map1、管理方便,在已有的基础上增加一个修改进行平滑的过度。
2、允许用户在同一个class map里分别使用匹配所有(match-all)和匹配任何(match-any)。
比如4个匹配标准:A、B、C和D。
现在想让class map 匹配A,或匹配B,或同时匹配C 和D,就可以使用class map的嵌套:创建一个新的class map,定义为匹配所有(match-all)新标准为匹配E即同时匹配C和D;然后定义另一个匹配任何(match-any)的class map,去匹配A,或B,或E(即同时匹配C 和D)。
实例3、交换机QoS的配置方法(cisco3550/3560、cisco3750)(一)配置流量分类和策略1.全局#class-map [match-all(默认:完全符合)/Match-any] <class-name>―――(建立一个流量分类的策略)2.Map#match access-group <ACL#>――――――(使用ACL进行流量分类,可以重复配置)copyright 3.Map#match input-interface <接口>――――――(基于接口进行流量分类)4.Map#match vlan <#>――――――――――――(基于vlan进行流量分类)5.Map#match protocol <arp/cdp/ip/vofr/bridge>……――――――――(基于协议进行流量分类)(二)定义策略1.全局#policy-map <name> ――――――――――――(建立一个策略文件)2.Pm#class <class-name>―――――――――――(对定义好的分类流量作策略)3.Pm-c#bandwidth <值/百分比> ――――――――――――――(用于设置权值*占用接口的带宽比例)4.Pm-c#set ip precedence <0-7> ―――――――――――――(设置marking值)5.Pm-c#set cos……6.Pm-c#set dscp……(三)加载策略1.接口#service-policy <input/output> <P-name> ――――――――――(在接口上加载策略)(四)全局#mls qos ――――――――――――――――――――――(打开开QoS功能)精.英`学`习.网(五)接口#mls qos trust <dscp/cos/ip-precedennce> ――――――(在接口上设置信任状态和信任边界,一旦接口上收到相应Marking的值,则根据策略进行处理)八.显示命令(一)#show class-map <map name>(二)#show policy-map <map name>(三)#show policy-map interface <接口> <output/input> ――――――――――(显示接口加载的策略)实例4、交换机端口限速的配置方法(cisco3550/3560、cisco3750)mls qos!class-map match-all IPclass ―――――――――――――――――所有抓取所有流量match ip dscp 0!!policy-map rate-256Kclass IPclasspolice 256000 20000 exceed-action droppolicy-map rate-512Kclass IPclasspolice 512000 20000 exceed-action droppolicy-map rate-2Mclass IPclasspolice 2096000 200000 exceed-action drop精|英|学|习|网policy-map rate-6Mclass IPclasspolice 6296000 600000 exceed-action droppolicy-map rate-4Mclass IPclasspolice 4200000 300000 exceed-action droppolicy-map rate-800Mclass IPclasspolice 800000000 800000 exceed-action drop ―――定义policy-map,800M开始延时增加,到达800.8M后开始丢弃(丢包)interface FastEthernet0/22service-policy input rate-256K ―――――――――――――――――――应用policy到交换机端口上service-policy output rate-256K精.英.学.习.网-本文章转自精英学习网(),详细出处参考:/wangluoyunyong/2010/1021/qea_3.html网站地图|【设为首页】【加入收藏】-主页软件精英系统精英网络精英教育精英设计精英考试精英游戏精英文学生活手机影视教程搜索站内搜索搜索热门标签:诚征下功夫真用真信真懂真学思维激活隐忧谈谈当前位置: 主页> 网络精英> 网络运用> 思科交换机上QOS限速问题(3)时间:2010-10-21 13:04来源:未知作者:ぇ一枝独秀き点击:422次interface Serial1 clock rate 100 no shut ip address 1.1.1.1 255.255.255.252 service-policy output nimokaka PS Class-map嵌套:有两点理由:在创建class map的时候去调用一个已有的class map 1、管理方便,在-interface Serial1clock rate 100no shutip address 1.1.1.1 255.255.255.252service-policy output nimokakaPSClass-map嵌套:有两点理由:在创建class map的时候去调用一个已有的class map1、管理方便,在已有的基础上增加一个修改进行平滑的过度。
交换机端口速率限制实验报告一、实验目的本实验旨在通过对交换机端口速率限制的实验研究,探索交换机在网络环境中如何实现对端口速率的限制,并分析其对网络性能和带宽利用率的影响,为网络管理和优化提供参考依据。
二、实验原理及方法1. 实验原理交换机是一种常见的网络设备,用于在局域网中实现数据的转发和疏通。
端口速率限制是对交换机端口进行限速控制,以控制流入和流出端口的数据速率,并有效分配带宽资源,保证网络各个终端设备间的公平访问和优化网络性能。
2. 实验方法本实验采用以下步骤进行:步骤一:准备测试环境搭建实验所需的局域网网络环境,包括交换机、主机设备和网络连接。
步骤二:配置交换机使用命令行或图形界面登录并配置交换机参数,包括端口速率限制相关配置。
步骤三:设置测试参数根据实验需求,设置不同的端口速率限制参数进行测试。
步骤四:进行测试通过发送不同大小的数据包进行端口速率限制测试,并记录数据传输速率、时延和丢包率等参数。
步骤五:分析结果对实验数据进行整理和分析,比较不同端口速率限制参数下的网络性能和带宽利用率。
三、实验结果及讨论根据实验数据记录,我们得到了不同端口速率限制参数下的网络性能和带宽利用率数据。
通过对数据的分析,我们可以得出以下结论:1. 端口速率限制对网络性能的影响在进行端口速率限制之前,网络性能通常较好,数据传输速率较高,时延较低。
随着端口速率限制参数的设置,网络性能会受到一定程度的影响。
限制速率过低会导致数据传输速率下降,时延增加,从而影响网络应用的响应速度和用户体验。
2. 端口速率限制对带宽利用率的影响端口速率限制可以有效分配带宽资源,避免某一设备占用过多带宽而影响其他设备的正常访问。
合理设置端口速率限制参数,可以提高带宽利用率,使网络资源得到更加充分的利用,提高网络的整体性能。
四、实验结论通过本次实验,我们深入研究了交换机端口速率限制的实验原理和方法,并通过实验结果分析得出以下结论:1. 端口速率限制是一种有效的网络管理手段,能够控制和优化网络性能。
思科交换机端口限速总结交换机端口限速总结可限速的交换机一般都在三层或者以上的交换机,自2008年之后新出的交换机型号二层设备就可以做到QOS限速,精确度达到1Mbps,例如Cisco2960系列交换机。
在这之后的大多数国内的标准二层交换机都可以做多限速,精确度基本能达到1Mbps,比如中兴的标准二层,H3C的标准二层都可以做到。
老式的CISCO标准二层交换机例如2950类的交换也可以做到限速,但是精确度只能达到10Mbps。
2950G 的交换和2950为EI型的交换没有太大的限速区别,因为限速和IOS有关系,2950系列的交换IOS版本一般都是在9.0左右,最新的2960系列交换机IOS版本在12.2左右,高版本的IOS提供了更强的系统功能。
下面针对一些限速的方法进行总结:PC1接在Cisco3550F0/1上,速率为1M;PC1接在Cisco3550F0/2上,速率为2M;Cisco3550的G0/1为出口。
PC是直接接在三层交换机端口的,意思就是说限制的是三层交换机端口的上下行流量控制,同理,如果三层交换机端口不是接PC,而是一个二层交换机,那么可以对下层的设备进行上联限速。
注:每个接口每个方向只支持一个策略;一个策略可以用于多个接口。
因此所有PC的下载速率的限制都应该定义。
在同一个策略(在本例子当中为policy-map user-down),而PC不同速率的区分是在Class-map分别定义。
1、在交换机上启动QOSSwitch(config)#mls qos//在交换机上启动QOS2、分别定义PC1(10.10.1.1)和PC2(10.10.2.1)访问控制列表Switch(config)#access-list10permit10.10.1.00.0.0.255//控制pc1上行流量Switch(config)#access-list100permit any10.10.1.00.0.0.255//控制pc1下行流量Switch(config)#access-list11permit10.10.2.00.0.0.255//控制pc2上行流量Switch(config)#access-list111permit any10.10.2.00.0.0.255//控制pc2下行流量3、定义类,并和上面定义的访问控制列表绑定Switch(config)#class-map user1-up//定义PC1上行的类,并绑定访问列表10Switch(config-cmap)#match access-group10Switch(config-cmap)#exitSwitch(config)#class-map user2-upSwitch(config-cmap)#match access-group11//定义PC2上行的类,并绑定访问列表10 Switch(config-cmap)#exitSwitch(config)#class-map user1-downSwitch(config-cmap)#match access-group100//定义PC1下行的类,并绑定访问列表100 Switch(config-cmap)#exit Switch(config)#class-map user2-downSwitch(config-cmap)#match access-group111//定义PC2下行的类,并绑定访问列表111 Switch(config-cmap)#exit4、定义策略,把上面定义的类绑定到该策略Switch(config)#policy-map user1-up//定义PC1上行的速率为1MSwitch(config-pmap)#class user1-upSwitch(config-pmap-c)#trust dscpSwitch(config-pmap-c)#police10240001024000exceed-action dropSwitch(config)#policy-map user2-up//定义PC2上行的速率为2MSwitch(config-pmap)#class user2-upSwitch(config-pmap-c)#trust dscpSwitch(config)#policy-map user-down//定义PC1下行的速率为1MSwitch(config-pmap)#class user1-downSwitch(config-pmap-c)#trust dscpSwitch(config-pmap-c)#police10240001024000exceed-action dropSwitch(config-pmap-c)#exitSwitch(config-pmap)#class user2-down//定义PC2下行的速率为2MSwitch(config-pmap-c)#trust dscpSwitch(config-pmap-c)#police20480001024000exceed-action dropSwitch(config-pmap-c)#exit5、在接口上运用策略Switch(config)#interface f0/1//进入PC1端口上联交换机端口配置模式Switch(config-if)#service-policy input user1-up//绑定PC1上行策略为user1-upSwitch(config)#interface f0/2//进入PC2端口上联交换机端口配置模式Switch(config-if)#service-policy input user2-up//绑定PC2上行策略为user2-upSwitch(config)#interface g0/1//进入交换机上联千兆端口配置模式Switch(config-if)#service-policy input user-down//绑定交换机上联端口策略为user-down利用三层交换中的strom-control(风暴控制)功能,该功能是基于端口控制单播\多播\组播,可以精确到0.01%,但是一个近似值。
以前端口限速的工作都是由上级部门来做,最近由于分公司自己的内部客户需求,我们要为其提供50M的带宽.为此我们可是煞费苦心作了两天的测试,先来说说我们测试的设备连接情况:思科3560端口0/47(模拟用户)——————思科6509端口0/1、0/2(模拟局端,两条路有上联,热备)测试方法在3560及6509上分别起ftp进行测速重点来了,来说说6509上的命令吧:mls qos aggregate-policer test 50000000 100000 conform-action transmit exceed-action dropmls qosclass-map match-any test_limitematch access-group name test_addr!!policy-map rate-limit-uplinkclass test_limitepolice aggregate testip access-list extended test_addr (因为上下行都引用策略一样因此不单独做acl)permit ip any x.x.x.x 0.0.0.3 (分配给用户的互联网地址段A)permit ip x.x.x.x 0.0.0.3 anypermit ip any x.x.x.x 0.0.0.3 (分配给用户的互联网地址段B)permit ip x.x.x.x 0.0.0.3 anyinter f0/1ip addre x.x.x.x 255.255.255.252service-policy input test_uplink限制上传inter f0/2ip addre x.x.x.x 255.255.255.252service-policy input test_uplink限制上传inter g0/47service-policy input rate-limit-uplink限制下载经过测试,这个方案成功了!!哈哈,庆祝庆祝,有几点需要解释一下,因为35和65只有在input方向才能引用策略,所以同时对上行和下载作限速需要在上联和下载两方向的端口上做其次,我们中间有很多弯路,说来给大家提个醒,开始我们用的测试设备性能很低,所以始终测试不出理想的结果,很泄气,无意中拿了班上最好的一台电脑去测试,结果居然出人意料,后来又找了一台高性能设备进行测试,结果非常理想,在此提醒大家,低性能的设备在测试高带宽的时候要特别注意。
cisco 4507 端口限速公司的CISCO 4507已经稳定运行了多年,功能上也能满足我们的需求,但是其端口限速功能却不像其它的一些设备那样容易实现,店铺带教如何将网速收起来,自己偷偷用哦。
在Cisco IOS 系统上作QOS,一般要有以下五步:1、启用全局qos2、设置ACL匹配的流量3、设置一个class-map,来匹配第二步设置的ACL4、设置一个policy-map匹配class-map,然后再在这里面定义一系列策略5、将policy-map应用到相应的接口上即可。
具体操作:cisco交换机4507限速及下挂端口QOS1、cisco WS-C4507R-E(这款非常特殊,似乎没有qos命令)IOS:Cisco IOS Software, Catalyst 4500 L3 Switch Software (cat4500e-ENTSERVICESK9-M), Version 12.2(54)SG1, RELEASE SOFTWARE (fc1)2、cisco WS-C4507RIOS: Cisco IOS Software, Catalyst 4500 L3 Switch Software (cat4500-IPBASE-M), Version 12.2(31)SGA, RELEASE SOFTWARE (fc3)3、cisco WS-C3560-48PS (PowerPC405)IOS: Cisco IOS Software, C3560 Software (C3560-IPBASE-M), Version 12.2(25)SEE2, RELEASE SOFTWARE (fc1)4、cisco WS-C2960-48TC-L (PowerPC405)IOS: Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(50)SE4, RELEASE SOFTWARE (fc1)] 依实际需求做端口QOS:1.1:对于cisco WS-C4507R-E等IOS配置端口限速QOS时和3560.3550有几点不同,依某仪器工程实例说明1.1.1: 启用QOS:HYQCSWC2F01(config)#qos control-packets //当输入MLS QOS时不支持此种命令1.1.2: 创建控制IP流:HYQCSWC2F01(config)#access-list 10 permit 10.80.0.0 0.0.0.255 //上传流量(仅控制下载时不需要此列表10)HYQCSWC2F01(config)#access-list 100 permit ip any 10.80.0.0 0.0.0.255//下载流量1.1.3: 创建CLASS-MAPHYQCSWC2F01(config)#class map vlan_downHYQCSWC2F01(config-class)#match access-list 100HYQCSWC2F01(config-class)#exit1.1.4:创建POLICY-MAPHYQCSWC2F01(config)#policy-map downHYQCSWC2F01(config-pmap)#class vlan_downHYQCSWC2F01(config-pmap-c)#police 30000000 1000000 conform-action transmit exceed-action drop //小于3M流量,如果大于3M则,正常突发流为100000BYTES,小于3M传输,大于3M则丢弃.HYQCSWC2F01(config)# interface GigabitEthernet5/30switchport access vlan 80service-policy output down//此时已确认为端口G5/30下载流量控制在 3M.具体测试: 从\\10.161.464.4拷贝500M文件则可以看到2.0 以下为其它某仪器4507其它几个端口QOS的限速,可参考配置2.1:Policy Map downClass vlan_downpolice cir 3000000(BIT/S) bc 100000(BYTES)conform-action transmitexceed-action drop约下载不超过300K,上传未做(2):30000000 1000000此时下载小于3M(3): 4000000 100000 //见意一般在300—400K下载流量.此时下载小于400KPolicy Map downClass vlan_downpolice cir 4000000 bc 100000conform-action transmitexceed-action drop实际工程下载流测试:360KB/S3.0 对于4507下挂的3560.2960等3.1:对于4507下挂的3560等端口QOS在每个端口上做,除了上连口.3.2:对于4507下挂的3560,3550,同时3560,3550下挂2960,2950等,此时要注意,在3560,3550上做QOS时,是针对下挂2960,2950的总下载流量.并非像3560,3550直接PC.3.3:对于4507下挂的二层设备2960,2950等两个上连的,如果2960,2950能做,那么仅在两个上连口,控制下接PC的流量.依实际进行配置.3.4:通常QOS在2960上实施时,端口不支持QOS, POLICY-MAP 等,仅支持DSCP ,COS等.因此见意在三层做,控制下挂的总流量.以上内容代码很多,希望朋友们没有看晕了哈。
cisco2960端口限速的方法步骤思科(Cisco)路由器是一个集成多业务路由器,那么cisco路由器该怎么端口限速??有网友提到自己不会设置思科的设备,该怎么办?店铺在网上找了一些教程及命令,需要的朋友可以参考下。
以下是cisco2960路由器设置端口限速具体操作首先进入config模式开启QOSSwitch(config)#mls qos定义PC1的ACL,这里假设PC1的IP是192.168.1.1Switch(config)#access-list 10 permit 192..168.1.1 0.0.0.255 //控制pc1上行流量Switch(config)#access-list 100 permit ip any 192.168.1.1 0.0.0.255 //控制pc1下行流量定义类别,并绑定ACLSwitch(config)# class-map pc1-up //定义PC1上行的类,并绑定访问列表Switch(config-cmap)# match access-group 10Switch(config)# class-map pc1-downSwitch(config-cmap)# match access-group 100 //定义PC1下行的类,并绑定访问列表100定义策略,将定义类绑定定义策略中Switch(config)# policy-map pc1-up //定义PC1上行的速率为1M,超过的丢弃Switch(config-pmap)# class pc1-upSwitch(config-pmap-c)# trust dscpSwitch(config-pmap-c)# police 1024000 1024000 exceed-action dropSwitch(config)# policy-map pc1-downSwitch(config-pmap)# class pc1-downSwitch(config-pmap-c)# trust dscpSwitch(config-pmap-c)# police 1024000 1024000 exceed-action drop最后在接口上进行应用Switch(config)# interface f0/1Switch(config-if)# service-policy input pc1-upSwitch(config)# interface g0/1Switch(config-if)# service-policy input pc1-down / G 0/1接口为设备的出口,将下行的绑定到这里以上内容来自互联网,希望对大家有所帮助。
cisco端口限速思科路由器是世界闻名的通讯设备之一了,有不少用户不知道cisco端口限速怎么设置?店铺为大家分享了具体操作方法,供大家参考!cisco端口限速参考以下步骤:假设PC1连接到交换机F0/1端口首先进入config模式开启QOSSwitch(config)#mls qos定义PC1的ACL,这里假设PC1的IP是192.168.1.1Switch(config)#access-list 10 permit 192..168.1.1 0.0.0.255 //控制pc1上行流量Switch(config)#access-list 100 permit ip any 192.168.1.1 0.0.0.255 //控制pc1下行流量定义类别,并绑定ACLSwitch(config)# class-map pc1-up //定义PC1上行的类,并绑定访问列表Switch(config-cmap)# match access-group 10Switch(config)# class-map pc1-downSwitch(config-cmap)# match access-group 100 //定义PC1下行的类,并绑定访问列表100定义策略,将定义类绑定定义策略中Switch(config)# policy-map pc1-up //定义PC1上行的速率为1M,超过的丢弃Switch(config-pmap)# class pc1-upSwitch(config-pmap-c)# trust dscpSwitch(config-pmap-c)# police 1024000 1024000 exceed-action dropSwitch(config)# policy-map pc1-downSwitch(config-pmap)# class pc1-downSwitch(config-pmap-c)# trust dscpSwitch(config-pmap-c)# police 1024000 1024000 exceed-action drop最后在接口上进行应用Switch(config)# interface f0/1Switch(config-if)# service-policy input pc1-upSwitch(config)# interface g0/1Switch(config-if)# service-policy input pc1-down / G 0/1接口为设备的出口,将下行的绑定到这里店铺分享了cisco端口限速的解决方法,希望大家喜欢。
cisco2960g端口限速装备首要介绍几点:关于思科2960系列沟通机(我用的是2960G 沟通机),它支撑QOS(关于一些不了解思科2960G沟通机是不是支撑QOS的人声明的);2960沟通机只支撑input方向的战略,因下载时有必要在上联接口装备,上载时有必要鄙人联接口装补白:每个接口每个方向只支撑一个战略(当然2960不支撑output方向);一个战略能够用于多个接口;以上是自个的阅历之谈。
下面介绍装备:1.在沟通机上主张QOSSwitch(config)#mlsqos//在沟通机上主张QOS2.界说拜访操控列表Switch(config)#access-list十permit十.十.1.00.0.0.255//操控PC1上行流量Switch(config)#access-list十0permitipany十.十.1.00.0.0.255//操控PC1下行流量3.界说类,并和上面界说的拜访操控列表绑定Switch(config)#class-mapuser1-up//界说PC1上行的类,并绑定拜访列表十Switch(config-cmap)#matchaccess-group十Switch(config-cmap)#exitSwitch(config)#class-mapuser1-down//界说PC1下行的类,并绑定拜访列表十0Switch(config-cmap)#matchaccess-group十0Switch(config-cmap)#exit4.界说战略,把界说的类绑定到该战略Switch(config)#policy-mapuser1-up//界说PC1上行的速率为1MSwitch(config-pmap)#classuser1-upSwitch(config-pmap-c)#trustdscpSwitch(config-pmap-c)#police十240008000exceed-actiondropSwitch(config)#policy-mapuser-down//界说PC1下行的速率为1MSwitch(config-pmap)#classuser1-downSwitch(config-pmap-c)#trustdscpSwitch(config-pmap-c)#police十240008000exceed-actiondropSwitch(config-pmap-c)#exit5.在接口上运用Switch(config)#interfacef0/1(下联口)Switch(config-if)#service-policyinputuser1-up Switch(config)#interfaceg0/20(上联口)Switch(config-if)#service-policyinputuser-down。
交换机命令: 华为交换机:vLi nklDC-LF-J5>sys // 进入系统[Lin kIDC-LF-J5]di cu // 系统[Li nklDC-LF-J5]i nt e1/0/2 // 进入端口[Lin kIDC-LF-J5-Ethernet1/ 0/2] i nt e1/0/3 // [Lin klDC-LF-J5-Ethernet1/0/3]li ne i 5120 // [Lin klDC-LF-J5-Ethernet1/0/3]li ne o 5120 //[Li nklDC-LF-J5-Ethernet1/0/3]q //quit 退出 [Lin kIDC-LF-J5]q //quit 退出<Li nklDC-LF-J5>sa //save 保存,如不保存,重启交换机后,将恢复原始设置注意:本命令使用了短命令,如果想查看全命令,请使用tab 键补全命令。
思科交换机: <s1>e nable // s1#show run // 显示系统配置s1#co nf t //进入配置终端模式[s1-co nfig]? //可以通过打问号提示所要找的命令Switch#co nf t // 进入配置模式Switch(co nfig)#i nterface fastEther net 0/22 // 进入端口Switch(co nfig-if)#storm-co ntrol uni cast level 2 // 限制单播风暴为 2%,如果100Mb带宽则为2MbSwitch(co nfig-if)#exit // 退出端口管理Switch(co nfig)#exit // 退出配置模式Switch#write // 保存思科交换机实例操作:更换成3端口进的带宽为5120K出的带宽为 5120K10.0.0^1 10.0.C.62PC>tel net 10.0.0.60Tryi ng 10.0.0.60 ...OpenUser Access Verificati onPassword: Switch>e n Password: Switch#sh ruBuildi ng con figurati on …Current configuration : 1157 bytes version 12.1no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption!hostname Switch!enable password 123321 interface FastEthernet0/1 storm-control broadcast level 1 ! interface FastEthernet0/2 storm-control broadcast level 1 !interface FastEthernet0/3!interface FastEthernet0/4!interface FastEthernet0/5!interface FastEthernet0/6!interface FastEthernet0/7interface FastEthernet0/9 interface FastEthernet0/10 interface FastEthernet0/11 interface FastEthernet0/12 interface FastEthernet0/13 interface FastEthernet0/14 interface FastEthernet0/15 interface FastEthernet0/16 interface FastEthernet0/17 interface FastEthernet0/18 interface FastEthernet0/19 interface FastEthernet0/20 interface FastEthernet0/21 interface FastEthernet0/22interface FastEthernet0/24 interface GigabitEthernet1/1 !interface GigabitEthernet1/2!interface Vlan1ip address 10.0.0.60 255.255.0.0 !ip default-gateway 10.0.0.60!!line con 0!line vty 0 4password 123321loginline vty 5 15login!!endSwitch#conf tEnter configuration commands, one per line. End with CNTL/Z. Switch(config)#inter Switch(config)#interface faSwitch(config)#interface fastEthernet0/1Switch(config-if)#stoSwitch(config-if)#storm-control unicast level 2Switch(config-if)#exitSwitch(config)#exitSwitch#writeBuilding configuration...[OK] Switch#。
怪狗交换机配置(一)端口限速基本配置交换机配置(二)端口绑定基本配置交换机配置(三)ACL基本配置交换机配置(四)密码恢复交换机配置(五)三层交换配置交换机配置(六)端口镜像配置交换机配置(七)DHCP配置交换机配置(八)配置文件管理交换机配置(九)远程管理配置交换机配置(十)STP配置交换机配置(十一)私有VLAN配置交换机配置(十二)端口trunk、hybrid应用配置交换机配置(十三)同一VLAN内部端口之间隔离交换机配置(十四)S系列交换机实现不同VLAN之间互访的配置怪狗交换机配置(一)端口限速基本配置华为3Com 2000_EI、S2000-SI、S3000-SI、S3026E、S3526E、S3528、S3552、S3900、S3050、S5012、S5024、S5600系列:华为交换机端口限速2000_EI系列以上的交换机都可以限速!限速不同的交换机限速的方式不一样!2000_EI直接在端口视图下面输入LINE-RATE (4 )参数可选!端口限速配置1功能需求及组网说明端口限速配置『配置环境参数』1. PC1和PC2的IP地址分别为10.10.1.1/24、10.10.1.2/24『组网需求』1. 在SwitchA上配置端口限速,将PC1的下载速率限制在3Mbps,同时将PC1的上传速率限制在1Mbps 2数据配置步骤『S2000EI系列交换机端口限速配置流程』使用以太网物理端口下面的line-rate命令,来对该端口的出、入报文进行流量限速。
【SwitchA相关配置】1. 进入端口E0/1的配置视图[SwitchA]interface Ethernet 0/12. 对端口E0/1的出方向报文进行流量限速,限制到3Mbps[SwitchA- Ethernet0/1]line-rate outbound 303. 对端口E0/1的入方向报文进行流量限速,限制到1Mbps[SwitchA- Ethernet0/1]line-rate inbound 16【补充说明】报文速率限制级别取值为1~127。
access-list 101 permit ip any anyclass-map match-all 1Mmatch access-group 101policy-map 1Mclass 1Mpolice 20000 8000 exceed-action dropinterface f0/0service-policy input 1Mservice-policy output 1M端口带宽限制为1M,测试下载速度100K左右.CISCO2811路由器限速在Cisco设备中,只有支持思科快速转发(CEF,Cisco Express Forward)的路由器或交换机才能使用rate-limit来限制流量,具体设置分三步1. 在全局模式下开启cef:configure terminalRouter(config)#ip cef2. 定义标准或者扩展访问列表(定义一个方向就可以了):Router(config)#access-list 111 permit ip 192.168.1.0 0.0.0.255 any3. 在希望限制的端口上进行rate-limit:Router(config)#interface FastEthernet 0/1Rounter(config-if)#rate-limit input access-group 111 2000000 40000 60000 conform-action transmit exceed-action drop这样我们就对192.168.1.0网段进行了限速,速率为2Mbps。
注意,是对整个网段,因为你定义的ACL就是针对整个网段的。
rate-limit命令格式:#rate-limit {input|output} [access-group number] bps burst-normal burst-max conform-action action exceed-action actioninput|output:这是定义数据流量的方向。
关于 Cisco 于 obv3560 限速问 问题汉远网智 IT 咨询 CNS_D 汉 咨 DOC_2009 年 6 月 4 日序号 问:三层交换 cisco3560,做办公网的 问 换 的汇聚层交换 换。
请问,如 如何做到,每 IP 限速?我 每 我只 会做 vlan 限 限速。
但一人 人下载,同一 vlan 的还是 一 是慢了。
(10M 带宽, 300 员工,划分了 四 四五个 vlan)设置 置单个 ip 流量 量限速可以, ,但是每个 ip 都要限速的 p 的话,配置量 量极大,可能 能会造成 NVR RAM 不够 够,系统运行 行缓慢,造成性 性能不稳定,限制流量要 要做很多事情 情,特别是像 像你公司用户比较 多,假如出现问 问题,排错是 是很麻烦的, 建议采用端 端口限速的方 方法。
co OS 速配置 Cisc 3560 QO 端口限速 一、网络说明 Cisco3560 F F0/1 上,速 速率为 1M; PC1接在 C PC2 接在 C Cisco3560 F F0/2 上,速 速率为 2M; Cisco3550 的 G0/1 为 0 为出口。
二、详细配 配置过程 注:每个接 接口每个方向只支持一个策 策略;一个策 策略可以用于 于多个接口。
因此所有 PC 的 P 下载速率的 的限制都应该 该定义在同一个 个策略(在本 本例子当中为 policy 1、在交换机 机上启动 QO OS Switch(con nfig)#mls q //在交换 qos 换机上启动 QOS Q 2、分别定 PC1(10.10.1.1)和 PC 定义 C2(10.10.2.1)访问控制列 列表 Switch(con nfig)#acces ss-list 10 pe ermit 10.10.1.0 0.0.0.25 //控制 pc 上行流量 55 c1 量 Switch(con nfig)#acces ss-list 100 p permit ip an 10.10.1.0 0.0.0.255 / ny 0 //控制 pc1 下行 下 流量 nfig)#acces ss-list 11 pe ermit 10.10.2.0 0.0.0.25 //控制 pc 上行流量 55 c2 量 Switch(con Switch(con nfig)#acces ss-list 111 p permit ip an 10.10.2.0 0.0.0.255 / ny 0 //控制 pc2 下行 下 流量服务 务电话:4006-5 50-9908 服务 务电话:800-81 10-6602 1 Http://www w.ChinaNetwo 公司地址:北 北京亚运村北辰 辰培训中心一层 层北区3、定义类 类,并和上面 面定义的访问控 控制列表绑定 定 Switch(con nfig)# class s-map user1 1-up //定义 PC1上行的 义 的类,并绑定 定访问列表 10 1 Switch(con nfig-cmap)# match ac # ccess-group 10 p Switch(con nfig-cmap)# exit # Switch(con nfig)# class s-map user2 2-up Switch(con nfig-cmap)# match ac # ccess-group 11 //定义 PC2 上行的 p 的类,并绑定访 访问 列表 10 nfig-cmap)# exit # Switch(con Switch(con nfig)# class s-map user1 1-down Switch(con nfig-cmap)# match ac # ccess-group 100 //定义 PC1下行的 p 义 的类,并绑定 定访 问列表 100 0 Switch(con nfig-cmap)# exit # Switch(con nfig)# class s-map user2 2-down Switch(con nfig-cmap)# match access-group 111 //定义 PC2 下行的 # p 义 的类, 并绑定 定访问 列表 111 nfig-cmap)# exit # Switch(con 4、定义策略 略,把上面定 定义的类绑定 定到该策略 Switch(con nfig)# polic cy-map use er1-up //定义 PC1上行 义 行的速率为 1M M Switch(con nfig-pmap) class use )# er1-up Switch(con nfig-pmap-c)# trust dscp Switch(con nfig-pmap-c)# police 1024000 10 024000 exc ceed-action drop n Switch(con nfig)# polic cy-map use er2-up //定义 PC2上行 义 行的速率为 2M M Switch(con nfig-pmap) class use )# er2-up Switch(con nfig-pmap-c)# trust dscp Switch(con nfig-pmap-c)# police 2048000 10 024000 exc ceed-action drop n Switch(con nfig)# polic cy-map use er-down Switch(con nfig-pmap) class use )# er1-down Switch(con nfig-pmap-c)# trust dscp Switch(con nfig-pmap-c)# police 1024000 10 024000 exc ceed-action drop n Switch(con nfig-pmap-c)# exit Switch(con nfig-pmap) class use )# er2-down Switch(con nfig-pmap-c)# trust dscp Switch(con nfig-pmap-c)# police 2048000 10 024000 exc ceed-action drop n Switch(con nfig-pmap-c)# exit服务 务电话:4006-5 50-9908 服务 务电话:800-81 10-66022Http://www w.ChinaNetwo 公司地址:北 北京亚运村北辰 辰培训中心一层 层北区5、在接口 口上运用策略 略 Switch(con nfig)# inter rface f0/1 Switch(con nfig-if)# ser rvice-policy input user1-up y Switch(con nfig)# inter rface f0/2 Switch(con nfig-if)# ser rvice-policy input user2-up y Switch(con nfig)# inter rface g0/1 Switch(con nfig-if)# ser rvice-policy input user-down y 几点需要解释 释一下,因为 3560 只有在 input 方向 在 向才能引用策 策略,所以同 同时对上行和下载 有几 作限 限速需要在上 上行和下载两 两方向的端口上做。
两种思科路由器限速方法详解大家都知道,不同的路由器限速的方法都不相同,下面店铺就主要针对思科路由器,详细介绍思科路由器如何限速及其方法,希望对您有所帮助!两种思科路由器限速方法详解一、思科路由器NVAR限速现在的bt软件封锁后会自动改端口,一些软件还是用到8000、8080、2070等端口,限制这些端口这样网络不正常,所以要使用NVAR(Network-Based Application Recognition,网络应用识别),NBAR (Network-Based Application Recognition)的意思是网络应用识别。
NBAR是一种动态能在四到七层寻找协议的技术,它不但能做到普通ACL能做到那样控制静态的、简单的网络应用协议TCP/UDP的端口号。
例如我们熟知的WEB应用使用的TCP 80,也能做到控制一般ACLs不能做到动态的端口的那些协议,例如VoIP使用的H.323,SIP等。
要实现对BT流量的控制,就要在思科路由器上实现对PDLM的支持。
PDLM是Packet Description Language Module的所写,意思是数据包描述语言模块。
它是一种对网络高层应用的协议层的描述,例如协议类型,服务端口号等。
它的优势是让NBAR适应很多已有的网络应用,像HTTP URL,DNS,FTP,VoIP等,同时它还可以通过定义,来使NBAR支持许多新兴的网络应用。
例如peer2peer工具。
PDLM在思科的网站上可以下载,并且利用PDLM可以限制一些网络上的恶意流量。
思科在其官方网站提供了三个PDLM模块,分别为KAZAA2.pdlm,bittorrent.pdlm.emonkey.pdlm可以用来封锁KAZAA,BT,电驴得到PDLM然后通过TFTP服务器将bittorrent.pdlm拷贝到路由中。
利用ip nbar pdlm bittorrent.pdlm 命令将NBAR中的BT功能启动。
access-list 101 permit ip any anyclass-map match-all 1Mmatch access-group 101policy-map 1Mclass 1Mpolice 20000 8000 conform-action exceed-action dropinterface f0/0service-policy input 1Mservice-policy output 1M端口带宽限制为1M,测试下载速度100K左右.CISCO2811路由器限速在Cisco设备中,只有支持思科快速转发(CEF,Cisco Express Forward)的路由器或交换机才能使用rate-limit来限制流量,具体设置分三步1. 在全局模式下开启cef:configure terminalRouter(config)#ip cef2. 定义标准或者扩展访问列表(定义一个方向就可以了):Router(config)#access-list 111 permit ip 192.168.1.0 0.0.0.255 any3. 在希望限制的端口上进行rate-limit:Router(config)#interface FastEthernet 0/1Rounter(config-if)#rate-limit input access-group 111 2000000 40000 60000 conform-action transmit exceed-action drop这样我们就对192.168.1.0网段进行了限速,速率为2Mbps。
注意,是对整个网段,因为你定义的ACL就是针对整个网段的。
rate-limit命令格式:#rate-limit {input|output} [access-group number] bps burst-normal burst-max conform-action action exceed-action actioninput|output:这是定义数据流量的方向。
Cisco三层交换的限速拓扑:pc1-------default vlan 1--3550-24-emi--f0/24-------pc2 配置:pc1:192.168.1.7 255.255.255.0 192.168.1.222vlan 1:192.168.1.222 255.255.255.0f0/24:192.168.2.1 255.255.255.0pc2:192.168.2.20 255.255.255.0 192.168.2.1交换机的情况:Switch#sh runBuilding configuration...Current configuration : 1835 bytes!version 12.1no service padservice timestamps debug uptimeservice timestamps log uptimeno service password-encryption!hostname Switch!!ip subnet-zeroip routingmls qos!class-map match-all 64kmatch access-group 110!!policy-map yikaiclass 64kpolice 512000 32000 exceed-action drop !!spanning-tree extend system-id!!!interface FastEthernet0/1switchport mode accessno ip addressservice-policy input yikai!interface FastEthernet0/2 no ip address!interface FastEthernet0/3 no ip address!interface FastEthernet0/4 no ip address!interface FastEthernet0/5 no ip address!interface FastEthernet0/6 no ip address!interface FastEthernet0/7 no ip address!interface FastEthernet0/8 no ip address!interface FastEthernet0/9no ip address!interface FastEthernet0/10 no ip address!interface FastEthernet0/11 no ip address!interface FastEthernet0/12 no ip address!interface FastEthernet0/13 no ip address!interface FastEthernet0/14 no ip address!interface FastEthernet0/15 no ip address!interface FastEthernet0/16 no ip address!interface FastEthernet0/17 no ip address!interface FastEthernet0/18 no ip address!interface FastEthernet0/19 no ip address!interface FastEthernet0/20 no ip address!interface FastEthernet0/21 no ip address!interface FastEthernet0/22 no ip address!interface FastEthernet0/23 no ip address!interface FastEthernet0/24no switchportip address 192.168.2.1 255.255.255.0service-policy input yikai!interface GigabitEthernet0/1no ip address!interface GigabitEthernet0/2no ip address!interface Vlan1ip address 192.168.1.222 255.255.255.0!ip classlessip http server!access-list 110 permit ip host 192.168.2.20 any access-list 110 permit ip any any!line con 0line vty 0 4loginline vty 5 15login!end此时在客户机pc2从pc1上拷贝文件,大约40M时间大约:12分钟Switch#sh mls qos interface f 0/1 staFastEthernet0/1Ingressdscp: incoming no_change classified policed dropped (in bytes)Others: 385021895 385021895 0 0 12197478Egressdscp: incoming no_change classified policed dropped (in bytes)Others: 9553871 n/a n/a 0 0Switch#sh mls qos interface f 0/1 staFastEthernet0/1Ingressdscp: incoming no_change classified policed dropped (in bytes)Others: 385369437 385369437 0 0 12259540Egressdscp: incoming no_change classified policed dropped (in bytes)Others: 9562103 n/a n/a 0 0从中发现有大量的dropped,且增加很快.如果在interface f 0/1no service-map input yikai则没有应用policy-map yikai ,此时同样的文件传速速度很快,大约只需要3分钟.华为交换机的限速支持端口限速的,针对以太网端口的入方向用traffic-limit命令,粒度为8kbps.出方向可用流量整形功能,traffic-shape命令。
一、网络说明
PC1接在Cisco3550 F0/1上,速率为1M;
PC2接在Cisco3550 F0/2上,速率为2M;
Cisco3550的G0/1为出口。
二、详细配置过程
注:每个接口每个方向只支持一个策略;一个策略可以用于多个接口。
因此所有PC的下载速率的限制都应该定义在同一个策略(在本例子当中为policy-map user-down),而PC不同速率的区分是在Class-map分别定义。
1、在交换机上启动QOS
Switch(config)#mls qos //在交换机上启动QOS
2、分别定义PC1(10.10.1.1)和PC2(10.10.2.1)访问控制列表
Switch(config)#access-list 10 permit 10.10.1.0 0.0.0.255 //控制pc1上行流量 Switch(config)#access-list 100 permit any 10.10.1.0 0.0.0.255 //控制pc1下行流量
Switch(config)#access-list 11 permit 10.10.2.0 0.0.0.255 //控制pc2上行流量 Switch(config)#access-list 111 permit any 10.10.2.0 0.0.0.255 //控制pc2下行流量
3、定义类,并和上面定义的访问控制列表绑定
Switch(config)# class-map user1-up //定义PC1上行的类,并绑定访问列表10
Switch(config-cmap)# match access-group 10
Switch(config-cmap)# exit
Switch(config)# class-map user2-up
Switch(config-cmap)# match access-group 11 //定义PC2上行的类,并绑定访问列表10
Switch(config-cmap)# exit
Switch(config)# class-map user1-down
Switch(config-cmap)# match access-group 100 //定义PC1下行的类,并绑定访问列表100
Switch(config-cmap)# exit
Switch(config)# class-map user2-down
Switch(config-cmap)# match access-group 111 //定义PC2下行的类,并绑定访问列表111
Switch(config-cmap)# exit
4、定义策略,把上面定义的类绑定到该策略
Switch(config)# policy-map user1-up //定义PC1上行的速率为1M
Switch(config-pmap)# class user1-up
Switch(config-pmap-c)# trust dscp
Switch(config-pmap-c)# police 1024000 1024000 exceed-action drop
Switch(config)# policy-map user2-up //定义PC2上行的速率为2M
Switch(config-pmap)# class user2-up
Switch(config-pmap-c)# trust dscp
Switch(config-pmap-c)# police 2048000 1024000 exceed-action drop
Switch(config)# policy-map user-down
Switch(config-pmap)# class user1-down
Switch(config-pmap-c)# trust dscp
Switch(config-pmap-c)# police 1024000 1024000 exceed-action drop
Switch(config-pmap-c)# exit
Switch(config-pmap)# class user2-down
Switch(config-pmap-c)# trust dscp
Switch(config-pmap-c)# police 2048000 1024000 exceed-action drop
Switch(config-pmap-c)# exit
5、在接口上运用策略
Switch(config)# interface f0/1
Switch(config-if)# service-policy input user1-up
Switch(config)# interface f0/2
第 1 页
Switch(config-if)# service-policy input user2-up Switch(config)# interface g0/1
Switch(config-if)# service-policy input user-down
第 2 页。