Example for Configuring Priority Mapping
Networking Requirements
As shown in Figure 3-5, tenant 1 and tenant 2 lease different servers that connect to core switches through access switches and then access the network outside the data center through egress routers.
The 802.1p priorities of packets from the servers of tenants 1 and 2 are both 0. The customer wants to provide differentiated services for tenant 1 and tenant 2 so that the CoS value of tenant 1 is higher than that of tenant 2. This ensures low-delay services for tenant 1.
Configuration Roadmap
- Create VLANs, add 10GE1/0/1 that connects to tenant 1's server to VLAN 100, and add 10GE1/0/2 that connects to tenant 2's server to VLAN 200. Configure other interfaces to ensure reachability between the Switch, tenant servers, and core switches (SwitchA and SwitchB).
- Create DiffServ domains. Map the 802.1p priority of packets from tenant 1 to AF4 and map the 802.1p priority of packets from tenant 2 to AF2. Bind the DiffServ domains to VLANs to provide differentiated services.
Procedure
- Create VLANs and configure interfaces.
# Create VLAN 100 and VLAN 200.
<HUAWEI> system-view [~HUAWEI] sysname Switch [*HUAWEI] commit [~Switch] vlan batch 100 200 [*Switch] commit
# Configure 40GE1/0/1 and 40GE1/0/2 on the Switch as trunk interfaces. Add 10GE1/0/1 to VLAN 100, 10GE1/0/2 to VLAN 200, and 40GE1/0/1 and 40GE1/02/ to both VLAN 100 and VLAN 200.
[~Switch] interface 10ge 1/0/1 [~Switch-10GE1/0/1] port default vlan 100 [*Switch-10GE1/0/1] quit [*Switch] interface 10ge 1/0/2 [*Switch-10GE1/0/2] port default vlan 200 [*Switch-10GE1/0/2] quit [*Switch] interface 40ge 1/0/1 [*Switch-40GE1/0/1] port link-type trunk [*Switch-40GE1/0/1] port trunk allow-pass vlan 100 200 [*Switch-40GE1/0/1] quit [*Switch] interface 40ge 1/0/2 [*Switch-40GE1/0/2] port link-type trunk [*Switch-40GE1/0/2] port trunk allow-pass vlan 100 200 [*Switch-40GE1/0/2] quit [*Switch] commit
- Create and configure DiffServ domains, and bind them to VLANs.
# Create DiffServ domains ds1 and ds2 on the Switch, map 802.1p priorities of packets from tenant servers to different CoS values, and color the packets accordingly.
[~Switch] diffserv domain ds1 [*Switch-dsdomain-ds1] 8021p-inbound 0 phb af4 green [*Switch-dsdomain-ds1] quit [*Switch] diffserv domain ds2 [*Switch-dsdomain-ds2] 8021p-inbound 0 phb af2 green [*Switch-dsdomain-ds2] quit [*Switch] commit
# Bind DiffServ domains ds1 and ds2 to VLAN 100 and VLAN 200, respectively.
[~Switch] vlan 100 [~Switch-vlan100] trust upstream ds1 [*Switch-vlan100] quit [*Switch] vlan 200 [*Switch-vlan200] trust upstream ds2 [*Switch-vlan200] quit [*Switch] commit
Configuration Files
Switch configuration file
#
sysname Switch
#
vlan batch 100 200
#
diffserv domain ds1
8021p-inbound 0 phb af4 green
#
diffserv domain ds2
8021p-inbound 0 phb af2 green
#
vlan 100
trust upstream ds1
#
vlan 200
trust upstream ds2
#
interface 10GE1/0/1
port default vlan 100
#
interface 10GE1/0/2
port default vlan 200
#
interface 40GE1/0/1
port link-type trunk
port trunk allow-pass vlan 100 200
#
interface 40GE1/0/2
port link-type trunk
port trunk allow-pass vlan 100 200
#
return