酒店网络,用S5560做了一个中心交换机,做DHCP服务使用,需要针对IP限速,这个需要怎么做?
(0)
最佳答案
# 配置ACL2001和2002,分别匹配来源于Server和Host A的报文流。
[DeviceA] acl number 2001
[DeviceA-acl-basic-2001] rule permit source 1.1.1.1 0
[DeviceA-acl-basic-2001] quit
[DeviceA] acl number 2002
[DeviceA-acl-basic-2002] rule permit source 1.1.1.2 0
[DeviceA-acl-basic-2002] quit
# 创建流分类server,匹配规则为ACL 2001;创建流分类host,匹配规则为ACL 2002。
[DeviceA] traffic classifier server
[DeviceA-classifier-server] if-match acl 2001
[DeviceA-classifier-server] quit
[DeviceA] traffic classifier host
[DeviceA-classifier-host] if-match acl 2002
[DeviceA-classifier-host] quit
# 创建流行为server,动作为流量监管,cir为102400kbps,对超出限制的报文(红色报文)将其DSCP优先级设置为0后发送。
[DeviceA] traffic behavior server
[DeviceA-behavior-server] car cir 102400 red remark-dscp-pass 0
[DeviceA-behavior-server] quit
# 创建流行为host,动作为流量监管,cir为25600kbps,由于默认对红色报文的处理方式就是丢弃,因此无需配置。
[DeviceA] traffic behavior host
[DeviceA-behavior-host] car cir 25600
[DeviceA-behavior-host] quit
# 创建QoS策略,命名为car,将流分类server和流行为server进行关联;将流分类host和流行为host进行关联。
[DeviceA-qospolicy-car] classifier server behavior server
[DeviceA-qospolicy-car] classifier host behavior host
[DeviceA-qospolicy-car] quit
# 将QoS策略car应用到端口GigabitEthernet1/0/1的入方向上。
[DeviceA] interface GigabitEthernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] qos apply policy car inbound
# 配置高级ACL3001,匹配HTTP报文。
[DeviceB] acl number 3001
[DeviceB-acl-adv-3001] rule permit tcp destination-port eq 80
[DeviceB-acl-adv-3001] quit
# 创建流分类http,匹配ACL 3001。
[DeviceB] traffic classifier http
[DeviceB-classifier-http] if-match acl 3001
[DeviceB-classifier-http] quit
# 创建流分类class,匹配所有报文。
[DeviceB] traffic classifier class
[DeviceB-classifier-class] if-match any
[DeviceB-classifier-class] quit
# 创建流行为car_inbound,动作为流量监管,cir为204800kbps,由于默认对红色报文的处理方式就是丢弃,因此无需配置。
[DeviceB] traffic behavior car_inbound
[DeviceB-behavior-car_inbound] car cir 204800
[DeviceB-behavior-car_inbound] quit
# 创建流行为car_outbound,动作为流量监管,cir为102400kbps。
[DeviceB] traffic behavior car_outbound
[DeviceB-behavior-car_outbound] car cir 102400
[DeviceB-behavior-car_outbound] quit
# 创建QoS策略,命名为car_inbound,将流分类class和流行为car_inbound进行关联。
[DeviceB] qos policy car_inbound
[DeviceB-qospolicy-car_inbound] classifier class behavior car_inbound
[DeviceB-qospolicy-car_inbound] quit
# 创建QoS策略,命名为car_outbound,将流分类http和流行为car_outbound进行关联。
[DeviceB] qos policy car_outbound
[DeviceB-qospolicy-car_outbound] classifier http behavior car_outbound
# 将QoS策略car_inbound应用到端口GigabitEthernet1/0/1的入方向上。
[DeviceB] interface GigabitEthernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] qos apply policy car_inbound inbound
# 将QoS策略car_outbound应用到端口GigabitEthernet1/0/2的出方向上。
[DeviceB] interface GigabitEthernet 1/0/2
[DeviceB-GigabitEthernet1/0/2] qos apply policy car_outbound outbound
具体参照:http://www.h3c.com/cn/d_201804/1075358_30005_0.htm#_Toc509596447
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论