2024年3月17日发(作者:)

5种配置H3C防火墙限速方法

1

对网段限速

例如:对内网

10.10.10.0/24

网段下载限速

2Mbps

,每个

IP

下载速度不限制

但 最大速度

<2Mbps)

在全局模式下:

[F1000-C]qos carl 1 destination-ip-addresssubnet 10.10.10.1 24

10.10.10.1

是网”关地址 进入防火墙连接内网的接口:

[F1000-C]int g 0/1

[F1000-C-GigabitEthernet0/1]qos caroutbound carl 1 cir 2000000 cbs 2000000 ebs 0

green pass red discard

2

对网段内所有

IP

限速

例如:对内网

10.10.10.0/24

网段中每个

IP

下载限速

200Kbps

,整个网段的下 载速度不限

制。

在全局模式下:

[F1000-C]qos carl 2 destination-ip-addresssubnet 10.10.10.1 24 per-address

10.10.10.1

是网”关地址

进入防火墙连接内网的接口:

[F1000-C]int g 0/1

[F1000-C-GigabitEthernet0/1]qos caroutbound carl 2 cir 200000 cbs 200000 ebs 0

green pass

3

即对网段限速,又对

IP

限速

例如:内网

10.10.10.0/24

网段下载限速

2Mbps

,每个

IP

下载限速

200kbps

。 在全局模

式下:

[F1000-C]qos carl 1 destination-ip-addresssubnet 10.10.10.1 24 [F1000-C]qos carl 2

destination-ip-addresssubnet 10.10.10.1 24 per-address

10.10.10.1

是网”关地址

进入防火墙连接外网的接口:

[F1000-C]int g 1/0

[F1000-C-GigabitEthernet1/0]qos carinbound carl 1 cir 2000000 cbs 2000000 ebs 0

green pass

进入防火墙连接内网的接口:

[F1000-C]int g 0/1

[F1000-C-GigabitEthernet0/1]qos caroutbound carl 2 cir 200000 cbs 200000 ebs 0

green pass

4

对某一个连续的

IP

地址范围限速

例如:对内网

IP

地址

10.10.10.10

10.10.10.20

进行下载限速。

将上述配置中的参数“

sub net”

改为“

range”

即可:

[F1000-C]qos carl 3 destination-ip-addressrange 10.10.10.10to 10.10.10.20

其他配置命令同上。

5

对任意

IP

地址限速

例如:需要对不同网段的多个

IP

地址限速,用

qos carl

虽然能实现,但比较罗 唆。可以

使用另一种限速方法。 假设要对

3

IP

地址

:192.168.10.5

192.168.3.9

10.10.10.88

进行下载限速

200kbps

定义

ACL3000,

加入需要限速的

3

IP

地址

[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 caroutbound acl 3000 cir 200000 cbs 200000 ebs 0

green pass red discard

了解下载限速的方法后, 要做到上传限速是很简单的, 只需要将上述配置命令 中蓝色的

的参数做一个替换即可:

destination-ip-address

替换为:

source-ip-address

outbound

替换为:

inbound

destination

替换为:

source

2011-08-14