限速[精彩]08-02b_路由器的限速

路由器限速  时间:2021-04-22  阅读:()

关于路由器的限速

速率的分类

1、 CIR合法速率

2、 BC突发速率

3、 BR极限速率

CIR BC BR的关系。

CIR*1.5=BC

BC*2 =BR

例如 限制A用户的上网速率为10KB。

CIR 10KB

BC 15KB

BR 30KB

实验环境

真机 网卡vmnet 1

60.0.0.1

路由器两个以太网网卡

E0/1 wan 60.0.0.2

E0/0 lan 192.168.0.1

将两个网卡接口绑定在vmnet 1上将w indows虚拟机也绑定在vmnet 1上。

虚拟机的ip 192.168.0.254/24

总结

设置好ip和网关后要求在客户端通过trac ert命令测试如果经过了路由器说明成功 在客户端安装下载软件

在服务器端安装ftp服务

路由器限速的过程

基于客户端ip地址的限速

1、创建访问控制列表定义网段

Router(config)#access-list 110 permit ip any 192.168.0.2540.0.0.0

2、定义一个类图class-map

Router(c onfig)#c las s-map aaa

将定义好的访问列表写在类图中

Router(config-cmap)#match access-group 110

3、定义一个策略图

Router(config)#policy-map bbb

总结策略图(类图(访问类表))

 限速的对象是类图。

4、对类图做限速

Router(c onfig-pmap)#c las s aaa

Router(config-pmap-c)#police 80000 1500030000 conform-action transmit exceed-action drop

格式c las s类图名police CIRbit BCbyte BRbyte confirm-action transmit exceed-action drop

注 8bit 位 =1 byte 字节 1024byte 字节 =1KB 1024KB1MB

5、加载策略图接口模式下进行用进口表示

Router(c onfig)#int e0/1

Router(c onfig-if)#s ervic e-policy input bbb

基于客户端mac地址的限速

1、配置mac地址访问列表

Router(config)#acc ess-list rate-limit 100000c.295d.4bf0

格式

Router(config-if)#rate-limit output access-group 10080000 1500030000 confirm-action transmit exceed-action drop

总结

1、区分三种不同的速率注意单位 

2、限速的类型基于ip 基于mac

3、三种图的区别访问列表、类图(class-map)、策略图(policy-map)

4、 明确两种行为 confirm-action transmit

exceed-action drop

######基于客户端IP地址的限速对虚拟机PC下载文件限速最大为10kb。##############

TOPO图如下

将windows虚拟机也绑定在vmnet 1 (Host-only)上

实验环境

真机 网卡vmnet 1 60.0.0.1

路由器两个以太网网卡

E0/1 wan 60.0.0.2

E0/0 lan 192.168.0.1

将两个网卡接口绑定在vmnet 1上将w indows虚拟机也绑定在vmnet 1上。虚拟机的ip 192.168.0.254/24

##配置IP地址

Router>en

Router#c onf t

Router(c onfig)#int e0/0

Router(config-if)#description LAN

Router(c onfig-if)#ip add 192.168.0.1255.255.255.0

Router(c onfig-if)#no sh

Router(c onfig-if)#exit

Router(c onfig)#int e0/1

Router(config-if)#description WAN

Router(c onfig-if)#ip add 60.0.0.2255.0.0.0

Router(c onfig-if)#no sh

Router(c onfig-if)#exit

Router(config)#access-list 110 permit ip any 192.168.0.2540.0.0.0

Router(c onfig)#c las s-map aaa

Router(config-cmap)#match access-group 110

Router(c onfig-cmap)#exit

Router(config)#policy-map bbb

Router(c onfig-pmap)#?

QoS policy-map configuration commands:class policy criteriadescription Policy-Map descriptionexit Exit from QoS policy-map configuration modeno Negate orsetdefault values of acommandrename Rename this policy-map

<cr>

Router(c onfig-pmap)#clas s ?

WORD class-mapnameclass-default System default class matching otherwise unclassified packets

