S300, S500, S2700, S3700, S5700, S6700, S7700, and S9700 Series Switches Typical Configuration Examples(V200)

This document provides campus networks typical configuration examples and feature typical configuration examples. "Campus Networks Typical Configuration Examples" provides typical campus network networking modes and a variety of deployment examples."Feature Typical Configuration Examples" provides typical configuration examples of a single feature on a switch. You can configure required features after deploying a campus network.

This document provides campus networks typical configuration examples and feature typical configuration examples. "Campus Networks Typical Configuration Examples" provides typical campus network networking modes and a variety of deployment examples."Feature Typical Configuration Examples" provides typical configuration examples of a single feature on a switch. You can configure required features after deploying a campus network.

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

Example for Configuring Interface-based Rate Limiting on a Fixed 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

  • This example applies to the following products and versions:
    • S2752EI, S2720-EI, S2750-EI
    • S3700-SI, S3700-EI, S3700-HI
    • S5700-LI, S5700S-LI, S5700-SI, S5700-EI, S5700-HI, S5710-C-LI, S5710-X-LI, S5710-EI, S5710-HI, S5720-LI, S5720S-LI, S5720-SI, S5720S-SI, S5720I-SI, S5720-EI, S5720-HI, S5730-HI, S5730-SI, S5730S-EI, S5731-H, S5731-S, S5731S-S, S5731S-H, S5732-H, S2730S-S, S5735-L-I, S5735-L1,S300, S5735-L, S5735S-L, S5735S-L1, S5735S-L-M, S5735-S, S500, S5735S-S, S5735-S-I, S5735S-H, S5736-S
    • S6700-EI, S6720-LI, S6720S-LI, S6720S-S, S6720-SI, S6720S-SI, S6720-EI, S6720S-EI, S6720-HI, S6730-H, S6730-S, S6730S-S, S6730S-H
  • For the product models whose applicable versions are not listed above, see Table 1 in "Applicable Products and Versions" for details.

For details about the hardware specifications and matched parts of the switch, visit Hardware Center. For details about the key specifications and full software specifications of the switch, visit Specifications Query.

The S5731-L and S5731S-L are remote units and do not support web-based management, YANG, or commands. They can be configured only through configuration delivery by the central device. For details, see "Simplified Architecture Configuration (the Solar System Solution)" in the S300, S500, S2700, S5700, and S6700 Configuration Guide - Device Management.

Networking Requirements

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

Services are singular, and therefore 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 in the outbound direction, and department 2 requires the CIR of 5 Mbit/s in the outbound direction.

Figure 3-253 Networking of interface-based rate limiting

Configuration Roadmap

The configuration roadmap is as follows:
  1. Configure interfaces of the Switch so that users can access the Internet.
  2. Configure interface-based rate limiting on GE0/0/1 and GE0/0/2 of the Switch in the inbound direction.

Procedure

  1. Create VLANs and configure interfaces of the Switch.

    # Create VLAN 100, VLAN 200, and VLAN 300.

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

    # Configure GE0/0/1, GE0/0/2, and GE0/0/3 as trunk interfaces, and configure GE0/0/1 to allow VLAN 100, GE0/0/2 to allow VLAN 200, and GE0/0/3 to allow VLAN 100, VLAN 200, and VLAN 300.

    [Switch] interface gigabitethernet 0/0/1
    [Switch-GigabitEthernet0/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-GigabitEthernet0/0/1] port trunk allow-pass vlan 100
    [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 200
    [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 100 200 300
    [Switch-GigabitEthernet0/0/3] quit

    # Create VLANIF 300 and set its IP address to 192.168.1.1/24.

    [Switch] interface vlanif 300
    [Switch-Vlanif300] ip address 192.168.1.1 24
    [Switch-Vlanif300] quit

    On the router, set the IP address of the interface connected to the Switch to 192.168.1.2/24, and configure sub-interfaces on the interface to terminate VLANs.

  2. Configure interface-based rate limiting.

    # Configure rate limiting on GE0/0/1 in the inbound direction and set the CIR to 8192 kbit/s.

    [Switch] interface gigabitethernet 0/0/1
    [Switch-GigabitEthernet0/0/1] qos lr inbound cir 8192  //Set the CIR of department 1 in the outbound direction to 8 Mbit/s.
    [Switch-GigabitEthernet0/0/1] quit

    # Configure rate limiting on GE0/0/2 in the inbound direction and set the CIR to 5120 kbit/s.

    [Switch] interface gigabitethernet 0/0/2
    [Switch-GigabitEthernet0/0/2] qos lr inbound cir 5120  //Set the CIR of department 2 in the outbound direction to 5 Mbit/s.
    [Switch-GigabitEthernet0/0/2] quit

  3. Verify the configuration.

    # Check the interface-based rate limiting configuration.

    [Switch] display qos lr inbound interface gigabitethernet 0/0/1
     GigabitEthernet0/0/1 lr inbound:
      cir: 8192 Kbps, cbs: 1024000 Byte  
    [Switch] display qos lr inbound interface gigabitethernet 0/0/2
     GigabitEthernet0/0/2 lr inbound:
      cir: 5120 Kbps, cbs: 640000 Byte  

    # Take GE0/0/1 as an example. Send packets to GE0/0/1 at the rates of 8000 kbit/s and 9000 kbit/s, and then run the display qos statistics interface gigabitethernet 0/0/1 inbound command to check traffic statistics on the interface. If the configuration is successful, packets sent at the rate of 8000 kbit/s pass through GE0/0/1 at 8000 kbit/s, with no packets discarded; packets sent at the rate of 9000 kbit/s pass through GE0/0/1 at 8192 kbit/s, with some packets discarded.

Configuration Files

Switch configuration file

#
sysname Switch
#
vlan batch 100 200 300
#
interface Vlanif300
 ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 100
 qos lr inbound cir 8192 cbs 1024000
#
interface GigabitEthernet0/0/2
 port link-type trunk
 port trunk allow-pass vlan 200
 qos lr inbound cir 5120 cbs 640000
#
interface GigabitEthernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 100 200 300
#
return