设为首页收藏本站language 语言切换
查看: 2322|回复: 4
收起左侧

[分享] 华为防火墙在数据中心QoS应用

[复制链接]
 成长值: 63400
发表于 2020-4-16 10:33:15 | 显示全部楼层 |阅读模式
数据中心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.jpg
配置思路
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)   




发表于 2020-4-16 15:09:31 | 显示全部楼层
  额额
沙发 2020-4-16 15:09:31 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-2-2 14:31 , Processed in 0.057998 second(s), 13 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表