成长值: 63400
|
数据中心QoS应用
数据中心部署了多台不同类型的服务器,可通过QoS实现同一用户访问不同类型服务器的报文优先级不同,不同区域用户访问同一服务器的报文优先级不同。
组网需求
如图1所示,PC通过USG与三台服务器连接,需要实现如下需求:
需求一:当PC_A和PC_B访问服务器时,USG优先处理PC_A和PC_B访问数据库服务器的报文,其次处理PC_A和PC_B访问邮件服务器的报文,最后处理PC_A和PC_B访问文件服务器的报文。
需求二:如果三台PC同时访问服务器,USG优先处理PC_C发出的报文。
配置思路
1配置USG接口IP地址并加入相应安全区域,配置域间包过滤规则。
2为实现需求一,需要重新标记去往三台服务器的DSCP优先级,对应数据库服务器、邮件服务器和文件服务器分别标记为EF类、AF类和BE类。
3为实现需求二,需要配置接口优先级,并且该接口优先级应高于EF类对应的本地优先级。只有二层接口卡接口视图下支持配置接口优先级,因此GigabitEthernet 5/0/0接口需要使用二层接口卡中的接口。
操作步骤
1 配置USG基本数据。
# 配置各接口IP地址。
<USG> system-view
[USG] interface GigabitEthernet 0/0/1
[USG-GigabitEthernet0/0/1] ip address 192.168.0.1 24
[USG-GigabitEthernet0/0/1] quit
[USG] interface GigabitEthernet 5/0/0
[USG-GigabitEthernet5/0/0] ip address 10.1.1.1 24
[USG-GigabitEthernet5/0/0] quit
[USG] interface GigabitEthernet 0/0/2
[USG-GigabitEthernet0/0/2] ip address 172.16.0.1 24
[USG-GigabitEthernet0/0/2] quit
# 配置各接口加入相应安全区域。
[USG] firewall zone untrust
[USG-zone-untrust] add interface GigabitEthernet 0/0/1
[USG-zone-untrust] quit
[USG] firewall zone trust
[USG-zone-trust] add interface GigabitEthernet 5/0/0
[USG-zone-trust] quit
[USG] firewall zone dmz
[USG-zone-dmz] add interface GigabitEthernet 0/0/2
[USG-zone-dmz] quit
# 配置域间包过滤规则。
[USG] policy interzone untrust dmz inbound
[USG-policy-interzone-dmz-untrust-inbound] policy 1
[USG-policy-interzone-dmz-untrust-inbound-1] policy destination 172.16.0.2 0
[USG-policy-interzone-dmz-untrust-inbound-1] policy destination 172.16.0.3 0
[USG-policy-interzone-dmz-untrust-inbound-1] policy destination 172.16.0.4 0
[USG-policy-interzone-dmz-untrust-inbound-1] action permit
[USG-policy-interzone-dmz-untrust-inbound-1] quit
[USG-policy-interzone-dmz-untrust-inbound] quit
[USG] policy interzone trust dmz outbound
[USG-policy-interzone-trust-dmz-outbound] policy 1
[USG-policy-interzone-trust-dmz-outbound-1] policy destination 172.16.0.2 0
[USG-policy-interzone-trust-dmz-outbound-1] policy destination 172.16.0.3 0
[USG-policy-interzone-trust-dmz-outbound-1] policy destination 172.16.0.4 0
[USG-policy-interzone-trust-dmz-outbound-1] action permit
[USG-policy-interzone-trust-dmz-outbound-1] quit
[USG-policy-interzone-trust-dmz-outbound] quit
2配置流分类。
# 定义高级ACL 3000,对目的IP地址为172.16.0.2的报文进行分类。
[USG] acl 3000
[USG-acl-adv-3000] rule permit ip destination 172.16.0.2 0
[USG-acl-adv-3000] quit
# 定义高级ACL 3001,对目的IP地址为172.16.0.3的报文进行分类。
[USG] acl 3001
[USG-acl-adv-3001] rule permit ip destination 172.16.0.3 0
[USG-acl-adv-3001] quit
# 定义高级ACL 3002,对目的IP地址为172.16.0.4的报文进行分类。
[USG] acl 3002
[USG-acl-adv-3002] rule permit ip destination 172.16.0.4 0
[USG-acl-adv-3002] quit
# 定义类classifier_dbserver,匹配高级ACL 3000。
[USG] traffic classifier classifier_dbserver
[USG-classifier-classifier_dbserver] if-match acl 3000
[USG-classifier-classifier_dbserver] quit
# 定义类classifier_mserver,匹配高级ACL 3001。
[USG] traffic classifier classifier_mserver
[USG-classifier-classifier_mserver] if-match acl 3001
[USG-classifier-classifier_mserver] quit
# 定义类classifier_fserver,匹配高级ACL 3002。
[USG] traffic classifier classifier_fserver
[USG-classifier-classifier_fserver] if-match acl 3002
[USG-classifier-classifier_fserver] quit
4 配置流行为。
# 定义流行为behavior_dbserver,动作为重标记报文的DSCP优先级为ef(DSCP值为46)。
[USG] traffic behavior behavior_dbserver
[USG-behavior-behavior_dbserver] remark dscp ef
[USG-behavior-behavior_dbserver] quit
# 定义流行为behavior_mserver,动作为重标记报文的DSCP优先级为af43(DSCP值为38)。
[USG] traffic behavior behavior_mserver
[USG-behavior-behavior_mserver] remark dscp af43
[USG-behavior-behavior_mserver] quit
# 定义流行为behavior_fserver,动作为重标记报文的DSCP优先级为default(DSCP值为0)。
[USG] traffic behavior behavior_fserver
[USG-behavior-behavior_fserver] remark dscp default
[USG-behavior-behavior_fserver] quit
4配置基于类的Qos策略policy_server,为类指定流行为,并应用于接口。
[USG] qos policy policy_server
[USG-qospolicy-policy_server] classifier classifier_dbserver behavior behavior_dbserver
[USG-qospolicy-policy_server] classifier classifier_mserver behavior behavior_mserver
[USG-qospolicy-policy_server] classifier classifier_fserver behavior behavior_fserver
[USG-qospolicy-policy_server] quit
[USG] interface GigabitEthernet 0/0/1
[USG-GigabitEthernet0/0/1] qos apply policy policy_server inbound
[USG-GigabitEthernet0/0/1] quit
5配置接口优先级。
说明: 由于PC_A和PC_B访问服务器的DSCP最高优先级为46,对应的本地优先级为5.,因此只需配置接口优先级高于5即可。
[USG] interface GigabitEthernet 5/0/0
[USG-GigabitEthernet5/0/0] qos priority 6
[USG-GigabitEthernet5/0/0] quit
操作结果
在任意视图下执行命令display qos policy interface GigabitEthernet 0/0/1,查看该接口的策略配置信息和运行情况。
<USG> display qos policy interface GigabitEthernet 0/0/1
Interface: GigabitEthernet0/0/1
Direction: Inbound
Policy: policy_server
Classifier: default-class
Matched : 0/0 (Packets/Bytes)
Rule(s) : if-match any
Behavior: be
-none-
Classifier: classifier_dbserver
Matched : 2718174/271817400 (Packets/Bytes)
Offered rate : 7144746 bps, drop rate : 212352 bps
Operator: AND
Rule(s) : if-match acl 3000
Behavior: behavior_dbserver
Marking:
Remark DSCP ef
Remarked: 2715625 (Packets)
Classifier: classifier_mserver
Matched : 0/0 (Packets/Bytes)
Offered rate : 7244746 bps, drop rate : 222352 bps
Operator: AND
Rule(s) : if-match acl 3001
Behavior: behavior_mserver
Marking:
Remark DSCP af43
Remarked: 0 (Packets)
Classifier: classifier_fserver
Matched : 0/0 (Packets/Bytes)
Offered rate : 7344746 bps, drop rate : 232352 bps
Operator: AND
Rule(s) : if-match acl 3002
Behavior: behavior_fserver
Marking:
Remark DSCP default
Remarked: 0 (Packets)
|
|