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

Boomer.host:$4.95/年-512MB/5GB/500GB/德克萨斯州(休斯顿)

部落曾经在去年分享过一次Boomer.host的信息,商家自述始于2018年,提供基于OpenVZ架构的VPS主机,配置不高价格较低。最近,主机商又在LET发了几款特价年付主机促销,最低每年仅4.95美元起,有独立IPv4+IPv6,开设在德克萨斯州休斯顿机房。下面列出几款VPS主机配置信息。CPU:1core内存:512MB硬盘:5G SSD流量:500GB/500Mbps架构:KVMIP/面板...

BGPTO独服折优惠- 日本独服65折 新加坡独服75折

BGPTO是一家成立于2017年的国人主机商,从商家背景上是国内的K总和有其他投资者共同创办的商家,主营是独立服务器业务。数据中心包括美国洛杉矶Cera、新加坡、日本大阪和香港数据中心的服务器。商家对所销售服务器产品拥有自主硬件和IP资源,支持Linux和Windows。这个月,有看到商家BGPTO日本和新加坡机房独服正进行优惠促销,折扣最低65折。第一、商家机房优惠券码这次商家的活动机房是新加坡...

vpsdime:VPS内存/2核/VPS,4G内存/2核/50gSSD/2T流量/达拉斯机房达拉斯机房,新产品系列-Windows VPS

vpsdime上了新产品系列-Windows VPS,配置依旧很高但是价格依旧是走低端线路。或许vpsdime的母公司Nodisto IT想把核心产品集中到vpsdime上吧,当然这只是站长个人的猜测,毕竟winity.io也是专业卖Windows vps的,而且也是他们自己的品牌。vpsdime是一家新上来不久的奇葩VPS提供商,实际是和backupspy以及crowncloud等都是同一家公司...

路由器限速为你推荐
2019年全省职业院校学生技能大赛幼儿搜狗拼音输入法4深圳市富满电子集团股份有限公司contributionsgraph仪器win7支持ipad支持ipad尺寸(mm)操作區域手控重庆宽带测速重庆联通宽带测速的网址是好多呢?itunes备份itunes就是备份不了怎么办啊
北京虚拟主机租用 西安域名注册 韩国vps vps交流 域名备案批量查询 n点虚拟主机管理系统 阿里云搜索 a2hosting singlehop locvps 美国主机评论 Dedicated 流媒体服务器 unsplash ixwebhosting 网通服务器ip 上海域名 申请个人网站 宁波服务器 gspeed 更多