< Home

Example for Configuring Priority Mapping (Excluding the S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735-S-I, and S5735S-S)

Networking Requirements

As shown in Figure 1, GE0/0/3 on the Switch connects to the router. Departments 1 and 2 access the Internet through the Switch and router. Department 1 belongs to VLAN 100 and department 2 belongs to VLAN 200.

Department 1 requires better QoS guarantee. 802.1p priorities of packets from departments 1 and 2 are both 0. A DiffServ domain needs to be defined to map priorities of packets from departments 1 and 2 to 4 and 2 respectively so that differentiated services are provided.

Figure 1 Networking diagram of priority mapping

Configuration Roadmap

The configuration roadmap is as follows:
  1. Create VLANs and configure interfaces so that departments 1 and 2 can connect to the Internet through the Switch.
  2. Create DiffServ domains, and map 802.1p priorities to PHBs and colors.
  3. Bind DiffServ domains to GE0/0/1 and GE0/0/2 on the Switch respectively.

Procedure

  1. Create VLANs and configure interfaces.

    # Create VLAN 100 and VLAN 200.

    <HUAWEI> system-view
    [HUAWEI] sysname Switch
    [Switch] vlan batch 100 200

    # Configure GE0/0/1, GE0/0/2, and GE0/0/3 as trunk interfaces, add GE0/0/1 and GE0/0/2 to VLAN 100 and VLAN 200, and add GE0/0/3 to VLAN 100 and VLAN 200.

    [Switch] interface gigabitethernet 0/0/1
    [Switch-GigabitEthernet0/0/1] port link-type trunk
    [Switch-GigabitEthernet0/0/1] port trunk allow-pass vlan 100
    [Switch-GigabitEthernet0/0/1] quit
    [Switch] interface gigabitethernet 0/0/2
    [Switch-GigabitEthernet0/0/2] port link-type trunk
    [Switch-GigabitEthernet0/0/2] port trunk allow-pass vlan 200
    [Switch-GigabitEthernet0/0/2] quit
    [Switch] interface gigabitethernet 0/0/3
    [Switch-GigabitEthernet0/0/3] port link-type trunk
    [Switch-GigabitEthernet0/0/3] port trunk allow-pass vlan 100 200
    [Switch-GigabitEthernet0/0/3] quit

  2. Create and configure DiffServ domains.

    # Create DiffServ domains ds1 and ds2 on the Switch and map 802.1p priorities of packets from departments 1 and 2 to different CoS.

    [Switch] diffserv domain ds1
    [Switch-dsdomain-ds1] 8021p-inbound 0 phb af4 green
    [Switch-dsdomain-ds1] quit
    [Switch] diffserv domain ds2
    [Switch-dsdomain-ds2] 8021p-inbound 0 phb af2 green
    [Switch-dsdomain-ds2] quit

  3. Bind DiffServ domains to interfaces.

    # Bind DiffServ domains ds1 and ds2 to interfaces GE0/0/1 and GE0/0/2, respectively.

    [Switch] interface gigabitethernet 0/0/1
    [Switch-GigabitEthernet0/0/1] trust upstream ds1
    [Switch-GigabitEthernet0/0/1] quit
    [Switch] interface gigabitethernet 0/0/2
    [Switch-GigabitEthernet0/0/2] trust upstream ds2
    [Switch-GigabitEthernet0/0/2] quit

Configuration Files

  • Switch configuration file

    #
    sysname Switch
    #
    vlan batch 100 200
    # diffserv domain ds1  8021p-inbound 0 phb af4 green diffserv domain ds2  8021p-inbound 0 phb af2 green #
    interface GigabitEthernet0/0/1
     port link-type trunk
     port trunk allow-pass vlan 100
     trust upstream ds1
    #
    interface GigabitEthernet0/0/2
     port link-type trunk
     port trunk allow-pass vlan 200
     trust upstream ds2
    #
    interface GigabitEthernet0/0/3
     port link-type trunk
     port trunk allow-pass vlan 100 200
    #
    return
    
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >