Example for Configuring Priority Mapping on the S2700-52P-EI, S2700-52P-PWR-EI, S3700SI, and S3700EI
The is used as an example. After priority mapping is configured, the Switch maps DSCP priorities of packets to new DSCP priorities so that it can provide differentiated services.
Networking Requirements
As shown in Figure 2-1, SwitchA and SwitchB are connected to the router, and enterprise branches 1 and 2 can access the network through LSW1 and LSW2. Enterprise branch 1 requires better QoS guarantee, so DSCP priorities of data packets from enterprise branches 1 and 2 are mapped to 45 and 30 respectively. The Switch trusts DSCP priorities of packets. When congestion occurs, the Switch first processes packets of higher DSCP priority.
Configuration Roadmap
- Create VLANs and configure interfaces so that the enterprise can access the network.
- Configure priority mapping to map DSCP priorities of data packets from enterprise branches 1 and 2 to 45 and 30 respectively.
Procedure
- Configure SwitchA.
# Create VLAN 100.
<Quidway> system-view [Quidway] sysname SwitchA [SwitchA] vlan batch 100
# Set the link type of Eth 0/0/1 and Eth 0/0/2 to trunk and add them to VLAN 100.
[SwitchA] interface ethernet 0/0/1 [SwitchA-Ethernet0/0/1] port link-type trunk [SwitchA-Ethernet0/0/1] port trunk allow-pass vlan 100 [SwitchA-Ethernet0/0/1] quit [SwitchA] interface ethernet 0/0/2 [SwitchA-Ethernet0/0/2] port link-type trunk [SwitchA-Ethernet0/0/2] port trunk allow-pass vlan 100 [SwitchA-Ethernet0/0/2] quit
# Configure interfaces to trust DSCP priorities of packets.
[SwitchA] interface ethernet 0/0/1 [SwitchA-Ethernet0/0/1] trust dscp [SwitchA-Ethernet0/0/1] quit [SwitchA] interface ethernet 0/0/2 [SwitchA-Ethernet0/0/2] trust dscp [SwitchA-Ethernet0/0/2] quit
# Configure priority mapping.
[SwitchA] qos map-table dscp-dscp [SwitchA-dscp-dscp] input 0 to 63 output 45 [SwitchA-dscp-dscp] quit
- Configure SwitchB.
# Create VLAN 200.
<Quidway> system-view [Quidway] sysname SwitchB [SwitchB] vlan batch 200
# Set the link type of Eth 0/0/1 and Eth 0/0/2 to trunk and add them to VLAN 200.
[SwitchB] interface ethernet 0/0/1 [SwitchB-Ethernet0/0/1] port link-type trunk [SwitchB-Ethernet0/0/1] port trunk allow-pass vlan 200 [SwitchB-Ethernet0/0/1] quit [SwitchB] interface ethernet 0/0/2 [SwitchB-Ethernet0/0/2] port link-type trunk [SwitchB-Ethernet0/0/2] port trunk allow-pass vlan 200 [SwitchB-Ethernet0/0/2] quit
# Configure interfaces to trust DSCP priorities of packets.
[SwitchB] interface ethernet 0/0/1 [SwitchB-Ethernet0/0/1] trust dscp [SwitchB-Ethernet0/0/1] quit [SwitchB] interface ethernet 0/0/2 [SwitchB-Ethernet0/0/2] trust dscp [SwitchB-Ethernet0/0/2] quit
# Configure priority mapping.
[SwitchB] qos map-table dscp-dscp [SwitchB-dscp-dscp] input 0 to 63 output 30 [SwitchB-dscp-dscp] quit
- Verify the configuration.
# View priority mapping information on SwitchA.
[SwitchA] display qos map-table dscp-dscp Input DSCP DSCP ------------------------ 0 45 1 45 2 45 3 45 4 45 ...... 63 45
# View the interface configuration on SwitchA.
[SwitchA] interface ethernet 0/0/1 [SwitchA-Ethernet0/0/1] display this # interface Ethernet0/0/1 port link-type trunk port trunk allow-pass vlan 100 trust dscp # return [SwitchA-Ethernet0/0/1] quit [SwitchA] interface ethernet 0/0/2 [SwitchA-Ethernet0/0/2] display this # interface Ethernet0/0/2 port link-type trunk port trunk allow-pass vlan 100 trust dscp # return
# View priority mapping information on SwitchB.
[SwitchB] display qos map-table dscp-dscp Input DSCP DSCP ------------------------ 0 30 1 30 2 30 3 30 4 30 ...... 63 30
# View the interface configuration on SwitchB.
[SwitchB] interface ethernet 0/0/1 [SwitchB-Ethernet0/0/1] display this # interface Ethernet0/0/1 port link-type trunk port trunk allow-pass vlan 200 trust dscp # return [SwitchB-Ethernet0/0/1] quit [SwitchB] interface ethernet 0/0/2 [SwitchB-Ethernet0/0/2] display this # interface Ethernet0/0/2 port link-type trunk port trunk allow-pass vlan 200 trust dscp # return
Configuration Files
- Configuration file of SwitchA
# sysname SwitchA # vlan batch 100 # interface Ethernet0/0/1 port link-type trunk port trunk allow-pass vlan 100 trust dscp # interface Ethernet0/0/2 port link-type trunk port trunk allow-pass vlan 100 trust dscp # qos map-table dscp-dscp input 0 to 44 output 45 input 46 to 63 output 45 # return
- Configuration file of SwitchB
# sysname SwitchB # vlan batch 200 # interface Ethernet0/0/1 port link-type trunk port trunk allow-pass vlan 200 trust dscp # interface Ethernet0/0/2 port link-type trunk port trunk allow-pass vlan 200 trust dscp # qos map-table dscp-dscp input 0 to 29 output 30 input 31 to 63 output 30 # return