Example for Configuring Complex Traffic Classification on QinQ Termination Sub-interfaces

This section provides an example of how to configure complex traffic classification on QinQ termination sub-interfaces.

Networking Requirements

On the network shown in Figure 1, SwitchA is connected to the operator network through Device A. SwitchB is connected to the operator network through Device B. Complex traffic classification is configured on GE 0/1/8.1 (a QinQ termination sub-interface) of Device A to limit the rate of traffic sent by users attached to SwitchA to 10 Mbit/s and limit the CBS to 150000 bytes.

For details on how to configure QinQ termination sub-interfaces, see the chapter "QinQ Configuration" in the HUAWEI NetEngine 8000 F Series Router Configuration Guide - LAN Access and MAN Access.

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

Figure 1 Network diagram for configuring complex traffic classification on QinQ termination sub-interfaces

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure the GE0/1/8.1 interfaces on DeviceA and DeviceB as QinQ termination sub-interfaces.

  2. Configure complex traffic classification-based traffic policing on the QinQ termination sub-interfaces.

Data Preparation

To complete the configuration, you need the following data:

  • IP address of each interface

  • Ranges of VLAN IDs in packet tags to be removed by QinQ termination sub-interfaces

  • Rate (10 Mbit/s) of traffic sent from users attached to SwitchA and CBS (150000 bytes)

  • Traffic classifier name, traffic behavior name, and traffic policy name, and interface to which the traffic policy is applied