Router(c onfig-pmap)#c las s aaa

Router(c onfig-pmap-c)#polic e?

<8000-2000000000> Bits per second

Router(config-pmap-c)#police 80000?

<1000-512000000> Normal burst bytesconform-action action when rate is less than normal burst

<cr>

Router(config-pmap-c)#police 80000 15000?

<1000-512000000> Maximum burst bytesconform-action action when rate is less than normal burst

<cr>

Router(config-pmap-c)#police 80000 1500030000 conform-action transmit exceed-action dropRouter(c onfig-pmap-c)#exit

Router(c onfig-pmap)#exit

Router(c onfig)#int e0/1

Router(c onfig-if)#s ervic e-policy input bbb

#####以下是基于客户端MAC地址的限速 ######

Router(c onfig-if)#no s ervic e-policy input bbb

Router(c onfig-if)#exit

Router(config)#acc ess-list rate-limit?

<0-99> Precedence ACL index

<100-199> MAC address ACL index

<200-299> mpls exp AC L index

Router(config)#access-list rate-limit 100?

H.H.H MAC address

Router(config)#access-list rate-limit 100000c.295d.4bf0

Router(c onfig)#int e0/0

Router(c onfig-if)#ra

Router(c onfig-if)#rate

Router(c onfig-if)#rate-limit?input Rate lim it on inputoutput Rate lim it on output

Router(config-if)#rate-limit output access-group 10080000 1500030000 confirm-action transmit exceed-action dropRouter(c onfig-if)#

CloudCone月付$48,MC机房可小时付费

CloudCone商家在前面的文章中也有多次介绍,他们家的VPS主机还是蛮有特点的,和我们熟悉的DO、Linode、VuLTR商家很相似可以采用小时时间计费,如果我们不满意且不需要可以删除机器,这样就不扣费,如果希望用的时候再开通。唯独比较吐槽的就是他们家的产品太过于单一,一来是只有云服务器,而且是机房就唯一的MC机房。CloudCone 这次四周年促销活动期间,商家有新增独立服务器业务。同样的C...

老薛主机入门建站月付34/月,年付345元,半价香港VPS主机

老薛主机怎么样?老薛主机这个商家有存在有一些年头。如果没有记错的话,早年老薛主机是做虚拟主机业务的,还算不错在异常激烈的市场中生存到现在,应该算是在众多商家中早期积累到一定的用户群的,主打小众个人网站业务所以能持续到现在。这不,站长看到商家有在进行夏季促销,比如我们很多网友可能有需要的香港vps主机季度及以上可以半价优惠,如果有在选择不同主机商的香港机房的可以看看老薛主机商家的香港vps。点击进入...

DiyVM:香港VPS五折月付50元起,2核/2G内存/50G硬盘/2M带宽/CN2线路

diyvm怎么样?diyvm这是一家低调国人VPS主机商,成立于2009年,提供的产品包括VPS主机和独立服务器租用等,数据中心包括香港沙田、美国洛杉矶、日本大阪等,VPS主机基于XEN架构,均为国内直连线路,主机支持异地备份与自定义镜像,可提供内网IP。最近,DiyVM商家对香港机房VPS提供5折优惠码,最低2GB内存起优惠后仅需50元/月。点击进入:diyvm官方网站地址DiyVM香港机房CN...

路由器限速为你推荐
courses163考生itunes人才ipad支持ipadboxiphone张女士苹果5重庆网通重庆联通现在有哪些资费???eacceleratoreaccelerator.shm_size设置多少合适呢?css3圆角css实现圆角的几种方法是什么?photoshop技术什么是ps技术
科迈动态域名 美元争夺战 vmsnap3 paypal认证 租空间 促正网秒杀 阿里校园 hdd 搜索引擎提交入口 网游服务器 怎么建立邮箱 360云服务 中国电信测速器 网页提速 便宜空间 中国电信测速网站 华为云建站 cdn服务 网络速度 国外代理服务器 更多