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

S2700, S3700, S5700, S6700, S7700, and S9700 Series 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 Interface-based Rate Limiting on a Modular Switch

Example for Configuring Interface-based Rate Limiting on a Modular Switch

Overview

Interface-based rate limiting is easy to configure and limits the rate of all packets sent or received on an interface regardless of packet type. An interface enabled with this function can be assigned fixed bandwidth.

Interface-based rate limiting in the inbound and outbound directions can be configured simultaneously or separately.

Configuration Notes

For applicable product models and versions, see Applicable Product Models and Versions.

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

Networking Requirements

In Figure 16-3, the Switch connects to the router through GE2/0/1, and departments 1 and 2 are connected to the Switch through GE1/0/1 and GE1/0/2 respectively and access the Internet through the Switch and router.

Only data services are transmitted on the network, so services do not need to be differentiated. With finite network bandwidth, bandwidth of each department needs to be limited. Department 1 requires the CIR of 8 Mbit/s and PIR of 10 Mbit/s, and department 2 requires the CIR of 5 Mbit/s and PIR of 8 Mbit/s.

Figure 16-3  Networking of interface-based rate limiting

Configuration Roadmap

The configuration roadmap is as follows:
  1. Create VLANs and configure interfaces so that users can access the Internet through the Switch.
  2. Create different CAR profiles and configure the CIRs and PIRs in the CAR profiles, and apply the CAR profiles to GE1/0/1 and GE1/0/2 on the Switch in the inbound direction to limit the rate of packets from different departments.

Procedure

  1. Create VLANs and configure interfaces of the Switch.

    # Create VLAN 100 and VLAN 200.

    <HUAWEI> system-view
    [HUAWEI] sysname Switch
    [Switch] vlan batch 100 200
    

    # Configure GE1/0/1, GE1/0/2, and GE2/0/1 as trunk interfaces, and add GE1/0/1 to VLAN 100, GE1/0/2 to VLAN 200, and GE2/0/1 to VLAN 100 and VLAN 200.

    [Switch] interface gigabitethernet 1/0/1
    [Switch-GigabitEthernet1/0/1] port link-type trunk  //Set the link type of the interface to trunk. The default link type of the interface is not trunk.
    [Switch-GigabitEthernet1/0/1] port trunk allow-pass vlan 100
    [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 200
    [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 100 200
    [Switch-GigabitEthernet2/0/1] quit

  2. Configure CAR profiles.

    # Create CAR profiles car1 and car2 on the Switch to limit the rate of traffic from departments 1 and 2.

    [Switch] qos car car1 cir 8192 pir 10240  //Set the CIR to 8 Mbit/s and PIR to 10 Mbit/s in the CAR profile car1.
    [Switch] qos car car2 cir 5120 pir 8192  //Set the CIR to 5 Mbit/s and PIR to 8 Mbit/s in the CAR profile car2.
    

  3. Apply the CAR profiles.

    # Apply the CAR profiles to GE1/0/1 and GE1/0/2 on the Switch in the inbound direction respectively to limit the rate of traffic from departments 1 and 2.

    [Switch] interface gigabitethernet 1/0/1
    [Switch-GigabitEthernet1/0/1] qos car inbound car1
    [Switch-GigabitEthernet1/0/1] quit
    [Switch] interface gigabitethernet 1/0/2
    [Switch-GigabitEthernet1/0/2] qos car inbound car2
    [Switch-GigabitEthernet1/0/2] quit
    [Switch] quit

  4. Verify the configuration.

    # Check the CAR profile configuration.

    <Switch> display qos car all
      ----------------------------------------------------------------              
       CAR Name     : car1                                                           
       CAR Index    : 0                                                             
        car cir 8192 (Kbps) pir 10240 (Kbps) cbs 1024000 (byte) pbs 1280000 (byte)  
      ----------------------------------------------------------------              
       CAR Name     : car2                                                          
       CAR Index    : 1                                                             
        car cir 5120 (Kbps) pir 8192 (Kbps) cbs 640000 (byte) pbs 1024000 (byte)    

    # Send traffic at rates of 6000 kbit/s, 9000 kbit/s, and 11000 kbit/s to GE1/0/1 and GE1/0/2, and run the display qos car statistics command to view traffic statistics. When packets are sent to GE1/0/1 and GE1/0/2 at a rate of 6000 kbit/s, all packets are forwarded. When packets are sent to GE1/0/1 and GE1/0/2 at a rate of 9000 kbit/s, all packets on GE1/0/1 are forwarded and some packets on GE1/0/2 are discarded. When packets are sent to GE1/0/1 and GE1/0/2 at a rate of 11000 kbit/s, some packets on both GE1/0/1 and GE1/0/2 are discarded.

Configuration Files

Switch configuration file

#
sysname Switch
#
vlan batch 100 200
#
qos car car1 cir 8192 pir 10240 cbs 1024000 pbs 1280000
qos car car2 cir 5120 pir 8192 cbs 640000 pbs 1024000
#
interface GigabitEthernet1/0/1
 port link-type trunk
 port trunk allow-pass vlan 100
 qos car inbound car1
#
interface GigabitEthernet1/0/2
 port link-type trunk
 port trunk allow-pass vlan 200
 qos car inbound car2
#
interface GigabitEthernet2/0/1
 port link-type trunk
 port trunk allow-pass vlan 100 200
#
return

Applicable Product Models and Versions

Table 16-3  Applicable product models and versions

Product

Product Model

Software Version

S7700

S7703, S7706, and S7712

V200R001(C00&C01), V200R002C00, V200R003C00, V200R005C00, V200R006C00, V200R007C00, V200R008C00, V200R009C00, V200R010C00, V200R011C10, V200R012C00, V200R013C00

S7703 PoE

V200R013C00

S7706 PoE

V200R013C00

S9700

S9703, S9706, and S9712

V200R001(C00&C01), V200R002C00, V200R003C00, V200R005C00, V200R006C00, V200R007(C00&C10), V200R008C00, V200R009C00, V200R010C00, V200R011C10, V200R012C00, V200R013C00

Download
Updated: 2019-04-20

Document ID: EDOC1000069520

Views: 660577

Downloads: 29825

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