Configuring Priority Mappings for VLAN Packets

This section describes how to configure priority mappings for VLAN packets and the application environment of this function.

Context

Traffic policy based on BA classification is used to map the precedence of traffic on one type of network to another type. That is, to transmit the traffic in the other network according to the original precedence.

When the NetEngine 8000 F serves as the border router for different networks, the original external priorities (802.1p values) in the VLAN packets that go into the NetEngine 8000 F are all mapped to the internal priorities of the router represented by service classes of DiffServ and colors. When the NetEngine 8000 F sends out the packet, the internal priority is mapped back to the external priority.

If unified scheduling is required for all upstream traffic on an interface, you can run the qos default-service-class command to configure the upstream traffic on the interface to enter the specific queues and provide corresponding services.

After this command is run, other packets cannot be enabled to enter the queues, and BA classification cannot be enabled.

Pre-configuration Tasks

Before configuring traffic shaping, complete the following tasks:

  • Configuring the physical parameters of interfaces

  • Configuring the link layer attributes of interfaces to ensure their normal operation

  • Configuring IP addresses for interfaces

  • Enabling the routing protocol for communication between devices

This configuration is supported only on the Admin VS.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run diffserv domain { ds-domain-name | default | 5p3d } [ domain-id domain-id-value ]

    A DS domain is defined and the DS domain view is displayed.

  3. Define traffic policies on the router based on the actual situation.

    • To define a traffic policy for incoming VLAN traffic, run the 8021p-inbound 8021p-value phb service-class [ color ] command.

    • To define a traffic policy for outgoing VLAN traffic, run the 8021p-outbound service-class color map 8021p-value command.

    Following DS domain templates are pre-defined by the system for VLAN packets: the 5p3d domain template, and the default domain template.

    • The 5p3d domain template describes mapping relations from the 802.1 priorities of VLAN packets to the QoS CoSs and colors, or from the QoS CoSs and colors to the 802.1 priorities. You can change the mapping relations in the 5p3d domain template. The 802.1p priorities of the packets from an upstream device are mapped to the QoS CoSs and colors. Their mapping relations are shown in Table 1. The QoS CoSs and colors of the packets going to a downstream device are mapped to the 802.1p priorities. Their mapping relations are shown in Table 2.

      Table 1 Mapping from the 802.1p value to the service-class and color

      802.1p

      Service

      Color

      0

      BE

      Yellow

      1

      BE

      Green

      2

      AF2

      Yellow

      3

      AF2

      Green

      4

      AF4

      Yellow

      5

      AF4

      Green

      6

      CS6

      Green

      7

      CS7

      Green

      Table 2 Mapping from the service-class and color to the 802.1p value

      Service

      Color

      802.1p

      BE

      Green

      1

      BE

      Yellow

      0

      BE

      Red

      0

      AF1

      Green

      1

      AF1

      Yellow

      0

      AF1

      Red

      0

      AF2

      Green

      3

      AF2

      Yellow

      2

      AF2

      Red

      2

      AF3

      Green

      3

      AF3

      Yellow

      2

      AF3

      Red

      2

      AF4

      Green

      5

      AF4

      Yellow

      4

      AF4

      Red

      4

      EF

      Green

      5

      EF

      Yellow

      4

      EF

      Red

      4

      CS6

      Green, Yellow, Red

      6

      CS7

      Green, Yellow, Red

      7

    • The default domain template describes the default mapping relations from the 802.1p priorities of VLAN packets to the QoS services classes and colors, or from the QoS services classes and colors to the 802.1p priorities. You can change the mapping relations in the default domain template. The 802.1p priorities of the packets from an upstream device are mapped to the QoS CoSs and colors. Their mapping relations are shown in Table 3. The QoS CoSs and colors of the packets going to a downstream device are mapped to the 802.1p priorities. Their mapping relations are shown in Table 4.

      Table 3 Default mapping from the IP Precedence/MPLS EXP/802.1p to the service-class and color

      IP Precedence/MPLS EXP/802.1p

      Service

      Color

      0

      BE

      Green

      1

      AF1

      Green

      2

      AF2

      Green

      3

      AF3

      Green

      4

      AF4

      Green

      5

      EF

      Green

      6

      CS6

      Green

      7

      CS7

      Green

      Table 4 Default mapping from the service-class and color to IP Precedence/MPLS EXP/802.1p

      Service

      Color

      IP Precedence/MPLS EXP/802.1p

      BE

      Green, Yellow, Red

      0

      AF1

      Green, Yellow, Red

      1

      AF2

      Green, Yellow, Red

      2

      AF3

      Green, Yellow, Red

      3

      AF4

      Green, Yellow, Red

      4

      EF

      Green, Yellow, Red

      5

      CS6

      Green, Yellow, Red

      6

      CS7

      Green, Yellow, Red

      7

  4. (Optional) Run field dei enable vlan { { vlan-id1 [ to vlan-id2 ] }&<1-10> | all } in the interface view.

    The DEI capability for a range of VLANs on an interface is specified. After you enable DEI for a VLAN and configure simple traffic classification, packets enter queues based on CoSs and are marked with different colors based on the values of their CFI fields.

    The DEI function takes effect only after simple traffic classification is configured and trust priority of 802.1p.

  5. Run commit

    The configuration is committed.

  6. Run quit

    Return to the system view.

  7. Perform the following operations based on the interfaces on which a traffic policy will be used:

    • Apply a traffic policy to VLAN packets on a Layer 3 sub-interface.
      1. To enter the sub-interface view, run the interface gigabitethernet interface-number.subnumber command.
      2. Bind the sub-interface to a DS domain.

        You can use either the qos phb enable command or trust upstream command to bind a Layer 3 sub-interface to a DS domain and map priorities for packets. The qos phb enable command, however, maps priorities only for downstream traffic. To map priorities for both upstream and downstream traffic, run the trust upstream command.

        • To bind the sub-interface to a DS domain and map priorities for packets, run the trust upstream { 5p3d | ds-domain-name | default } command.
        • To bind the sub-interface to a DS domain and map priorities only for downstream packets, run the qos phb enable { ds-domain-name | default } command.

          The undo qos phb disable command is mutually exclusive to the trust upstream.

      3. To enable 802.1 priority-based BA classification, run the trust { 8021p | inner-8021p | outer-8021p } [ inbound | outbound ] command.

        Before running the trust 8021p command on a sub-interface, use the trust upstream command to bind the sub-interface to a DS domain. Otherwise, the trust 8021p configuration does not take effect.

        After you add an interface to a DiffServ domain, the traffic policy configured for the domain automatically takes effect for the incoming and outgoing traffic on the interface.

    • Apply a traffic policy to VLAN packets on a Layer 2 interface.
      1. To enter the view of a Layer 3 interface, run the interface gigabitethernet interface-number command.
      2. To change the interface mode from Layer 3 to Layer 2, run the portswitch command.
      3. To add the Layer 2 interface to specific VLANs in tagged mode, run the port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | all } command.
      4. Bind the Layer 2 interface to a DS domain.

        You can use either the qos phb enable vlan command or trust upstream vlan command to bind a Layer 2 interface to a DS domain and map priorities for packets. The qos phb enable vlan command, however, maps priorities only for downstream traffic. To map priorities for both upstream and downstream traffic, run the trust upstream vlan command.

        • To bind the Layer 2 interface to a DS domain and map priorities for packets, run the trust upstream { 5p3d | ds-domain-name | default } [ inbound | outbound ] vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] command.
        • To bind the Layer 2 interface to a DS domain and map priorities only for downstream packets, run the qos phb enable { ds-domain-name | default | 5p3d } [ vlan { vlan-id1 [ to vlan-id2 ] } &<1-10> ] command.

          The qos phb enable command is mutually exclusive to the trust upstream vlan and qos phb disable commands on the Layer 2 interface.

      5. To enable 802.1 priority-based BA classification, run the trust 8021p [ inbound | outbound ] vlan { vlan-id1 [ to vlan-id2 ] } command.

  8. Run commit

    The configuration is committed.

Verifying the Configuration

Run the following commands to check the previous configuration.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >