Example for Configuring Priority Mapping
Networking Requirements
As shown in Figure 2-5, voice, video, and data terminals on the enterprise's LAN connect to Eth2/0/0 and Eth2/0/1 of RouterA through SwitchA and SwitchB. The voice, video, and data flows are transmitted to the WAN through GE3/0/0 of RouterA.
Packets of different services are identified by 802.1p priorities on the LAN and enter different queues on LAN interfaces of RouterA based on 802.1p priorities. When packets reach the WAN from GE3/0/0, differentiated services need to be provided for the packets based on DSCP priorities. Therefore, RouterA needs to map 802.1p priorities to DSCP priorities. To meet this requirement, configure a priority mapping table on RouterA.
Configuration Roadmap
- Create VLANs and VLANIF interfaces on RouterA and configure interfaces to enable access to the WAN through RouterA.
- Configure interfaces of RouterA to trust 802.1p priorities in packets.
- Configure a priority mapping table on RouterA and set 802.1p-to-DSCP mappings in the table. RouterA can then map 802.1p priorities of packets to DSCP priorities.
Procedure
- Create VLANs and add interfaces to the VLANs.
# Create VLAN 20 and VLAN 30 on RouterA.
<Huawei> system-view [Huawei] sysname RouterA [RouterA] vlan batch 20 30
# Configure Eth2/0/0 and Eth2/0/1 as trunk interfaces, and add Eth2/0/0 to VLAN 20 and Eth2/0/1 to VLAN 30.
[RouterA] interface ethernet 2/0/0 [RouterA-Ethernet2/0/0] port link-type trunk [RouterA-Ethernet2/0/0] port trunk allow-pass vlan 20 [RouterA-Ethernet2/0/0] quit [RouterA] interface ethernet 2/0/1 [RouterA-Ethernet2/0/1] port link-type trunk [RouterA-Ethernet2/0/1] port trunk allow-pass vlan 30 [RouterA-Ethernet2/0/1] quit
# On SwitchA, configure the interface connected to RouterA as a trunk interface and add it to VLAN 20. On SwitchB, configure the interface connected to RouterA as a trunk interface and add it to VLAN 30.
# Create VLANIF 20 and VLANIF 30, assign IP address 192.168.2.1/24 to VLANIF 20, and assign IP address 192.168.3.1/24 to VLANIF 30.
[RouterA] interface vlanif 20 [RouterA-Vlanif20] ip address 192.168.2.1 24 [RouterA-Vlanif20] quit [RouterA] interface vlanif 30 [RouterA-Vlanif30] ip address 192.168.3.1 24 [RouterA-Vlanif30] quit
# Assign IP address 192.168.4.1/24 to GE3/0/0.
[RouterA] interface gigabitethernet 3/0/0 [RouterA-GigabitEthernet3/0/0] ip address 192.168.4.1 24 [RouterA-GigabitEthernet3/0/0] quit
# Configure RouterB to ensure that there are reachable routes between RouterB and RouterA.
- Configure priority mapping.
# Configure Eth2/0/0 and Eth2/0/1 to trust 802.1p priorities in packets.
[RouterA] interface ethernet 2/0/0 [RouterA-Ethernet2/0/0] trust 8021p override [RouterA-Ethernet2/0/0] quit [RouterA] interface ethernet 2/0/1 [RouterA-Ethernet2/0/1] trust 8021p override [RouterA-Ethernet2/0/1] quit
# Configure a priority mapping table.
[RouterA] qos map-table dot1p-dscp [RouterA-maptbl-dot1p-dscp] input 2 output 16 [RouterA-maptbl-dot1p-dscp] input 5 output 40 [RouterA-maptbl-dot1p-dscp] input 6 output 46
- Verify the configuration.
# View priority mapping information on RouterA.
<RouterA> display qos map-table dot1p-dscp Input Dot1p DSCP ------------------- 0 0 1 8 2 16 3 24 4 32 5 40 6 46 7 56
# View the interface configuration on RouterA.
<RouterA> display current-configuration interface ethernet 2/0/0 # interface Ethernet2/0/0 port link-type trunk port trunk allow-pass vlan 20 trust 8021p override # return
<RouterA> display current-configuration interface ethernet 2/0/1 # interface Ethernet2/0/1 port link-type trunk port trunk allow-pass vlan 30 trust 8021p override # return
Configuration file
- RouterA configuration
# sysname RouterA # vlan batch 20 30 # qos map-table dot1p-dscp input 2 output 16 input 5 output 40 input 6 output 46 # interface Vlanif20 ip address 192.168.2.1 255.255.255.0 # interface Vlanif30 ip address 192.168.3.1 255.255.255.0 # interface Ethernet2/0/0 port link-type trunk port trunk allow-pass vlan 20 trust 8021p override # interface Ethernet2/0/1 port link-type trunk port trunk allow-pass vlan 30 trust 8021p override # interface GigabitEthernet3/0/0 ip address 192.168.4.1 255.255.255.0 # return