As shown in Figure 1, SwitchA and SwitchB are connected to the router, and enterprises branches 1 and 2 can access the network through LSW1 and LSW2
Enterprise branch 1 requires better QoS guarantee. Therefore, the DSCP priority of data packets from enterprise branch 1 is mapped to 45, while the DSCP priority of those from enterprise branch 2 is mapped to 30. The Switch trusts DSCP priorities of packets. When congestion occurs, the Switch first processes packets of higher DSCP priority.
# Create VLAN 100.
<HUAWEI> system-view [HUAWEI] sysname SwitchA [SwitchA] vlan batch 100
# Set the link type of GE 0/0/1 and GE 0/0/2 to trunk and add them to VLAN 100.
[SwitchA] interface gigabitethernet 0/0/1 [SwitchA-GigabitEthernet0/0/1] port link-type trunk [SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 100 [SwitchA-GigabitEthernet0/0/1] quit [SwitchA] interface gigabitethernet 0/0/2 [SwitchA-GigabitEthernet0/0/2] port link-type trunk [SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 100 [SwitchA-GigabitEthernet0/0/2] quit
# Configure interfaces to trust DSCP priorities of packets.
[SwitchA] interface gigabitethernet 0/0/1 [SwitchA-GigabitEthernet0/0/1] trust dscp [SwitchA-GigabitEthernet0/0/1] quit [SwitchA] interface gigabitethernet 0/0/2 [SwitchA-GigabitEthernet0/0/2] trust dscp [SwitchA-GigabitEthernet0/0/2] quit
# Configure priority mapping.
[SwitchA] qos map-table dscp-dscp [SwitchA-dscp-dscp] input 0 to 63 output 45 [SwitchA-dscp-dscp] quit
# Create VLAN 200.
<HUAWEI> system-view [HUAWEI] sysname SwitchB [SwitchB] vlan batch 200
# Set the link type of GE 0/0/1 and GE 0/0/2 to trunk and add them to VLAN 200.
[SwitchB] interface gigabitethernet 0/0/1 [SwitchB-GigabitEthernet0/0/1] port link-type trunk [SwitchB-GigabitEthernet0/0/1] port trunk allow-pass vlan 200 [SwitchB-GigabitEthernet0/0/1] quit [SwitchB] interface gigabitethernet 0/0/2 [SwitchB-GigabitEthernet0/0/2] port link-type trunk [SwitchB-GigabitEthernet0/0/2] port trunk allow-pass vlan 200 [SwitchB-GigabitEthernet0/0/2] quit
# Configure interfaces to trust DSCP priorities of packets.
[SwitchB] interface gigabitethernet 0/0/1 [SwitchB-GigabitEthernet0/0/1] trust dscp [SwitchB-GigabitEthernet0/0/1] quit [SwitchB] interface gigabitethernet 0/0/2 [SwitchB-GigabitEthernet0/0/2] trust dscp [SwitchB-GigabitEthernet0/0/2] quit
# Configure priority mapping.
[SwitchB] qos map-table dscp-dscp [SwitchB-dscp-dscp] input 0 to 63 output 30 [SwitchB-dscp-dscp] quit
# View priority mapping information on SwitchA.
[SwitchA] display qos map-table dscp-dscp
Input DSCP DSCP
------------------------
0 45
1 45
2 45
3 45
4 45
......
63 45
# View the interface configuration on SwitchA.
[SwitchA] interface gigabitethernet 0/0/1 [SwitchA-GigabitEthernet0/0/1] display this # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 100 trust dscp # return [SwitchA-GigabitEthernet0/0/1] quit [SwitchA] interface gigabitethernet 0/0/2 [SwitchA-GigabitEthernet0/0/2] display this # interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan 100 trust dscp # return
# View priority mapping information on SwitchB.
[SwitchB] display qos map-table dscp-dscp
Input DSCP DSCP
------------------------
0 30
1 30
2 30
3 30
4 30
......
63 30
# View the interface configuration on SwitchB.
[SwitchB] interface gigabitethernet 0/0/1 [SwitchB-GigabitEthernet0/0/1] display this # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 200 trust dscp # return [SwitchB-GigabitEthernet0/0/1] quit [SwitchB] interface gigabitethernet 0/0/2 [SwitchB-GigabitEthernet0/0/2] display this # interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan 200 trust dscp # return
# sysname SwitchA # vlan batch 100 # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 100 trust dscp # interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan 100 trust dscp # qos map-table dscp-dscp input 0 to 44 output 45 input 46 to 63 output 45 # return
# sysname SwitchB # vlan batch 200 # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 200 trust dscp # interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan 200 trust dscp # qos map-table dscp-dscp input 0 to 29 output 30 input 31 to 63 output 30 # return
Technology Forum
QoS Issues - Issue 3 QoS Implementation - Simple Traffic Classification and Re-marking