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.
# 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
# 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
# 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
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
Technology Forum
QoS Issues - Issue 3 QoS Implementation - Simple Traffic Classification and Re-marking