The Switch is connected to the router through GE0/0/3; the 802.1p priorities of voice, video, and data services on the Internet are 6, 5, and 2 respectively, and these services can reach users through the router and Switch, as shown in Figure 1. The rate of inbound interface GE0/0/3 on the Switch is greater than the rates of outbound interfaces GE0/0/1 and GE0/0/2; therefore, congestion may occur on these two outbound interfaces.
To reduce the impact of network congestion and ensure bandwidth for high-priority and delay-sensitive services, set parameters based on Table 1 and Table 2.
Configure the VLAN for each interface so that devices can communicate with each other.
Create and configure a DiffServ domain on the Switch, map packets of 802.1p priorities to PHBs and colors of packets, and bind the DiffServ domain to an inbound interface on the Switch.
Create a WRED drop profile on the Switch and apply the WRED drop profile on an outbound interface.
Set scheduling parameters of queues of different CoS on outbound interfaces of the Switch.
<HUAWEI> system-view [HUAWEI] sysname Switch [Switch] vlan batch 2 5 6 [Switch] interface gigabitethernet 0/0/1 [Switch-GigabitEthernet0/0/1] port link-type trunk [Switch-GigabitEthernet0/0/1] port trunk allow-pass vlan 2 5 6 [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 2 5 6 [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 2 5 6 [Switch-GigabitEthernet0/0/3] quit
For the priority mapping configuration of the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-S, S5731S-H, S5732-H, S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735S-S, S5735-S-I, S6720-EI, S6720S-EI, S6720-HI, S6730-H, S6730S-H, S6730-S, and S6730S-S, refer to Configuring Priority Mapping. For the priority mapping configuration of the S2720-EI, S5720-LI, S5720S-LI, S5720-SI, S5720S-SI, S5720I-SI, S5730-SI, S5730S-EI, S6720-LI, S6720S-LI, S6720-SI, and S6720S-SI, refer to Configuring Priority Mapping.
The configuration in this step is applicable to the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S.
# Create DiffServ domain ds1, map packets of 802.1p priorities 6, 5, and 2 to PHBs EF, AF3, and AF1, and color packets as green, yellow, and red.
[Switch] diffserv domain ds1 [Switch-dsdomain-ds1] 8021p-inbound 6 phb ef green [Switch-dsdomain-ds1] 8021p-inbound 5 phb af3 yellow [Switch-dsdomain-ds1] 8021p-inbound 2 phb af1 red [Switch-dsdomain-ds1] quit
# Bind incoming interface GE0/0/3 on the Switch to DiffServ domain ds1.
[Switch] interface gigabitethernet 0/0/3 [Switch-GigabitEthernet0/0/3] trust upstream ds1 [Switch-GigabitEthernet0/0/3] trust 8021p inner [Switch-GigabitEthernet0/0/3] quit
# Create drop profile wred1 on the Switch and set parameters of packets of three colors.
[Switch] drop-profile wred1 [Switch-drop-wred1] color green low-limit 80 high-limit 100 discard-percentage 10 [Switch-drop-wred1] color yellow low-limit 60 high-limit 80 discard-percentage 20 [Switch-drop-wred1] color red low-limit 40 high-limit 60 discard-percentage 40 [Switch-drop-wred1] quit
# Apply drop profile wred1 on outbound interfaces GE0/0/1 and GE0/0/2 of the Switch.
[Switch] interface gigabitethernet 0/0/1 [Switch-GigabitEthernet0/0/1] qos wred wred1 [Switch-GigabitEthernet0/0/1] qos queue 5 wred wred1 [Switch-GigabitEthernet0/0/1] qos queue 3 wred wred1 [Switch-GigabitEthernet0/0/1] qos queue 1 wred wred1 [Switch-GigabitEthernet0/0/1] quit [Switch] interface gigabitethernet 0/0/2 [Switch-GigabitEthernet0/0/2] qos wred wred1 [Switch-GigabitEthernet0/0/2] qos queue 5 wred wred1 [Switch-GigabitEthernet0/0/2] qos queue 3 wred wred1 [Switch-GigabitEthernet0/0/2] qos queue 1 wred wred1 [Switch-GigabitEthernet0/0/2] quit
# Set scheduling parameters of queues of different CoS on outbound interfaces GE0/0/1 and GE0/0/2 of the Switch.
[Switch] interface gigabitethernet 0/0/1 [Switch-GigabitEthernet0/0/1] qos drr [Switch-GigabitEthernet0/0/1] qos queue 5 drr weight 0 [Switch-GigabitEthernet0/0/1] qos queue 3 drr weight 100 [Switch-GigabitEthernet0/0/1] qos queue 1 drr weight 50 [Switch-GigabitEthernet0/0/1] quit [Switch] interface gigabitethernet 0/0/2 [Switch-GigabitEthernet0/0/2] qos drr [Switch-GigabitEthernet0/0/2] qos queue 5 drr weight 0 [Switch-GigabitEthernet0/0/2] qos queue 3 drr weight 100 [Switch-GigabitEthernet0/0/2] qos queue 1 drr weight 50 [Switch-GigabitEthernet0/0/2] quit
# Check the configuration of DiffServ domain ds1.
[Switch] display diffserv domain name ds1
diffserv domain name:ds1
8021p-inbound 0 phb be green
8021p-inbound 1 phb af1 green
8021p-inbound 2 phb af1 red
8021p-inbound 3 phb af3 green
8021p-inbound 4 phb af4 green
8021p-inbound 5 phb af3 yellow
8021p-inbound 6 phb ef green
8021p-inbound 7 phb cs7 green
8021p-outbound be green map 0
......
# Check the configuration of drop profile wred1.
[Switch] display drop-profile name wred1 Drop-profile[1]: wred1 Queue depth : default Color Low-limit High-limit Discard-percentage - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Green 80 100 10 Yellow 60 80 20 Red 40 60 40 Non-tcp 100 100 100 -----------------------------------------------------------------
Only the display information of the S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-HI, S6730-H, S6730S-H, S6730-S, and S6730S-S contains the Queue depth field.
The display information of the S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-HI, S6730-H, S6730S-H, S6730-S, and S6730S-S does not contain the Non-tcp field.
# sysname Switch # vlan batch 2 5 to 6 # diffserv domain ds1 8021p-inbound 2 phb af1 red 8021p-inbound 5 phb af3 yellow 8021p-inbound 6 phb ef green # drop-profile wred1 color green low-limit 80 high-limit 100 discard-percentage 10 color yellow low-limit 60 high-limit 80 discard-percentage 20 color red low-limit 40 high-limit 60 discard-percentage 40 # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 2 5 to 6 qos drr qos queue 1 drr weight 50 qos queue 3 drr weight 100 qos queue 5 drr weight 0 qos wred wred1 qos queue 1 wred wred1 qos queue 3 wred wred1 qos queue 5 wred wred1 # interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan 2 5 to 6 qos drr qos queue 1 drr weight 50 qos queue 3 drr weight 100 qos queue 5 drr weight 0 qos wred wred1 qos queue 1 wred wred1 qos queue 3 wred wred1 qos queue 5 wred wred1 # interface GigabitEthernet0/0/3 port link-type trunk port trunk allow-pass vlan 2 5 to 6 trust upstream ds1 trust 8021p inner # return