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

NE40E V800R010C10SPC500 Configuration Guide - QoS 01

This is NE40E V800R010C10SPC500 Configuration Guide - QoS
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 a Traffic Policy Based on Complex Traffic Classification Under a MPLS Network

Example for Configuring a Traffic Policy Based on Complex Traffic Classification Under a MPLS Network

This part describes the configuration and application of traffic classifiers and traffic behaviors in the context of traffic policy based on complex traffic classification.

Networking Requirements

As shown in Figure 5-8, PE1, P, and PE2 are routers on an MPLS backbone network. CE1 and CE2 are access routers on the edge of the backbone network. Three users from the local network access the Internet through CE1.

  • On CE1, the CIR of the traffic of the user from the network segment 1.1.1.0 is limited to 10 Mbit/s and the CBS is limited to 150000 bytes.

  • On CE1, the CIR of the traffic of the user from the network segment 2.1.1.0 is limited to 5 Mbit/s and the CBS is limited to 100000 bytes.

  • On CE1, the CIR of the traffic of the user from the network segment 3.1.1.0 is limited to 2 Mbit/s and the CBS is limited to 100000 bytes.

  • On CE1, the DSCP values of the service packets from the three network segments are re-marked to 40, 26, and 0.

  • PE1 accesses the MPLS backbone network at the CIR of 15 Mbit/s, the CBS of 300000 bytes, the PIR of 20 Mbit/s, and the PBS of 500000 bytes.

  • On CE1, the CIR, CBS, and PIR of the UDP protocol packets (except DNS, SNMP, SNMP Trap, and Syslog packets) are respectively limited to 5 Mbit/s, 100000 bytes, and 15 Mbit/s.

NOTE:

Interfaces 1 through 4 in this example are GE 1/0/0, GE 2/0/0, GE 3/0/0, GE 4/0/0, respectively.

Figure 5-8 Diagram for configuring a traffic policy based on complex traffic classification

Configuration Notes

When configuring traffic policies based on complex traffic classification, pay attention to the following:

  • If both the if-match any and deny parameters are configured in the complex traffic classification rules on an interface, all packets, including protocol packets, are discarded by the interface. Therefore, use caution when configuring both the if-match any and deny parameters in a traffic classification rule.
  • If the permit or deny parameter is configured in both the rule command and the traffic behavior view, only packets that are permitted are further processed according to the configured traffic behavior. If the deny action is configured in either the rule command or the traffic behavior view, all matched packets are discarded.

Configuration Roadmap

The configuration roadmap is as follows:

  1. Define ACL rules.

  2. Configure traffic classifiers.

  3. Configure traffic behaviors.

  4. Configure traffic policies.

  5. Apply the traffic policies to interfaces.

Data Preparation

To complete the configuration, you need the following data:

  • ACL numbers 2001, 2002, 2003, 3001, and 3002

  • Re-marked DSCP values 40, 26, and 0 for the packets from the three network segments

  • CIRs of the traffic from users belonging to the three network segments, which are respectively 10 Mbit/s, 5 Mbit/s, and 2 Mbit/s, with their respective CBSs being 150000 bytes, 100000 bytes, and 100000 bytes

  • CIR of the UDP protocol packets (except DNS, SNMP, SNMP Trap, and Syslog packets) on CE1, which is 5 Mbit/s, the CBS, which is 100000 bytes, and the PIR, which is 15 Mbit/s

  • CIR of PE1, which is 15 Mbit/s; the CBS, which is 300000 bytes; the PIR, which is 20 Mbit/s; and the PBS, which is 500000 bytes.

  • Traffic classifier name, traffic behavior name, traffic policy name, and the interface number where the traffic policy is applied

