No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

S12700 Series Agile Switches Typical Configuration Examples

This document provides examples for configuring features in typical usage scenarios.
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Example for Configuring Priority Re-marking and Queue Scheduling

Example for Configuring Priority Re-marking and Queue Scheduling

Overview

The device allocates or modifies priorities of received buckets based on rules, and schedules services based on allocated or modified priorities.

Priority re-marking enables the device to re-mark packet priorities. You can manually set or modify packet priorities to control packet scheduling and improve packet forwarding capability of the device.

Configuration Notes

This example applies to all versions of the S12700.

NOTE:
For details about software mappings, visit Hardware Query Tool and search for the desired product model.

Networking Requirements

In Figure 16-1, a company has three services: data query, email processing, and file transfer. The three services have different priorities. When HostA and HostB access servers of the three services, the services must be processed in descending order of priority. Priority re-marking and queue scheduling can achieve this.

Figure 16-1  Networking of priority re-marking and queue scheduling

Configuration Roadmap

The configuration roadmap is as follows:
  1. Configure traffic classifiers to classify packets based on servers' IP addresses.
  2. Configure traffic behaviors and define priority re-marking.
  3. Configure a traffic policy and bind the traffic policy to the traffic classifiers and traffic behaviors, and apply the traffic policy to GE1/0/1 in the inbound direction to re-mark priorities of incoming packets.
  4. Configure PQ on GE1/0/2 to schedule packets in descending order of priority.

