华为三层交换机基于IP限速
企业网用户的IP为10.0.0.2/24,通过Switch连接Internet。Switch为运营商设备。企业网用户只租用了1Mbps的上行带宽和2Mbps的下行带宽。图1普通CAR配置组网
http://www.iyunv.com/uploadfile/2011/0825/20110825090110846.png
配置思路
流量监管功能是通过QoS命令行实现。本案例中,用户采用固定IP,因此可以通过匹配用户IP地址的方法匹配用户流量,并对其做流量监管。
配置步骤
# 配置ACL规则匹配源IP为10.0.0.2的流量
<H3C> system-view
acl number 3001
rule permit ip source 10.0.0.2 0
quit
# 配置ACL规则匹配目的IP为10.0.0.2的流量
acl number 3002
rule permit ip destination 10.0.0.2 0
quit
# 配置流分类,匹配ACL规则3001,即匹配源IP为10.0.0.2的流量
traffic> if-match acl 3001
quit
# 配置流分类,匹配ACL规则3002,即匹配目的IP为10.0.0.2的流量
traffic> if-match acl 3002
quit
# 配置流行为,用于对上行流量进行流量监管,速率为1000kbps
traffic behavior uplink
car cir 1000
quit
# 配置流行为,用于对下行流量进行流量监管,速率为2000kbps
traffic behavior downlink
car cir 2000
quit
# 配置QoS策略,用于端口入方向,即用户的上行方向
qos policy uplink
> quit
# 配置QoS策略,用于端口出方向,即用户的下行方向
qos policy downlink
> quit
# 在端口上下发QoS策略,匹配出入方向的流量
interface GigabitEthernet 3/0/1
qos apply policy uplink inbound
qos apply policy downlink outbound
页:
[1]