Procedure

  1. Configure the IP addresses for the interfaces, routes, and basic MPLS functions (detail omitted here).
  2. Configure complex traffic classification on CE1 to control the traffic that accesses CE1 from the three local networks.

    # Define ACL rules.

    <CE1> system-view
    [~CE1] acl number 2001
    [*CE1-acl-basic-2001] rule permit source 1.1.1.0 0.0.0.255
    [*CE1-acl-basic-2001] commit
    [~CE1-acl-basic-2001] quit
    [~CE1] acl number 2002
    [*CE1-acl-basic-2002] rule permit source 2.1.1.0 0.0.0.255
    [*CE1-acl-basic-2002] commit
    [~CE1-acl-basic-2002] quit
    [~CE1] acl number 2003
    [*CE1-acl-basic-2003] rule permit source 3.1.1.0 0.0.0.255
    [*CE1-acl-basic-2003] commit
    [~CE1-acl-basic-2003] quit
    [~CE1] acl number 3001
    [*CE1-acl-basic-3001] rule 0 permit udp destination-port eq dns
    [*CE1-acl-basic-3001] rule 1 permit udp destination-port eq snmp
    [*CE1-acl-basic-3001] rule 2 permit udp destination-port eq snmptrap
    [*CE1-acl-basic-3001] rule 3 permit udp destination-port eq syslog 
    [*CE1-acl-basic-3001] commit
    [~CE1-acl-basic-3001] quit
    [~CE1] acl number 3002
    [*CE1-acl-basic-3002] rule 4 permit udp 
    [*CE1-acl-basic-3002] commit
    [~CE1-acl-basic-3002] quit

    # Configure traffic classifiers and define ACL-based matching rules.

    [*CE1] traffic classifier a
    [*CE1-classifier-a] if-match acl 2001
    [*CE1-classifier-a] commit
    [~CE1-classifier-a] quit
    [~CE1] traffic classifier b
    [*CE1-classifier-b] if-match acl 2002
    [*CE1-classifier-b] commit
    [~CE1-classifier-b] quit
    [~CE1] traffic classifier c
    [*CE1-classifier-c] if-match acl 2003
    [*CE1-classifier-c] commit
    [~CE1-classifier-c] quit
    [~CE1]traffic classifier udplimit
    [*CE1-classifier-udplimit] if-match acl 3001
    [*CE1-classifier-udplimit] commit
    [~CE1-classifier-udplimit] quit
    [~CE1] traffic classifier udplimit1
    [*CE1-classifier-udplimit1] if-match acl 3002
    [*CE1-classifier-udplimit1] commit
    [~CE1-classifier-udplimit1] quit

    After the configuration is complete, run the display traffic classifier command to view the configuration of the traffic classifiers.

    [~CE1] display traffic classifier user-defined
    User Defined Classifier Information:
       Classifier: a
        Description:
        Operator: or
        Rule(s):
          if-match acl 2001
       Classifier: b
        Description:
        Operator: or
        Rule(s):
          if-match acl 2002
       Classifier: c
        Description:
        Operator: or
        Rule(s):
          if-match acl 2003
       Classifier: udplimit
        Description:
        Operator: or
        Rule(s) :
          if-match acl 3001
       Classifier: udplimit1
        Description:
        Operator: or
        Rule(s) :
          if-match acl 3002

    # Define traffic behaviors, and configure traffic policing and DSCP values to be re-marked.

    [~CE1] traffic behavior e
    [*CE1-behavior-e] car cir 10000 cbs 150000 pbs 0
    [*CE1-behavior-e] remark dscp 40
    [*CE1-behavior-e] commit
    [~CE1-behavior-e] quit
    [~CE1] traffic behavior f
    [*CE1-behavior-f] car cir 5000 cbs 100000 pbs 0
    [*CE1-behavior-f] remark dscp 26
    [*CE1-behavior-f] commit
    [~CE1-behavior-f] quit
    [~CE1] traffic behavior g
    [*CE1-behavior-g] car cir 2000 cbs 100000 pbs 0
    [*CE1-behavior-g] remark dscp 0
    [*CE1-behavior-g] commit
    [~CE1-behavior-g] quit
    [~CE1] traffic behavior udplimit
    [*CE1-behavior-udplimit] permit
    [*CE1-behavior-udplimit] commit
    [~CE1-behavior-udplimit] quit
    [~CE1] traffic behavior udplimit1
    [*CE1-behavior-udplimit1] car cir 15000 pir 20000 cbs 300000 pbs 500000 green pass yellow pass red discard
    [*CE1-behavior-udplimit1] commit
    [~CE1-behavior-udplimit1] quit

    # Define traffic policies and associate traffic classifiers and traffic behaviors.

    [~CE1] traffic policy 1
    [*CE1-trafficpolicy-1] classifier a behavior e
    [*CE1-trafficpolicy-1] commit
    [~CE1-trafficpolicy-1] quit
    [~CE1] traffic policy 2
    [*CE1-trafficpolicy-2] classifier b behavior f
    [*CE1-trafficpolicy-2] commit
    [~CE1-trafficpolicy-2] quit
    [~CE1] traffic policy 3
    [*CE1-trafficpolicy-3] classifier c behavior g
    [*CE1-trafficpolicy-3] commit
    [~CE1-trafficpolicy-3] quit
    [~CE1] traffic policy udplimit
    [*CE1-trafficpolicy-udplimit] classifier udplimit behavior udplimit
    [*CE1-trafficpolicy-udplimit] classifier udplimit1 behavior udplimit1
    [*CE1-trafficpolicy-3] commit
    [~CE1-trafficpolicy-3] quit

    After the preceding configuration, run the display traffic policy command to view the configuration of the traffic policies, traffic classifiers defined in the traffic policies, and the traffic behaviors associated with traffic classifiers.

    [~CE1] display traffic policy user-defined
    User Defined Traffic Policy Information:
      Total: 4095  Used: 3     Free: 4092
    Policy: 1
      Total: 256 Used: 2 Free: 254
       Description:
       Step: 5 
       Share-mode
         Classifier: a Precedence: 5 
         Behavior: e
          Committed Access Rate:
            CIR 10000 (Kbps), PIR 0 (Kbps), CBS 15000 (byte), PBS 0 (byte)
            Conform Action: pass
            Yellow  Action: pass
            Exceed  Action: discard
          Marking:
            Remark DSCP cs5
         Classifier: default-class Precedence: 65535
         Behavior:   be
           -none-  
    Policy: 2
      Total: 256 Used: 2 Free: 254
       Description:
       Step: 5 
       Share-mode
         Classifier: b Precedence: 5 
         Behavior: f
          Committed Access Rate:
            CIR 5000 (Kbps), PIR 0 (Kbps), CBS 100000 (byte), PBS 0 (byte)
            Conform Action: pass
            Yellow  Action: pass
            Exceed  Action: discard
          Marking:
            Remark DSCP af31     
         Classifier: default-class Precedence: 65535
         Behavior:   be
           -none-  
    Policy: 3
      Total: 256 Used: 2 Free: 254
       Description:
       Step: 5 
       Share-mode
         Classifier: c Precedence: 5 
         Behavior: g
          Committed Access Rate:
            CIR 2000 (Kbps), PIR 0 (Kbps), CBS 100000 (byte), PBS 0 (byte)
            Conform Action: pass
            Yellow  Action: pass
            Exceed  Action: discard
          Marking:
            Remark DSCP default
         Classifier: default-class Precedence: 65535
         Behavior:   be
           -none-  
    Policy: udplimit
      Total: 256 Used: 2 Free: 254
       Description:
       Step: 5 
       Share-mode
         Classifier: udplimit Precedence: 5 
         Behavior: udplimit
          -none-
         Classifier: udplimit1 Precedence: 10 
         Behavior: udplimit1
          Committed Access Rate:
           CIR 15000 (Kbps), PIR 20000 (Kbps), CBS 300000 (byte), PBS 500000 (byte)
           Conform Action: pass
           Yellow  Action: pass
           Exceed  Action: discard  
         Classifier: default-class Precedence: 65535
         Behavior:   be
           -none-  

    # Apply the traffic policies to the inbound interfaces.

    [~CE1] interface gigabitethernet 1/0/0
    [~CE1-GigabitEthernet1/0/0] undo shutdown
    [*CE1-GigabitEthernet1/0/0] traffic-policy 1 inbound
    [*CE1-GigabitEthernet1/0/0] commit
    [~CE1-GigabitEthernet1/0/0] quit
    [~CE1] interface gigabitethernet 3/0/0
    [~CE1-GigabitEthernet3/0/0] undo shutdown
    [*CE1-GigabitEthernet3/0/0] traffic-policy 2 inbound
    [*CE1-GigabitEthernet3/0/0] commit
    [~CE1-GigabitEthernet3/0/0] quit
    [~CE1] interface gigabitethernet 4/0/0
    [~CE1-GigabitEthernet4/0/0] undo shutdown
    [*CE1-GigabitEthernet4/0/0] traffic-policy 3 inbound
    [*CE1-GigabitEthernet4/0/0] commit
    [~CE1-GigabitEthernet4/0/0] quit
    [~CE1] interface gigabitethernet 2/0/0
    [~CE1-GigabitEthernet2/0/0] undo shutdown
    [*CE1-GigabitEthernet2/0/0] traffic-policy udplimit outbound
    [*CE1-GigabitEthernet2/0/0] commit
    [~CE1-GigabitEthernet2/0/0] quit

  3. Configure complex traffic classification on PE1 to control the traffic that goes to the MPLS backbone network.

    # Configure a traffic classifier and define the matching rule.

    <PE1> system-view
    [~PE1] traffic classifier pe
    [*PE1-classifier-pe] if-match any
    [*PE1-classifier-pe] commit
    [~PE1-classifier-pe] quit

    After the preceding configuration, you can run the display traffic classifier command to view the configuration of the traffic classifier.

    [~PE1] display traffic classifier user-defined
    User Defined Classifier Information:
       Classifier: pe
        Description:
        Operator: OR
    Rule(s):
      if-match any

    # Define a traffic behavior and configure traffic policing.

    [~PE1] traffic behavior pe
    [*PE1-behavior-pe] car cir 15000 pir 20000 cbs 300000 pbs 500000
    [*PE1-behavior-pe] commit
    [~PE1-behavior-pe] quit

    # Define a traffic policy to associate the traffic classifier with the traffic behavior.

    [~PE1] traffic policy pe
    [*PE1-trafficpolicy-pe] classifier pe behavior pe
    [*PE1-trafficpolicy-pe] commit
    [~PE1-trafficpolicy-pe] quit

    After the preceding configuration, run the display traffic policy command to view the configuration of the traffic policies, traffic classifiers defined in the traffic policies, and the traffic behaviors associated with traffic classifiers.

    [~PE1] display traffic policy user-defined
    User Defined Traffic Policy Information:
      Total: 4095  Used: 3     Free: 4092
    Policy: 1
       Description:
       Step: 5 
       Share-mode
         Classifier: a Precedence: 5 
         Behavior: e
          Committed Access Rate:
            CIR 10000 (Kbps), PIR 0 (Kbps), CBS 15000 (byte), PBS 0 (byte)
            Conform Action: pass
            Yellow  Action: pass
            Exceed  Action: discard
          Marking:
            Remark DSCP cs5
         Classifier: default-class Precedence: 65535
         Behavior:   be
           -none-  

    # Apply the traffic policies to the incoming traffic.

    [~PE1] interface gigabitethernet 1/0/0
    [~PE1-GigabitEthernet1/0/0] undo shutdown
    [*PE1-GigabitEthernet1/0/0] traffic-policy pe inbound
    [*PE1-GigabitEthernet1/0/0] commit
    [~PE1-GigabitEthernet1/0/0] quit

  4. Verify the configuration.

    Run the display interface command on CE1 and PE1. You can view that the traffic on the interfaces are regulated according to the configured traffic policies.

