1.
Configure interfaces of the Switch so that users can access the network.
2.
Configure traffic policing on Eth 0/0/1 and Eth 0/0/2 of the Switch in the inbound direction.
Data Preparation
To complete the configuration, you need the following data:
l
Uplink interface address of the Switch: 192.168.1.1/24
l
VLAN IDs of branch 1 and branch 2 of the enterprise: VLAN 100 and VLAN 200
l
CIR of branch 1: 8192 kbit/s; CIR of branch 2: 5120 kbit/s
Procedure
Step 1
Create VLANs and configure interfaces of the Switch.
# Create VLANs 100, 200, and 300, and then add Eth 0/0/1, Eth 0/0/2, and GE 0/0/1 to VLANs
100, 200, and 300.
<Quidway>
system-view
[Quidway]
sysname Switch
[Switch]
vlan batch 100 200 300
# Set the type of Eth 0/0/1, Eth 0/0/2, and GE 0/0/1 to trunk and configure Eth 0/0/1, Eth 0/0/2,
and GE 0/0/1 to allow packets from VLANs 100, 200, and 300 to pass through.
[Switch]
interface ethernet0/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 ethernet0/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 gigabitethernet0/0/1
[Switch-GigabitEthernet0/0/1]
port link-type trunk
[Switch-GigabitEthernet0/0/1]
port trunk allow-pass vlan 100 200 300
[Switch-GigabitEthernet0/0/1]
quit
# Create VLANIF 300 and set its network segment address to 192.168.1.1/24.
[Switch]
interface vlanif 300
[Switch-Vlanif300]
ip address 192.168.1.1 24
[Switch-Vlanif300]
quit
NOTE
# On the router, set the IP address of the interface connecting the router and Switch to 192.168.1.2/24.
Step 2
Configure interface-based traffic policing.
# Configure traffic policing on Eth 0/0/1 and Eth 0/0/2 of the Switch.
[Switch]
interface ethernet0/0/1
[Switch-Ethernet0/0/1]
qos lr inbound cir 8192
[Switch-Ethernet0/0/1]
quit
[Switch]
interface ethernet0/0/2
[Switch-Ethernet0/0/2]
qos lr inbound cir 5120
[Switch-Ethernet0/0/2]
quit
Step 3
Verify the configuration.
# View the traffic policing configuration.
S3700HI Ethernet Switches
Configuration Guide - QoS
2 Traffic Policing and Traffic Shaping Configuration
Issue 01 (2012-03-15)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
69