Procedure

  1. Configure an IGP on the backbone network. This example uses OSPF as an IGP. For details on how to configure OSPF, see the chapter "OSPF Configuration" in the HUAWEI NetEngine 8000 F Series Router Configuration Guide- IP Routing.

    # Configure Device A.

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceA
    [*HUAWEI] commit
    [~DeviceA] interface gigabitethernet 0/1/0
    [~DeviceA-GigabitEthernet0/1/0] undo shutdown
    [*DeviceA-GigabitEthernet0/1/0] ip address 10.10.1.1 24
    [*DeviceA-GigabitEthernet0/1/0] commit
    [~DeviceA-GigabitEthernet0/1/0] quit
    [~DeviceA] ospf
    [*DeviceA-ospf-1] area 0
    [*DeviceA-ospf-1-area-0.0.0.0] network 10.10.1.0 0.0.0.255
    [*DeviceA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
    [*DeviceA-ospf-1-area-0.0.0.0] commit
    [~DeviceA-ospf-1-area-0.0.0.0] quit
    [~DeviceA-ospf-1] quit

    # Configure Device B.

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceB
    [*HUAWEI] commit
    [~DeviceB] interface gigabitethernet 0/1/0
    [~DeviceB-GigabitEthernet0/1/0] undo shutdown
    [*DeviceB-GigabitEthernet0/1/0] ip address 10.10.1.2 24
    [*DeviceB-GigabitEthernet0/1/0] commit
    [~DeviceB-GigabitEthernet0/1/0] quit
    [~DeviceB] ospf
    [*DeviceB-ospf-1] area 0
    [*DeviceB-ospf-1-area-0.0.0.0] network 10.10.1.0 0.0.0.255
    [*DeviceB-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
    [*DeviceB-ospf-1-area-0.0.0.0] commit
    [~DeviceB-ospf-1-area-0.0.0.0] quit
    [~DeviceB-ospf-1] quit

  2. Configure QinQ termination sub-interfaces.

    # Configure a QinQ termination sub-interface on Device A.

    [~DeviceA] interface gigabitethernet 0/1/8.1
    [*DeviceA-GigabitEthernet0/1/8.1] control-vid 1 qinq-termination
    [*DeviceA-GigabitEthernet0/1/8.1] qinq termination pe-vid 100 ce-vid 10 to 20
    [*DeviceA-GigabitEthernet0/1/8.1] ip address 10.1.1.1 24
    [*DeviceA-GigabitEthernet0/1/8.1] commit
    [~DeviceA-GigabitEthernet0/1/8.1] quit

    # Configure a QinQ termination sub-interface on Device B.

    [~DeviceB] interface gigabitethernet 0/1/8.1
    [*DeviceB-GigabitEthernet0/1/8.1] control-vid 1 qinq-termination
    [*DeviceB-GigabitEthernet0/1/8.1] qinq termination pe-vid 100 ce-vid 10 to 20
    [*DeviceB-GigabitEthernet0/1/8.1] ip address 10.2.1.1 24
    [*DeviceB-GigabitEthernet0/1/8.1] commit
    [~DeviceB-GigabitEthernet0/1/8.1] quit

  3. Configure complex traffic classification on the QinQ termination sub-interface of Device A.

    # Configure a traffic classifier and define matching rules.

    [~DeviceA] traffic classifier c1
    [*DeviceA-classifier-c1] if-match any
    [*DeviceA-classifier-c1] commit
    [~DeviceA-classifier-c1] quit

    # Define a traffic behavior.

    [~DeviceA] traffic behavior b1
    [*DeviceA-behavior-b1] car cir 10000 cbs 150000 pbs 0
    [*DeviceA-behavior-b1] commit
    [~DeviceA-behavior-b1] quit

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

    [~DeviceA] traffic policy p1
    [~DeviceA-trafficpolicy-p1] classifier c1 behavior b1
    [*DeviceA-trafficpolicy-p1] commit
    [~DeviceA-trafficpolicy-p1] quit

    # After you complete the preceding configurations, run the display traffic policy command to check the configurations of the traffic policy, traffic classifier, and traffic behavior.

    [~DeviceA] display traffic policy user-defined
      User Defined Traffic Policy Information:
      Policy: p1
       Classifier: default-class
         Behavior: be
          -none-
       Classifier: c1
         Behavior: b1
          Committed Access Rate:
            CIR 10000 (Kbps), PIR 0 (Kbps), CBS 150000 (byte), PBS 0 (byte)
            Conform Action: pass
            Yellow  Action: pass
            Exceed  Action: discard

    # Apply the traffic policy to interfaces.

    [~DeviceA] interface gigabitethernet 0/1/8.1
    [*DeviceA-GigabitEthernet0/1/8.1] traffic-policy p1 inbound
    [*DeviceA-GigabitEthernet0/1/8.1] commit
    [~DeviceA-GigabitEthernet0/1/8.1] quit

  4. Verify the configuration.

    After you apply the traffic policy to GE 0/1/8.1 of Device A, the sub-interface accepts only 10 Mbit/s traffic and discards nonconforming traffic.

Configuration Files

  • Configuration file of Device A

    #
     sysname DeviceA
    #
    traffic classifier c1 operator or
     if-match any
    #
    traffic behavior b1
     car cir 10000 cbs 150000 green pass red discard
    #
    traffic policy p1
     classifier c1 behavior b1 precedence 1
    #
    interface GigabitEthernet0/1/0
     undo shutdown
     ip address 10.10.1.1 255.255.255.0
    #
    interface GigabitEthernet0/2/0.1
     control-vid 1 qinq-termination
     qinq termination pe-vid 100 ce-vid 10 to 20
     ip address 10.1.1.1 255.255.255.0
     traffic-policy p1 inbound
    #
    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
    #
    return
  • Configuration file of Device B

    #
     sysname DeviceB
    #
    interface GigabitEthernet0/1/0
     undo shutdown
     ip address 10.10.1.2 255.255.255.0
    #
    interface GigabitEthernet0/2/0.1
     control-vid 1 qinq-termination
     qinq termination pe-vid 100 ce-vid 10 to 20
     ip address 10.2.1.1 255.255.255.0
    #
    ospf 1
     area 0.0.0.0
      network 10.2.1.0 0.0.0.255
      network 10.10.1.0 0.0.0.255
    #
    return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >