No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

S12700 Series Agile Switches Typical Configuration Examples

This document provides examples for configuring features in typical usage scenarios.
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Example for Configuring Congestion Avoidance and Congestion Management

Example for Configuring Congestion Avoidance and Congestion Management

Overview

Congestion management implements queuing and scheduling when sending packet flows. Based on the queuing and scheduling policies, the device provides the following congestion management technologies: Priority Queuing (PQ), Weighted Deficit Round Robin (WDRR), Weighted Round Robin (WRR), PQ+WDRR, and PQ+WRR. The device has eight queues on each interface in the outbound direction, which are identified by index numbers 0 to 7. Based on the mappings between local priorities and queues, the device sends the classified packets to queues, and then schedules the packets using queue scheduling mechanisms.

Congestion avoidance is a flow control mechanism. A system configured with congestion avoidance monitors network resource usage such as queues and memory buffers. When congestion occurs or aggravates, the system discards packets. Congestion avoidance uses tail drop and random drop policies to discard packets. Random drop policies include the Simple Random Early Detection (SRED) and Weighted Random Early Detection (WRED).

This example uses PQ+WDRR scheduling to implement congestion management. In WRR scheduling, the number of times packets are scheduled in each queue is directly proportional to the weight of this queue. A higher weight indicates more times packets are scheduled. WRR schedules packets based on the number of packets. That is, large-sized packets are more likely to be scheduled and obtain more bandwidth. WDRR schedules packets considering the packet length, ensuring that packets are scheduled with the same probability. WRED is configured to implement congestion avoidance. The device discards excess traffic according to the maximum drop probability.

Configuration Notes

This example applies to all versions of the S12700. This example does not apply to X series cards because they do not support the qos wred command.

NOTE:
For details about software mappings, visit Hardware Query Tool and search for the desired product model.

Networking Requirements

In Figure 16-7, the Switch is connected to the router through GE2/0/1. The 802.1p priorities of voice, video, and data services from the Internet are 6, 5, and 2, respectively, and these services can reach residential users through the router and Switch. On the Switch, the rate of GE2/0/1 (inbound interface) is higher than the rates of GE1/0/1 and GE1/0/2 (outbound interfaces), so congestion may occur on the two outbound interfaces.

To reduce the impact of network congestion and ensure bandwidth for high-priority and delay-sensitive services, set parameters according to Table 16-2 and Table 16-3.

Table 16-2  Congestion avoidance parameters

Service Type

Color

Lower Drop Threshold (%)

Upper Drop Threshold (%)

Maximum Drop Probability

Voice

Green

80

100

10

Video

Yellow

60

80

20

Data

Red

40

60

40

Table 16-3  Congestion management parameters

Service Type

CoS Value

WDRR

Voice

EF

0

Video

AF3

100

Data

AF1

50

Figure 16-7  Networking of congestion avoidance and congestion management

Configuration Roadmap

The configuration roadmap is as follows:
  1. Configure a VLAN for each interface so that devices can communicate with each other at the link layer.

  2. Create a DiffServ domain on the Switch to map 802.1p priorities of different service packets to PHBs and colors, and bind the DiffServ domain to the inbound interface of the Switch.

  3. Configure a WRED profile on the Switch and apply the WRED profile to the outbound interfaces.

  4. Set scheduling parameters of each queue on the outbound interface of the Switch.

