Example for Configuring Interface-based Rate Limiting on the S2700-52P-EI, S2700-52P-PWR-EI, S3700SI, and S3700EI
Networking Requirements
As shown in Figure 3-1, the Switch connects to the router through Eth0/0/3; enterprise departments 1 and 2 are connected to the Switch through Eth0/0/1 and Eth0/0/2 and access the Internet through the Switch and router.
Services do not need to be differentiated, but bandwidth for each department needs to be limited. For department 1, incoming traffic must be allocated guaranteed bandwidth of 8 Mbit/s. For department 2, incoming traffic must be allocated guaranteed bandwidth of 5 Mbit/s.
Configuration Roadmap
- Configure interfaces of the Switch so that users can access the Internet.
- Configure interface-based rate limiting on Eth0/0/1 and Eth0/0/2 of the Switch in the inbound direction.
Procedure
- Create VLANs and configure interfaces of the Switch.
# Create VLAN 100 and VLAN 200.
<Quidway> system-view [Quidway] sysname Switch [Switch] vlan batch 100 200
# Configure Eth0/0/1, Eth0/0/2, and Eth0/0/3 as trunk interfaces, and configure Eth0/0/1 to allow VLAN 100, Eth0/0/2 to allow VLAN 200, and Eth0/0/3 to allow VLAN 100 and VLAN 200.
[Switch] interface ethernet 0/0/1 [Switch-Ethernet0/0/1] port link-type trunk [Switch-Ethernet0/0/1] port trunk allow-pass vlan 100 [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 200 [Switch-Ethernet0/0/2] quit [Switch] interface ethernet 0/0/3 [Switch-Ethernet0/0/3] port link-type trunk [Switch-Ethernet0/0/3] port trunk allow-pass vlan 100 200 [Switch-Ethernet0/0/3] quit
- Configure interface-based rate limiting.
# Configure rate limiting on Eth0/0/1 in the inbound direction and set the CIR to 8192 kbit/s.
[Switch] interface ethernet 0/0/1 [Switch-Ethernet0/0/1] qos lr inbound cir 8192 [Switch-Ethernet0/0/1] quit
# Configure rate limiting on Eth0/0/2 in the inbound direction and set the CIR to 5120 kbit/s.
[Switch] interface ethernet 0/0/2 [Switch-Ethernet0/0/2] qos lr inbound cir 5120 [Switch-Ethernet0/0/2] quit
- Verify the configuration.
# View the interface-based rate limiting configuration.
[Switch] display qos lr inbound interface ethernet 0/0/1 Ethernet0/0/1 lr inbound: cir: 8192 Kbps, cbs: 1024000 Byte
[Switch] display qos lr inbound interface ethernet 0/0/2 Ethernet0/0/2 lr inbound: cir: 5120 Kbps, cbs: 640000 Byte
Configuration Files
- Configuration file of the Switch
# sysname Switch # vlan batch 100 200 # interface Ethernet0/0/1 port link-type trunk port trunk allow-pass vlan 100 qos lr inbound cir 8192 cbs 1024000 # interface Ethernet0/0/2 port link-type trunk port trunk allow-pass vlan 200 qos lr inbound cir 5120 cbs 640000 # interface Ethernet0/0/3 port link-type trunk port trunk allow-pass vlan 100 200 # return