华严寺天宫楼阁:总结下载限速5种配置方法 - 【H3C】华三技术论坛 — H3C-IToIP解决方案专家

来源:百度文库 编辑:中财网 时间:2024/05/10 12:16:05

总结下载限速5种配置方法

F系列防火墙限制下载速度的方法有很多,以下是我自己总结的最简单易行的5种方法,能解决99%的限速要求。:D

1. 下载限速
1.1 对网段限速
例如:对内网192.168.10.0/24网段下载限速2Mbps,每个IP下载速度不限制(但最大速度<2Mbps)
在全局模式下:
[F1000-C]qos carl 1 destination-ip-address subnet 192.168.10.1 24
“192.168.10.1”是网关地址
进入防火墙连接内网的接口:
[F1000-C]int g 0/1
[F1000-C-GigabitEthernet0/1]qos car outbound carl 1 cir 2000000 cbs 2000000 ebs 0 green pass red discard


1.2 对网段内所有IP限速
例如:对内网192.168.10.0/24网段中每个IP下载限速200Kbps,整个网段的下载速度不限制。
在全局模式下:
[F1000-C]qos carl 2 destination-ip-address subnet 192.168.10.1 24 per-address
“192.168.10.1”是网关地址
进入防火墙连接内网的接口:
[F1000-C]int g 0/1
[F1000-C-GigabitEthernet0/1]qos car outbound carl 2 cir 200000 cbs 200000 ebs 0 green pass


1.3 即对网段限速,又对IP限速
例如:内网192.168.10.0/24网段下载限速2Mbps,每个IP下载限速200kbps
在全局模式下:
[F1000-C]qos carl 1 destination-ip-address subnet 192.168.10.1 24
[F1000-C]qos carl 2 destination-ip-address subnet 192.168.10.1 24 per-address
“192.168.10.1”是网关地址
进入防火墙连接外网的接口:
[F1000-C]int g 1/0
[F1000-C-GigabitEthernet1/0]qos car inbound carl 1 cir 2000000 cbs 2000000 ebs 0 green pass

进入防火墙连接内网的接口:
[F1000-C]int g 0/1
[F1000-C-GigabitEthernet0/1]qos car outbound carl 2 cir 200000 cbs 200000 ebs 0 green pass


1.4 对某一个连续的IP地址范围限速
例如:对内网IP地址192.168.10.10192.168.10.100进行下载限速。
将上述配置中的参数“subnet 改为“range”即可:
[F1000-C]qos carl 3 destination-ip-address range 192.168.10.10 to 192.168.10.100

其他配置命令同上。

1.5 对任意IP地址限速
例如:需要对不同网段的多个IP地址限速,用qos carl虽然能实现,但比较罗唆。可以使用另一种限速方法。假设要对3IP地址:192.168.10.5192.168.3.910.10.10.88进行下载限速200kbps
定义ACL3000,加入需要限速的3IP地址
[F1000-C]acl num 3000
[F1000-C-acl-adv-3000]rule 0 permit ip destination 192.168.10.5 0
[F1000-C-acl-adv-3000]rule 1 permit ip destination 192.168.3.9 0
[F1000-C-acl-adv-3000]rule 2 permit ip destination 10.10.10.88 0
进入防火墙连接内网的接口:
[F1000-C]int g 0/1
[F1000-C-GigabitEthernet0/1] qos car outbound acl 3000 cir 200000 cbs 200000 ebs 0 green pass red discard


2. 上传限速
了解下载限速的方法后,要做到上传限速是很简单的,只需要将上述配置命令中蓝色的的参数做一个替换即可:
destination-ip-address
替换为:source-ip-address
outbound
替换为:inbound
destination
替换为:source