限速[精彩]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)#

简单测评v5.net的美国cn2云服务器:电信双程cn2+联通AS9929+移动直连

v5.net一直做独立服务器这块儿的,自从推出云服务器(VPS)以来站长一直还没有关注过,在网友的提醒下弄了个6G内存、2核、100G SSD的美国云服务器来写测评,主机测评给大家趟雷,让你知道v5.net的美国云服务器效果怎么样。本次测评数据仅供参考,有兴趣的还是亲自测试吧! 官方网站:https://v5.net/cloud.html 从显示来看CPU是e5-2660(2.2GHz主频),...

bgpto:独立服务器夏季促销,日本机器6.5折、新加坡7.5折,20M带宽,低至$93/月

bgp.to对日本机房、新加坡机房的独立服务器在搞特价促销,日本独立服务器低至6.5折优惠,新加坡独立服务器低至7.5折优惠,所有优惠都是循环的,终身不涨价。服务器不限制流量,支持升级带宽,免费支持Linux和Windows server中文版(还包括Windows 10). 特色:自动部署,无需人工干预,用户可以在后台自己重装系统、重启、关机等操作!官方网站:https://www.bgp.to...

香港E3-1230v2 16GB 30M 326元/月 数脉科技

官方网站:https://www.shuhost.com/公司名:LucidaCloud Limited尊敬的新老客户:艰难的2021年即将结束,年终辞旧迎新之际,我们准备了持续优惠、及首月优惠,为中小企业及个人客户降低IT业务成本。我们将持续努力提供给客户更好的品质与服务,在新的一年期待与您有美好的合作。# 下列价钱首月八折优惠码: 20211280OFF (每客户限用1次) * 自助购买可复制...

路由器限速为你推荐
LACADFandroidcombininggoogle菏泽市牡丹区实验小学支持ipadipad上网ipad上网速度很慢怎么回事?win7关闭135端口如何用命令关闭135端口googleadsense·什么是Google AdSense?如何加入Google AdSense? 谁可以告诉我吗?chromeframeicharts 怎么支持ie8迅雷下载速度迅雷下载快慢和什么有关迅雷下载速度为什么现在迅雷下载的速度比原来慢得多?
哈尔滨服务器租用 vps教程 n点虚拟主机管理系统 中文域名交易中心 主机测评 asp.net主机 香港机房 贵州电信宽带测速 警告本网站 国内加速器 500m空间 web服务器的架设 中国电信测网速 个人免费主页 视频服务器是什么 百度云加速 国外的代理服务器 贵阳电信测速 贵阳电信 免费稳定空间 更多