Procedure

  1. Configure ACLs to classify packets based on servers' IP addresses.

    # Configure advanced ACL 3001 to classify packets with the destination IP address of 192.168.1.10.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] acl 3001
    [SwitchA-acl-adv-3001] rule permit ip destination 192.168.1.10 0.0.0.0
    [SwitchA-acl-adv-3001] quit
    

    # Configure advanced ACL 3002 to classify packets with the destination IP address of 192.168.1.11.

    [SwitchA] acl 3002
    [SwitchA-acl-adv-3002] rule permit ip destination 192.168.1.11 0.0.0.0
    [SwitchA-acl-adv-3002] quit
    

    # Configure advanced ACL 3003 to classify packets with the destination IP address of 192.168.1.12.

    [SwitchA] acl 3003
    [SwitchA-acl-adv-3003] rule permit ip destination 192.168.1.12 0.0.0.0
    [SwitchA-acl-adv-3003] quit
    

  2. Configure traffic classifiers to classify packets based on destination IP addresses.

    # Configure a traffic classifier named dbserver to match packets with the destination IP address of 192.168.1.10.

    [SwitchA] traffic classifier dbserver operator and
    [SwitchA-classifier-dbserver] if-match acl 3001  //Configure the device to match packets with the destination IP address of 192.168.1.10.
    [SwitchA-classifier-dbserver] quit

    # Configure a traffic classifier named mailserver to match packets with the destination IP address of 192.168.1.11.

    [SwitchA] traffic classifier mailserver operator and
    [SwitchA-classifier-mailserver] if-match acl 3002  //Configure the device to match packets with the destination IP address of 192.168.1.11.
    [SwitchA-classifier-mailserver] quit

    # Configure a traffic classifier named ftpserver to match packets with the destination IP address of 192.168.1.12.

    [SwitchA] traffic classifier ftpserver operator and
    [SwitchA-classifier-ftpserver] if-match acl 3003  //Configure the device to match packets with the destination IP address of 192.168.1.12.
    [SwitchA-classifier-ftpserver] quit

  3. Configure traffic behaviors and define priority re-marking.

    # Configure a traffic behavior named dbserver to re-mark packets destined for 192.168.1.10 with 4.

    [SwitchA] traffic behavior dbserver
    [SwitchA-behavior-dbserver] remark local-precedence 4  //Configure the device to re-mark the local priority of packets destined for 192.168.1.10 with 4.
    [SwitchA-behavior-dbserver] quit
    

    # Configure a traffic behavior named mailserver to re-mark packets destined for 192.168.1.11 with 3.

    [SwitchA] traffic behavior mailserver
    [SwitchA-behavior-mailserver] remark local-precedence 3  //Configure the device to re-mark the local priority of packets destined for 192.168.1.11 with 3.
    [SwitchA-behavior-mailserver] quit
    

    # Configure a traffic behavior named ftpserver to re-mark packets destined for 192.168.1.12 with 2.

    [SwitchA] traffic behavior ftpserver
    [SwitchA-behavior-ftpserver] remark local-precedence 2  //Configure the device to re-mark the local priority of packets destined for 192.168.1.12 with 2.
    [SwitchA-behavior-ftpserver] quit
    

  4. Configure a traffic policy and bind the traffic classifiers and traffic behaviors to the traffic policy.

    [SwitchA] traffic policy policy1
    [SwitchA-trafficpolicy-policy1] classifier dbserver behavior dbserver
    [SwitchA-trafficpolicy-policy1] classifier mailserver behavior mailserver
    [SwitchA-trafficpolicy-policy1] classifier ftpserver behavior ftpserver
    [SwitchA-trafficpolicy-policy1] quit
    

  5. Apply the traffic policy to GE1/0/1 to re-mark priorities of incoming packets.

    [SwitchA] interface gigabitethernet 1/0/1
    [SwitchA-GigabitEthernet1/0/1] traffic-policy policy1 inbound  //Apply the traffic policy in the inbound direction.
    [SwitchA-GigabitEthernet1/0/1] quit
    

  6. Configure PQ on GE1/0/2 to schedule packets in descending order of priority.

    [SwitchA] interface gigabitethernet 1/0/2
    [SwitchA-GigabitEthernet1/0/2] qos pq  //Configure PQ scheduling on the interface. In PQ mode, the device first schedules high-priority packets.
    [SwitchA-GigabitEthernet1/0/2] quit
    

  7. Verify the configuration.

    # Check the traffic policy configuration.

    [SwitchA] display traffic policy user-defined
      User Defined Traffic Policy Information:
      Policy: policy1
       Classifier: dbserver
        Operator: AND
         Behavior: dbserver
          Remark:                                    
            Remark local-precedence af4
       Classifier: mailserver
        Operator: AND
         Behavior: mailserver
          Remark:                                    
            Remark local-precedence af3
       Classifier: ftpserver
        Operator: AND
         Behavior: ftpserver
          Remark:                                    
            Remark local-precedence af2
    
    Total policy number is 1                                         
    

    # Check the traffic policy record. The traffic policy has been successfully applied to GE1/0/1.

    [SwitchA] display traffic-policy applied-record policy1
    -------------------------------------------------
      Policy Name:   policy1 
      Policy Index:  0
         Classifier:dbserver     Behavior:dbserver 
         Classifier:mailserver     Behavior:mailserver 
         Classifier:ftpserver     Behavior:ftpserver 
    -------------------------------------------------
     *interface GigabitEthernet1/0/1
        traffic-policy policy1 inbound  
          slot 1    :  success
    -------------------------------------------------
      Policy total applied times: 1.
    

Configuration Files

SwitchA configuration file

#
sysname SwitchA
#
acl number 3001
 rule 5 permit ip destination 192.168.1.10 0
acl number 3002
 rule 5 permit ip destination 192.168.1.11 0
acl number 3003
 rule 5 permit ip destination 192.168.1.12 0
#
traffic classifier dbserver operator and
 if-match acl 3001
traffic classifier ftpserver operator and
 if-match acl 3003
traffic classifier mailserver operator and
 if-match acl 3002
#
traffic behavior dbserver
 remark local-precedence af4
traffic behavior ftpserver
 remark local-precedence af2
traffic behavior mailserver
 remark local-precedence af3
#
traffic policy policy1 match-order config
 classifier dbserver behavior dbserver
 classifier mailserver behavior mailserver
 classifier ftpserver behavior ftpserver
#
interface GigabitEthernet1/0/1
 traffic-policy policy1 inbound
#
interface GigabitEthernet1/0/2
 qos pq
#
return
Download
Updated: 2019-05-16

Document ID: EDOC1000069466

Views: 184018

Downloads: 1838

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next