Priority mapping table and priority marking configuration example

Network requirements

As shown in Figure 6:

Configure port priority, 802.1p-to-local mapping table, and priority marking to implement the plan as described in Table 2.

Table 2: Configuration plan

Traffic destination

Traffic priority order

Queuing plan

Traffic source

Output queue

Queue priority

Public servers

R&D department > Management department > Marketing department

R&D department

6

High

Management department

4

Medium

Marketing department

2

Low

Internet

Management department > Marketing department > R&D department

R&D department

2

Low

Management department

6

High

Marketing department

4

Medium

Figure 6: Network diagram

Configuration procedure

  1. Configure trusting port priority:

    # Set the port priority of to 3.

    <Device> system-view
    [Device] interface 
    [Device-] qos priority 3
    [Device-] quit
    

    # Set the port priority of to 4.

    [Device] interface 
    [Device-] qos priority 4
    [Device-] quit
    

    # Set the port priority of to 5.

    [Device] interface 
    [Device-] qos priority 5
    [Device-] quit
    
  2. Configure the 802.1p-to-local mapping table to map 802.1p priority values 3, 4, and 5 to local precedence values 2, 6, and 4.

    This guarantees the R&D department, Management department, and Marketing department decreased priorities to access the public servers.

    [Device] qos map-table dot1p-lp
    [Device-maptbl-dot1p-lp] import 3 export 2
    [Device-maptbl-dot1p-lp] import 4 export 6
    [Device-maptbl-dot1p-lp] import 5 export 4
    [Device-maptbl-dot1p-lp] quit
    
  3. Configure priority marking:

    # Create ACL 3000, and configure a rule to match HTTP packets.

    [Device] acl advance 3000
    [Device-acl-adv-3000] rule permit tcp destination-port eq 80
    [Device-acl-adv-3000] quit
    

    # Create a traffic class named http, and use ACL 3000 as a match criterion.

    [Device] traffic classifier http
    [Device-classifier-http] if-match acl 3000
    [Device-classifier-http] quit
    

    # Create a traffic behavior named admin, and configure a marking action for the Management department.

    [Device] traffic behavior admin
    [Device-behavior-admin] remark dot1p 4
    [Device-behavior-admin] quit
    

    # Create a QoS policy named admin, and associate traffic class http with traffic behavior admin in QoS policy admin.

    [Device] qos policy admin
    [Device-qospolicy-admin] classifier http behavior admin
    [Device-qospolicy-admin] quit
    

    # Apply QoS policy admin to the inbound direction of .

    [Device] interface 
    [Device-] qos apply policy admin inbound
    

    # Create a traffic behavior named market, and configure a marking action for the Marketing department.

    [Device] traffic behavior market
    [Device-behavior-market] remark dot1p 5
    [Device-behavior-market] quit
    

    # Create a QoS policy named market, and associate traffic class http with traffic behavior market in QoS policy market.

    [Device] qos policy market
    [Device-qospolicy-market] classifier http behavior market
    [Device-qospolicy-market] quit
    

    # Apply QoS policy market to the inbound direction of .

    [Device] interface 
    [Device-] qos apply policy market inbound
    

    # Create a traffic behavior named rd, and configure a marking action for the R&D department.

    [Device] traffic behavior rd
    [Device-behavior-rd] remark dot1p 3
    [Device-behavior-rd] quit
    

    # Create a QoS policy named rd, and associate traffic class http with traffic behavior rd in QoS policy rd.

    [Device] qos policy rd
    [Device-qospolicy-rd] classifier http behavior rd
    [Device-qospolicy-rd] quit
    

    # Apply QoS policy rd to the inbound direction of .

    [Device] interface 
    [Device-] qos apply policy rd inbound