H3C-防火墙IP限速(工程常用)

简介

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

1. 下载限速

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

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

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

如果大家有任何疑问或者文中有错误跟疏忽的地方,欢迎大家留言指出,博主看到后会第一时间修改,谢谢大家的支持,更多技术文章尽在网络之路Blog(其他平台同名),版权归网络之路Blog所有,原创不易,侵权必究,觉得有帮助的,关注、转发、点赞支持下!~。

猜你喜欢

转载自blog.csdn.net/weixin_46948473/article/details/114801069
今日推荐