Example for Configuring Congestion Avoidance and Congestion Management on the S2700-52P-EI, S2700-52P-PWR-EI, S2710SI, S3700SI, and S3700EI
Networking Requirements
As shown in Figure 4-2, The Switch is connected to the router through GE 0/0/3 and 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.
Configure interfaces to trust 802.1p priorities of packets.
Set scheduling parameters of queues.
Set the drop threshold and drop probability of queues.
Procedure
- Configure the VLAN for each interface so that devices can communicate with each other.
<Quidway> system-view [Quidway] sysname Switch [Switch] vlan batch 10 20 30 [Switch] interface ethernet 0/0/1 [Switch-Ethernet0/0/1] port link-type trunk [Switch-Ethernet0/0/1] port trunk allow-pass vlan 10 20 30 [Switch-Ethernet0/0/1] quit [Switch] interface ethernet 0/0/2 [Switch-Ethernet0/0/2] port link-type trunk [Switch-Ethernet0/0/2] port trunk allow-pass vlan 10 20 30 [Switch-Ethernet0/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 interfaces 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 avoidance.
# Set the drop threshold and drop probability of queues.
[Switch] qos sred queue 2 red 500 discard-probability 1 yellow 1000 discard-probability 4 [Switch] qos sred queue 5 red 500 discard-probability 1 yellow 1000 discard-probability 4 [Switch] qos sred queue 7 red 500 discard-probability 1 yellow 1000 discard-probability 4
- Configure congestion management.
# Set the scheduling mode of each queue on Eth0/0/1 and Eth0/0/2 on the Switch.
[Switch] interface ethernet 0/0/1 [Switch-Ethernet0/0/1] qos wrr [Switch-Ethernet0/0/1] qos queue 7 wrr weight 0 [Switch-Ethernet0/0/1] qos queue 5 wrr weight 20 [Switch-Ethernet0/0/1] qos queue 2 wrr weight 10 [Switch-Ethernet0/0/1] quit [Switch] interface ethernet 0/0/2 [Switch-Ethernet0/0/2] qos wrr [Switch-Ethernet0/0/2] qos queue 7 wrr weight 0 [Switch-Ethernet0/0/2] qos queue 5 wrr weight 20 [Switch-Ethernet0/0/2] qos queue 2 wrr weight 10 [Switch-Ethernet0/0/2] quit
- Verify the configuration.
# View the global SRED configuration of the interface queue in the outbound direction.
[Switch] display qos sred Current sred configuration: qos sred queue-index 2 red 500 discard-probability 1 yellow 1000 discard-probability 4 qos sred queue-index 5 red 500 discard-probability 1 yellow 1000 discard-probability 4 qos sred queue-index 7 red 500 discard-probability 1 yellow 1000 discard-probability 4
Configuration Files
- Configuration file of the Switch
# sysname Switch # vlan batch 10 20 30 # qos sred queue 2 red 500 discard-probability 1 yellow 1000 discard-probability 4 qos sred queue 5 red 500 discard-probability 1 yellow 1000 discard-probability 4 qos sred queue 7 red 500 discard-probability 1 yellow 1000 discard-probability 4 # interface Ethernet0/0/1 port link-type trunk port trunk allow-pass vlan 10 20 30 qos queue 2 wrr weight 10 qos queue 5 wrr weight 20 qos queue 7 wrr weight 0 # interface Ethernet0/0/2 port link-type trunk port trunk allow-pass vlan 10 20 30 qos queue 2 wrr weight 10 qos queue 5 wrr weight 20 qos queue 7 wrr weight 0 # interface GigabitEthernet0/0/3 port link-type trunk port trunk allow-pass vlan 10 20 30 trust 8021p # return