Configuration Files

  • Configuration file of CE1

    #
     sysname CE1
    #
    acl number 2001
     rule 5 permit source 1.1.1.0 0.0.0.255
    acl number 2002
     rule 5 permit source 2.1.1.0 0.0.0.255
    acl number 2003
     rule 5 permit source 3.1.1.0 0.0.0.255
    acl number 3001 
     rule 0 permit udp destination-port eq dns   
     rule 1 permit udp destination-port eq snmp  
     rule 2 dpermit udp destination-port eq snmptrap 
     rule 3 permit udp destination-port eq syslog
    acl number 3302
     rule 4 permit udp 
    #
    traffic classifier a operator or
     if-match acl 2001
    traffic classifier c operator or
     if-match acl 2003
    traffic classifier b operator or
     if-match acl 2002
    traffic classifier udp-limit operator or 
     if-match acl 3001
    traffic classifier udp-limit1 operator or 
     if-match acl 3002
    #
    traffic behavior e
     car cir 10000 cbs 150000 pbs 0 green pass red discard
     remark dscp cs5
    traffic behavior g
     car cir 2000 cbs 100000 pbs 0 green pass red discard
     remark dscp default
    traffic behavior f
     car cir 5000 cbs 100000 pbs 0 green pass red discard
     remark dscp af31
    traffic behavior udp-limit
    traffic behavior udp-limit1
     car cir 5000 cbs 100000 pbs 150000 green pass yellow discard red discard 
    #
    traffic policy 3
     classifier c behavior g precedence 5
    traffic policy 2
     classifier b behavior f precedence 5
    traffic policy 1
     classifier a behavior e precedence 5
    traffic policy udp-limit  
     classifier udp-limit behavior udp-limit precedence 5
     classifier udp-limit1 behavior udp-limit1 precedence 10
    #
    interface GigabitEthernet1/0/0
    undo shutdown
    ip address 1.1.1.1 255.255.255.0
     traffic-policy 1 inbound
    #
    interface GigabitEthernet2/0/0
    undo shutdown
    ip address 10.1.1.1 255.255.255.0
    traffic-policy udplimit outbound
    #
    interface GigabitEthernet3/0/0
    undo shutdown
    ip address 2.1.1.1 255.255.255.0
     traffic-policy 2 inbound
    #
    interface GigabitEthernet4/0/0
    undo shutdown
    ip address 3.1.1.1 255.255.255.0
     traffic-policy 3 inbound
    #
    ospf 1
     area 0.0.0.0
      network 1.1.1.0 0.0.0.255
      network 2.1.1.0 0.0.0.255
      network 3.1.1.0 0.0.0.255
      network 10.1.1.0 0.0.0.255
    #
    return 
  • Configuration file of PE1

    #
     sysname PE1
    #
    mpls lsr-id 11.11.11.11
    mpls
    #
    mpls ldp
    #
    traffic classifier pe operator or
     if-match any
    #
    traffic behavior pe
     car cir 15000 pir 20000 cbs 300000 pbs 500000 green pass yellow pass red discard
    #
    traffic policy pe
     classifier pe behavior pe
    #
    interface GigabitEthernet1/0/0
    undo shutdown
    ip address 10.1.1.2 255.255.255.0
     traffic-policy pe inbound
    #
    interface GigabitEthernet2/0/0
    undo shutdown
    ip address 10.10.1.1 255.255.255.0
    mpls
    mpls ldp
    #
    interface LoopBack0
     ip address 11.11.11.11 255.255.255.255
    #
    ospf 1
     area 0.0.0.0
      network 10.1.1.0 0.0.0.255
      network 10.10.1.0 0.0.0.255
      network 11.11.11.11 0.0.0.0
    #
    return 
  • Configuration file of P

    #
     sysname P
    #
    mpls lsr-id 33.33.33.33
    mpls
    #
    mpls ldp
    #
    interface GigabitEthernet1/0/0
     ip address 10.10.1.2 255.255.255.0
     mpls
     mpls ldp
    #
    interface GigabitEthernet2/0/0
     ip address 10.11.1.1 255.255.255.0
     mpls
     mpls ldp
    #
    interface LoopBack0
     ip address 33.33.33.33 255.255.255.255
    #
    ospf 1
     area 0.0.0.0
      network 10.10.1.0 0.0.0.255
      network 10.11.1.0 0.0.0.255
      network 33.33.33.33 0.0.0.0
    #
    return
  • Configuration file of PE2

    #
     sysname PE2
    #
    mpls lsr-id 22.22.22.22
    mpls
    #
    mpls ldp
    #
    interface GigabitEthernet1/0/0
    undo shutdown
    ip address 10.12.1.2 255.255.255.0
    #
    interface GigabitEthernet2/0/0
     undo shutdown
    ip address 10.11.1.1 255.255.255.0
     mpls
     mpls ldp
    #
    interface LoopBack0
     ip address 22.22.22.22 255.255.255.255
    #
    ospf 10
     area 0.0.0.0
      network 10.11.1.0 0.0.0.255
      network 10.12.1.0 0.0.0.255
      network 22.22.22.22 0.0.0.0
    #
    return
  • Configuration file of CE2

    #
     sysname CE2
    #
    interface GigabitEthernet2/0/0
    undo shutdown
     ip address 10.12.1.1 255.255.255.0
    #
    ospf 1
     area 0.0.0.0
      network 10.12.1.0 0.0.0.255
    #
    return
Translation
Download
Updated: 2019-01-03

Document ID: EDOC1100055024

Views: 23243

Downloads: 115

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