Example for Configuring Congestion Management
Networking Requirements
As shown in Figure 5-9, The Switch is connected to the router through GE 0/0/3. The 802.1p priorities of voice, video, and data services from the Internet are 7, 5, and 2, and these services can reach users through the router and Switch. To reduce the impact of network congestion and ensure bandwidth for high-priority and low-delay services, you need to set the related parameters according to the following table.
Configuration Roadmap
Configure the VLAN for each interface so that devices can communicate with each other at the link layer.
Configure interfaces to trust 802.1p priorities of packets.
Configure the scheduling template and apply the scheduling template to the interface.
Procedure
- Configure the VLAN for each interface so that devices can
communicate with each other at the link layer.
<HUAWEI> system-view [HUAWEI] sysname Switch [Switch] vlan batch 10 20 30 [Switch] interface gigabitethernet 0/0/1 [Switch-GigabitEthernet0/0/1] port link-type trunk [Switch-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 20 30 [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 10 20 30 [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 10 20 30 [Switch-GigabitEthernet0/0/3] quit
- Configure the inbound interface of service packets to trust
packet priorities.
# Configure gigabitethernet0/0/3 to trust 802.1p priorities of packets.
[Switch] interface gigabitethernet 0/0/3 [Switch-GigabitEthernet0/0/3] trust 8021p [Switch-GigabitEthernet0/0/3] quit
- Configure congestion management.
# Create a scheduling template and set queue scheduling parameters.
[Switch] qos schedule-profile p1 [Switch-qos-schedule-profile-p1] qos wrr [Switch-qos-schedule-profile-p1] qos queue 7 wrr weight 0 [Switch-qos-schedule-profile-p1] qos queue 5 wrr weight 20 [Switch-qos-schedule-profile-p1] qos queue 2 wrr weight 10 [Switch-qos-schedule-profile-p1] quit
# Apply the scheduling template to GE 0/0/1 and GE 0/0/2 of the Switch.
[Switch] interface gigabitethernet 0/0/1 [Switch-GigabitEthernet0/0/1] qos schedule-profile p1 [Switch-GigabitEthernet0/0/1] quit [Switch] interface gigabitethernet 0/0/2 [Switch-GigabitEthernet0/0/2] qos schedule-profile p1 [Switch-GigabitEthernet0/0/2] quit
- Verify the configuration.
# View the scheduling template and queue scheduling parameters.
[Switch] qos schedule-profile p1 [Switch-qos-schedule-profile-p1] display this # qos schedule-profile p1 qos queue 2 wrr weight 10 qos queue 5 wrr weight 20 qos queue 7 wrr weight 0 # return
Configuration Files
Switch configuration file
# sysname Switch # vlan batch 10 20 30 # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 10 20 30 qos schedule-profile p1 # interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan 10 20 30 qos schedule-profile p1 # interface GigabitEthernet0/0/3 port link-type trunk port trunk allow-pass vlan 10 20 30 trust 8021p # qos schedule-profile p1 qos queue 2 wrr weight 10 qos queue 5 wrr weight 20 qos queue 7 wrr weight 0 # return