Example for Configuring Traffic Shapingon the S2700SI
Networking Requirements
The Switch is connected to the router through GE0/0/1 and Internet services reach the residential user through the router and Switch, as shown in Figure 3-4. The transmission rate of traffic from the network side is greater than that of traffic from the LSW; therefore, the jitter may occur on Eth0/0/1. To prevent jitter and ensure the bandwidth, ensure that:
- The CIR on Eth 0/0/1 is 2000 kbit/s.
Configuration Roadmap
- Create VLANs and configure each interface so that the residential user can access the network through the Switch.
Configure traffic shaping on an interface to limit the bandwidth of the interface.
Data Preparation
- Rate for traffic shaping on an interface
Procedure
- Create VLANs and configure interfaces.
# Create VLAN 10.
<Quidway> system-view [Quidway] sysname Switch [Switch] vlan batch 10
# Configure the type of Eth0/0/1 and GE0/0/1 as trunk, and then add Eth0/0/1 and GE0/0/1 to VLAN 10.
[Switch] interface ethernet 0/0/1 [Switch-Ethernet0/0/1] port link-type trunk [Switch-Ethernet0/0/1] port trunk allow-pass vlan 10 [Switch-Ethernet0/0/1] quit [Switch] interface gigabitethernet 0/0/1 [Switch-GigabitEthernet0/0/1] port link-type trunk [Switch-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 [Switch-GigabitEthernet0/0/1] quit
# Create VLANIF 10 and set its network segment address to 10.10.10.1/24.
[Switch] interface vlanif 10 [Switch-Vlanif10] ip address 10.10.10.1 255.255.255.0 [Switch-Vlanif10] quit
Assign IP address 10.10.10.2/24 to the interface connecting the router and Switch.
- Configure traffic shaping on an interface.
# Configure traffic shaping on an interface of the Switch and set the CIR to 2000 kbit/s.
[Switch] interface ethernet 0/0/1 [Switch-Ethernet0/0/1] qos lr outbound cir 2000 cbs 250000 [Switch-Ethernet0/0/1] quit
- Verify the configuration.
# View the CIR of the interface.
[Switch] display qos lr outbound interface ethernet 0/0/1 Ethernet0/0/1 lr outbound: cir: 2000 Kbps, cbs: 250000 Byte
# If the configuration succeeds, the committed bandwidth for the packets transmitted by Eth0/0/1 is 2000 kbit/s.
Configuration Files
- Configuration file of the Switch
# sysname Switch # vlan batch 10 # interface Vlanif10 ip address 10.10.10.1 255.255.255.0 # interface Ethernet0/0/1 port link-type trunk port trunk allow-pass vlan 10 qos lr outbound cir 2000 cbs 250000 # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 10 # return