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

半月湾($59.99/年),升级带宽至200M起步 三网CN2 GIA线路

在前面的文章中就有介绍到半月湾Half Moon Bay Cloud服务商有提供洛杉矶DC5数据中心云服务器,这个堪比我们可能熟悉的某服务商,如果我们有用过的话会发现这个服务商的价格比较贵,而且一直缺货。这里,于是半月湾服务商看到机会来了,于是有新增同机房的CN2 GIA优化线路。在之前的文章中介绍到Half Moon Bay Cloud DC5机房且进行过测评。这次的变化是从原来基础的年付49....

RAKsmartCloud服务器,可自定义配置月$7.59

RAKsmart商家一直以来在独立服务器、站群服务器和G口和10G口大端口流量服务器上下功夫比较大,但是在VPS主机业务上仅仅是顺带,尤其是我们看到大部分主流商家都做云服务器,而RAKsmart商家终于开始做云服务器,这次试探性的新增美国硅谷机房一个方案。月付7.59美元起,支持自定义配置,KVM虚拟化,美国硅谷机房,VPC网络/经典网络,大陆优化/精品网线路,支持Linux或者Windows操作...

[黑五]ProfitServer新加坡/德国/荷兰/西班牙VPS五折,不限流量KVM月付2.88美元起

ProfitServer已开启了黑色星期五的促销活动,一直到本月底,商家新加坡、荷兰、德国和西班牙机房VPS直接5折,无码直购最低每月2.88美元起,不限制流量,提供IPv4+IPv6。这是一家始于2003年的俄罗斯主机商,提供虚拟主机、VPS、独立服务器、SSL证书、域名等产品,可选数据中心包括俄罗斯、法国、荷兰、美国、新加坡、拉脱维亚、捷克、保加利亚等多个国家和地区。我们随便以一个数据中心为例...

路由器限速为你推荐
enter苹果5支持ipadipadwifiIpad怎么用移动无线上网win10445端口win7系统不能被telnet端口号,端口、服务什么全都开了xp关闭445端口Windows XP系统 关闭445端口后无法上网,求解?重庆电信宽带管家电信的宽带上网助手是什么?联通iphone4北京 朝阳区 哪家联通店可以卖Iphone4的,本周周末过去买chromeframe谷歌浏览器(Chrome) 与(Chromium) 有什么区别?哪个更快?ipad上不了网平板电脑 能连接网络不能上网迅雷下载速度迅雷限制下载速度要设置多少
smartvps 便宜服务器 老鹰主机 特价空间 密码泄露 京东商城双十一活动 777te 老左来了 腾讯实名认证中心 天翼云盘 网站在线扫描 江苏双线服务器 空间首页登陆 万网主机管理 主机管理系统 镇江高防 国外网页代理 googlevoice 锐速 沈阳idc 更多