锐捷NBR1200路由器限速命令

这篇文章由 在 星期日, 17 10月, 2010 发表。

  在NBR1200路由器中,有两组限速命令:

  •  NBR1200(config)#ip rate-limit
  •  NBR1200(config)#ip bandwidth-auto-adjust

  分别对应Web界面中的固定限速(ip rate-limit)和弹性带宽(ip bandwidth-auto-adjust)。下面举例具体用法:

  •   固定限速

1. 单个IP限速

ip rate-limit ip <IP地址> inbound <上行带宽> outbound <下行带宽> interface <接口>

举例:
  将192.168.1.235在接口FastEthernet1/0上,上传限制为400K,下载1000K。

NBR1200(config)# ip rate-limit ip 192.168.1.235 inbound 400 outbound 1000 interface FastEthernet1/0

2. IP地址范围限速

ip rate-limit iprange <开始IP> <结束IP> inbound <上行带宽> outbound <下行带宽> interface <接口>

举例:
  将192.168.1.2到192.168.1.199所有机器在接口FastEthernet1/0上,上传限制为400K,下载800K

NBR1200(config)# ip rate-limit iprange 192.168.1.2 192.168.1.199 inbound 400 outbound 800 interface FastEthernet 1/0

  •   弹性带宽、游戏优先/P2P限制

1. 接口总带宽

  要使用弹性带宽、游戏优先、P2P限制等功能,必须先设定接口总带宽。

ip bandwidth-auto-adjust total-bandwidth inbound <上行总带宽> outbound <下行总带宽> interface <接口>

举例:
  将FastEthernet1/1口上行总带宽设为8M,下行总带宽设为640k

NBR1200(config)# ip bandwidth-auto-adjust total-bandwidth inbound 640 outbound 8000 interface FastEthernet 1/0

2. 自动计算

  当没有具体的IP限速时,应当启用该条规则对IP的带宽自动限制。

ip bandwidth-auto-adjust auto-config interface <接口>

举例:
  在接口FastEthernet1/1上启用带宽自动计算

NBR1200(config)# ip bandwidth-auto-adjust auto-config interface fastethernet1/1

3. 游戏优先/P2P限制

  在接口启用全局游戏优先/P2P限制。

ip bandwidth-auto-adjust base-on-application interface <接口>

举例:
  在接口FastEthernet1/1启用游戏优先/P2P限制策略

NBR1200(config)#ip bandwidth-auto-adjust base-on-application interface FastEthernet 1/1

4. 单个IP限速

  单个IP进行弹性限速,如果指定可选参数[application],同时将该规则适用游戏优先/P2P限制功能,即只对p2p、下载、在线视频等应用的限速,对游戏、web优先;如果省略[application]参数,则对IP不区分应用整体限速。

ip bandwidth-auto-adjust ip <IP地址> inbound minimum <上行带宽> outbound minimum <下行带宽> interface <接口> [application]

举例:
  对192.168.1.200在接口FastEthernet1/1上进行游戏优先/P2P限速,上传512K,下载1M

NBR1200(config)#ip bandwidth-auto-adjust ip 192.168.1.200 inbound minimum 512 outbound minimum 1024 interface FastEthernet 1/1 application

5. IP地址范围限速
  语法和参数基本与单个IP限速一直,只是一个参数由ip变为iprange。

ip bandwidth-auto-adjust iprange <开始IP> <结束IP> inbound minimum <上行带宽> outbound minimum <下行带宽> interface <接口> [application]

举例:
  将192.168.1.200到192.168.1.254的所有机器在接口FastEthernet1/1上进行不区分应用的标准弹性限速,上传512K,下载1M

NBR1200(config)#ip bandwidth-auto-adjust iprange 192.168.1.200 192.168.1.254 inbound minimum 512 outbound minimum 1024 interface FastEthernet 1/1

注意:
  这里的inbound和outbound是相对于路由器来说的;inbound为路由器入站方向,即网络内机器上传流量;outbound为路由器出站方向,即网络内机器的下行流量。
  这里的K一律指Kbps,即kilo bits per second(千比特每秒),与KBps(注意第二个B的大小写,小写一般指bit即比特,大写一般指byte即字节)Kilo Bytes per second(千字节每秒)相差8倍。
  固定限速(ip rate-limit)的优先级比动态限速(ip bandwidth-auto-adjust)优先级高,比如同时用ip rate-limit和ip bandwidth-auto-adjust对同一IP进行限速,那么生效的将是ip rate-limit。


Leave a Reply