Procedure

  1. Configure a 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 2 5 6
    [Switch] interface gigabitethernet 1/0/1
    [Switch-GigabitEthernet1/0/1] port link-type trunk
    [Switch-GigabitEthernet1/0/1] port trunk allow-pass vlan 2 5 6
    [Switch-GigabitEthernet1/0/1] quit
    [Switch] interface gigabitethernet 1/0/2
    [Switch-GigabitEthernet1/0/2] port link-type trunk
    [Switch-GigabitEthernet1/0/2] port trunk allow-pass vlan 2 5 6
    [Switch-GigabitEthernet1/0/2] quit
    [Switch] interface gigabitethernet 2/0/1
    [Switch-GigabitEthernet2/0/1] port link-type trunk
    [Switch-GigabitEthernet2/0/1] port trunk allow-pass vlan 2 5 6
    [Switch-GigabitEthernet2/0/1] quit
    

  2. Configure priority mapping.

    # Create a DiffServ domain ds1 to map 802.1p priorities 6, 5, 2 to PHBs of EF, AF3, and AF1 and colors of green, yellow, and red respectively.

    [Switch] diffserv domain ds1
    [Switch-dsdomain-ds1] 8021p-inbound 6 phb ef green  //Create a DiffServ domain to map 802.1p priorities of different service packets to PHBs so that packets enter different queues.
    [Switch-dsdomain-ds1] 8021p-inbound 5 phb af3 yellow
    [Switch-dsdomain-ds1] 8021p-inbound 2 phb af1 red
    [Switch-dsdomain-ds1] quit
    

    # Bind the DiffServ domain to GE2/0/1 of the Switch.

    [Switch] interface gigabitethernet 2/0/1
    [Switch-GigabitEthernet2/0/1] trust upstream ds1  //Apply the DiffServ domain to the interface.
    [Switch-GigabitEthernet2/0/1] trust 8021p inner  //Configure the interface to trust 802.1p priorities.
    [Switch-GigabitEthernet2/0/1] quit

  3. Configure congestion avoidance.

    # Create a WRED profile wred1 on the Switch and set scheduling parameters in the WRED profile.

    [Switch] drop-profile wred1
    [Switch-drop-wred1] color green low-limit 80 high-limit 100 discard-percentage 10  //Configure a WRED drop profile, and set the upper and lower drop threshold and maximum drop probability for green packets.
    [Switch-drop-wred1] color yellow low-limit 60 high-limit 80 discard-percentage 20  //When the percentage of the yellow packet length to the queue length reaches 60%, the device starts to discard packets with the maximum drop probability of 20%. When the percentage of the yellow packet length to the queue length reaches 80%, the device discards all new packets.
    [Switch-drop-wred1] color red low-limit 40 high-limit 60 discard-percentage 40
    [Switch-drop-wred1] quit
    

    # Apply the WRED profile wred1 to GE1/0/1 and GE1/0/2 on the Switch.

    [Switch] interface gigabitethernet 1/0/1
    [Switch-GigabitEthernet1/0/1] qos wred wred1
    [Switch-GigabitEthernet1/0/1] qos queue 5 wred wred1
    [Switch-GigabitEthernet1/0/1] qos queue 3 wred wred1
    [Switch-GigabitEthernet1/0/1] qos queue 1 wred wred1
    [Switch-GigabitEthernet1/0/1] quit
    [Switch] interface gigabitethernet 1/0/2
    [Switch-GigabitEthernet1/0/2] qos wred wred1
    [Switch-GigabitEthernet1/0/2] qos queue 5 wred wred1
    [Switch-GigabitEthernet1/0/2] qos queue 3 wred wred1
    [Switch-GigabitEthernet1/0/2] qos queue 1 wred wred1
    [Switch-GigabitEthernet1/0/2] quit

  4. Configure congestion management.

    # Set scheduling parameters of each queue on GE1/0/1 and GE1/0/2 of the Switch.

    [Switch] interface gigabitethernet 1/0/1
    [Switch-GigabitEthernet1/0/1] qos pq 5  //Configure PQ scheduling for queue 5.
    [Switch-GigabitEthernet1/0/1] qos drr 0 to 4  //Configure WDRR scheduling for queues 0 to 4.
    [Switch-GigabitEthernet1/0/1] qos queue 3 drr weight 100  //Set the WDRR weight of queue 3 to 100.
    [Switch-GigabitEthernet1/0/1] qos queue 1 drr weight 50  //Set the WDRR weight of queue 1 to 50. The device schedules packets in queue 1 and queue 3 according to the ratio of 1:2.
    [Switch-GigabitEthernet1/0/1] quit
    [Switch] interface gigabitethernet 1/0/2
    [Switch-GigabitEthernet1/0/2] qos pq 5
    [Switch-GigabitEthernet1/0/2] qos drr 0 to 4
    [Switch-GigabitEthernet1/0/2] qos queue 3 drr weight 100
    [Switch-GigabitEthernet1/0/2] qos queue 1 drr weight 50
    [Switch-GigabitEthernet1/0/2] quit
    

  5. Verify the configuration.

    # Check the configuration of the 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 WRED profile configuration.

    [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
    -----------------------------------------------------------------
    

Configuration Files

  • Switch configuration file

    #
    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 GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 2 5 to 6
     qos wred wred1
     qos pq 5 to 7 drr 0 to 4
     qos queue 1 drr weight 50
     qos queue 3 drr weight 100
     qos queue 1 wred wred1
     qos queue 3 wred wred1
     qos queue 5 wred wred1
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 2 5 to 6
     qos wred wred1
     qos pq 5 to 7 drr 0 to 4
     qos queue 1 drr weight 50
     qos queue 3 drr weight 100
     qos queue 1 wred wred1
     qos queue 3 wred wred1
     qos queue 5 wred wred1
    #
    interface GigabitEthernet2/0/1
     port link-type trunk
     port trunk allow-pass vlan 2 5 to 6
     trust upstream ds1
     trust 8021p inner
    #
    return
    
Download
Updated: 2019-05-16

Document ID: EDOC1000069466

Views: 190248

Downloads: 1849

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next