- Table of Contents
-
- 04-Layer 2 - LAN Switching Configuration Guide
- 00-Preface
- 01-VLAN Configuration
- 02-MAC Address Table Configuration
- 03-Spanning Tree Configuration
- 04-Ethernet Link Aggregation Configuration
- 05-Port Isolation Configuration
- 06-QinQ Configuration
- 07-VLAN Mapping Configuration
- 08-BPDU Tunneling Configuration
- 09-GVRP Configuration
- 10-Loopback Detection Configuration
- 11-MAC-in-MAC Configuration
- 12-LLDP Configuration
- 13-MVRP Configuration
- Related Documents
-
Title | Size | Download |
---|---|---|
07-VLAN Mapping Configuration | 278.06 KB |
Contents
Application scenario of one-to-one VLAN mapping
Application scenario of one-to-two and two-to-two VLAN mapping
VLAN mapping configuration task list
Configuring one-to-one VLAN mapping
Configuring one-to-two VLAN mapping
Configuring two-to-two VLAN mapping
VLAN mapping configuration examples
One-to-one VLAN mapping configuration example
One-to-two and two-to-two VLAN mapping configuration example
VLAN mapping overview
VLAN mapping re-marks VLAN tagged traffic with new VLAN IDs. The switch provides the following types of VLAN mapping:
· One-to-one VLAN mapping—Replaces one VLAN tag with another. You can use one-to-one VLAN mapping to sub-classify traffic from a particular VLAN for granular QoS control, or adapt the VLAN schemes of two service providers.
· One-to-two VLAN mapping—Tags single-tagged packets with an outer VLAN tag. One-to-two VLAN mapping expands the VLAN tag space, and enables a service provider and its customers to independently assign VLANs without the risk of VLAN assignment conflicts.
· Two-to-two VLAN mapping—Replaces the outer and inner VLAN IDs of double tagged traffic with a new pair of VLAN IDs. The switch supports replacing only the outer VLAN ID. You can use two-to-two VLAN mapping on the switch to enable two remote sites in the same VLAN to communicate at Layer 2 across two service provider networks that use different VLAN assignment schemes.
Application scenario of one-to-one VLAN mapping
Figure 1 shows an application scenario in which a customer uses a VLAN scheme different than the service provider. For example, the customer uses VLAN 10 to transmit voice traffic, whereas the service provider uses VLAN 100. Switch A must replace the VLAN 10 tag of incoming traffic with the VLAN 100 tag, before transmitting the traffic in the service provider network.
Figure 1 Application scenario of one-to-one VLAN mapping
Application scenario of one-to-two and two-to-two VLAN mapping
Figure 2 shows a typical application scenario in which two remote sites in VPN A, Site 1 and Site 2, must communicate across two SP networks, SP 1 and SP 2.
Figure 2 Application scenario of one-to-two and two-to-two VLAN mapping
If Site 1 sends a packet to Site 2, the packet is processed on the way to its destination using the following workflow:
1. When the packet tagged with VLAN 2 arrives at the edge of network SP 1, PE 1 tags the packet with outer VLAN 10 by using one-to-two VLAN mapping.
2. When the double-tagged packet enters the SP 2 network, PE 3 replaces the outer VLAN tag (VLAN 10) with VLAN 20 by performing two-to-two VLAN mapping.
3. When PE4 receives the packet with outer VLAN tag 20, it removes the outer VLAN tag and forwards the packet to VLAN 2.
|
NOTE: You can use QinQ to implement one-to-two VLAN mapping. For more information about QinQ, see the chapter “Configuring QinQ.” |
Concepts and terms
Figure 3 shows a simplified network to help explain the concepts and terms that you may encounter when working with VLAN mapping.
Figure 3 Basic concepts of VLAN mapping
· Uplink traffic—Traffic transmitted from the customer network to the service provider network.
· Downlink traffic—Traffic transmitted from the service provider network to the customer network.
· Network-side port—A port connected to the service provider network.
· Customer-side port—A port connected to the customer network.
· Uplink policy—A QoS policy that defines VLAN mapping rules for uplink traffic.
· Downlink policy—A QoS policy that defines VLAN mapping rules for downlink traffic.
· Customer VLANs (CVLANs)—VLANs assigned for customers.
· Service provider VLANs (SVLANs)—VLANs assigned for transmitting traffic across the service provider network.
|
NOTE: For more information about QoS policies, see ACL and QoS Configuration Guide. |
VLAN mapping implementations
This section describes how VLAN mapping is implemented on the switch.
One-to-one VLAN mapping
Implement one-to-one VLAN mapping through the following configurations, as shown in Figure 4:
· Apply an uplink policy to the incoming traffic on the customer-side port, mapping each CVLAN ID to a unique SVLAN ID. When a packet arrives, the switch replaces its CVLAN ID with the matching SVLAN ID.
· Apply a downlink policy to the outgoing traffic, mapping each SVLAN ID back to its corresponding CVLAN ID. When forwarding a packet out of the port, the switch replaces its SVLAN ID with the matching CVLAN ID.
Figure 4 One-to-one VLAN mapping implementation
One-to-two VLAN mapping
Implement one-to-two VLAN mapping through the following configurations, as shown in Figure 5:
· Apply an uplink policy to the incoming traffic on the customer-side port to tag the incoming packets from a certain CVLAN with an outer SVLAN tag.
· Configure the customer-side port as a hybrid port, and assign the port to SVLANs as an untagged member. When the port forwards the packets from these SVLANs, it removes their SVLAN tag.
Figure 5 One-to-two VLAN mapping
Two-to-two VLAN mapping
Implement two-to-two VLAN mapping through the following configurations, as shown in Figure 6.
· For uplink traffic, apply an inbound policy on the customer-side port to replace the SVLAN with a new SVLAN, and apply an outbound policy on the network-side port to replace the CVLAN with a new CVLAN.
· For downlink traffic, apply an outbound policy on the customer-side port to replace the double tags with the original VLAN tag pair.
Figure 6 Two-to-two VLAN mapping implementation
VLAN mapping configuration task list
Use the VLAN mapping methods as appropriate to the roles of your switches in the network, as described in this table:
Task |
Switch role |
Access switch in an SP network (see Figure 1) |
|
Edge switch between SP networks, for example, PE 1 and PE 4 in Figure 2 |
|
Edge switch between SP networks, for example, PE 3 in Figure 2 |
Configuring one-to-one VLAN mapping
Perform these tasks to configure one-to-one VLAN mapping:
Task |
Description |
Creates CVLAN-to-SVLAN mappings (required). |
|
Creates SVLAN-to-CVLAN mappings (required). |
|
Configures settings required for one-to-one VLAN mapping (required). |
|
Configures VLAN settings required for normal communication (required). |
Configuration prerequisites
Create CVLANs and SVLANs, and plan CVLAN-SVLAN mappings.
Configuring an uplink policy
To configure an uplink policy to map each CVLAN to a unique SVLAN:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Configure one class for a CVLAN. |
a. Create a class and enter class view: b. Specify one CVLAN as the match criterion: c.
Return to system view: |
Repeat these steps to configure one class for each CVLAN. NOTE: In one-to-one VLAN mapping, the if-match service-vlan-id command is for matching both CVLANs and SVLANs, because the switch uses the command for matching the outmost VLAN tag. |
3. Configure one behavior for an SVLAN. |
a. Create a traffic behavior and enter traffic behavior view: b. Configure an SVLAN marking action: c.
Return to system view: |
Repeat these steps to configure one behavior for each SVLAN. |
4. Create a QoS policy and enter QoS policy view. |
qos policy policy-name |
N/A |
5. Associate the class with the behavior to map the CVLAN to the SVLAN. |
classifier tcl-name behavior behavior-name |
Repeat these steps to create other CVLAN-to-SVLAN mappings. |
Configuring a downlink policy
To configure a downlink policy to map SVLANs back to CVLANs:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Configure one class for an SVLAN. |
a. Create a class and enter class view: b. Specify one SVLAN
as the match criterion: c.
Return to system view: |
Repeat these steps to configure one class for each SVLAN. |
3. Configure one behavior for a CVLAN. |
a. Create a traffic behavior and enter traffic behavior view: b. Configure an SVLAN marking action: c.
Return to system view: |
Repeat these steps to configure a behavior for each CVLAN. NOTE: In one-to-one VLAN mapping, the remark service-vlan-id command is for marking both the CVLAN and SVLAN tags, because the switch uses the command for marking the outmost VLAN tag. |
4. Create a QoS policy and enter QoS policy view. |
qos policy policy-name |
Required |
5. Associate the class with the behavior to map the SVLAN to the CVLAN. |
classifier tcl-name behavior behavior-name |
Required Repeat these steps to create other CVLAN-to-SVLAN mappings. |
Configuring the customer-side port
To configure the customer-side port:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Ethernet interface view. |
interface interface-type interface-number |
N/A |
3. Configure the link type of the port. |
port link-type { hybrid | trunk } |
The default link type of an Ethernet port is access. |
4. Assign the port to the CVLANs. |
·
As a hybrid port: ·
As a trunk port: |
By default, ports of any link type permit VLAN 1. |
5. Apply the uplink policy to the incoming traffic. |
qos apply policy policy-name inbound |
N/A |
6. Apply the downlink policy to the outgoing traffic. |
qos apply policy policy-name outbound |
N/A |
Configuring the network-side port
To configure the network-side port:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Ethernet interface view. |
interface interface-type interface-number |
N/A |
3. Configure the link type of the port. |
port link-type { hybrid | trunk } |
Required The default link type of ports is access. |
4. Assign the port to the SVLANs. |
·
As a hybrid port: ·
As a trunk port: |
By default, ports of any link type permit VLAN 1. |
Configuring one-to-two VLAN mapping
Perform one-to-two VLAN mapping on the edge switches from which customer traffic enters SP networks, on PE 1 and PE 4 in Figure 2 for example. One-to-two VLAN mapping enables the edge devices to insert an outer VLAN tag to each incoming VLAN-tagged packet.
Perform these tasks to configure one-to-two VLAN mapping:
Task |
Description |
Configures an uplink policy for the customer-side port (required). |
|
Configures VLAN and other settings required for one-to-two VLAN mapping (required). |
|
Configures VLAN and other settings required for one-to-two VLAN mapping (required). |
Configuration prerequisites
Create VLANs, and plan CVLAN-to-SVLAN mappings.
Configuring an uplink policy
To configure an uplink policy to insert an SVLAN to VLAN tagged packets:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Configure one class for a CVLAN. |
a. Create a class and enter class view: b. Specify one CVLAN as the match criterion: c.
Return to system view: |
N/A |
3. Configure one behavior for an SVLAN. |
a. Create a traffic behavior and enter traffic behavior view: b. Add a VLAN nest action to insert an outer VLAN tag into the
incoming packets from the CVLAN or CVLANs: c.
Return to system view: |
Repeat these steps to configure one behavior for each SVLAN. |
4. Create a QoS policy and enter QoS policy view. |
qos policy policy-name |
Required |
5. Associate the class with the behavior. |
classifier tcl-name behavior behavior-name |
Required Repeat this step to create class-behavior associations for other CVLANs. |
Configuring the customer-side port
To configure the customer-side port:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Ethernet interface view. |
interface interface-type interface-number |
N/A |
3. Configure the port as a hybrid port. |
port link-type hybrid |
The default link type of an Ethernet port is access. |
4. Assign the port to the SVLANs as an untagged member. |
port hybrid vlan vlan-id-list untagged |
By default, a hybrid port is an untagged member of only VLAN 1. |
5. Assign the port to the CVLANs as a tagged member. |
port hybrid vlan vlan-id-list tagged |
N/A |
6. Apply the uplink policy to the incoming traffic. |
qos apply policy policy-name inbound |
N/A |
Configuring the network-side port
To configure the network-side port:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Ethernet interface view. |
interface interface-type interface-number |
N/A |
3. Configure the link type of the port. |
· Configure the port as a trunk port: · Configure the port as a hybrid port: |
Use one of the commands. The default link type of an Ethernet port is access. |
4. Assign the port to all SVLANs and CVLANs. |
·
As a trunk port: ·
As a hybrid port: |
Use one of the commands. By default: · A trunk port is assigned to only VLAN 1. · A hybrid port is an untagged member of VLAN 1. |
Configuring two-to-two VLAN mapping
Perform two-to-two VLAN mapping on an edge device that connects two SP networks, for example, on PE 3 in Figure 2. The two-to-two VLAN mapping implementation of the switch enables two remote sites in the same VLAN to communicate at Layer 2 across two service provider networks that use different VLAN assignment schemes.
|
NOTE: In two-to-two VLAN mapping, foreign SVLANs refer to the outer VLANs of double-tagged frames that arrive at the customer-side port, local VLANs refer to VLANs that replace the foreign SVLANs, and CVLANs refer to inner VLANs. |
Perform these tasks to configure two-to-two VLAN mapping:
Task |
Description |
Replaces foreign SVLANs with local SVLANs for uplink traffic (required). |
|
Replaces local SVLANs with foreign SVLANs (required). |
|
Configures VLAN and other settings required for two-to-two VLAN mapping (required). |
|
Configures VLAN and other settings required for two-to-two VLAN mapping (required). |
Configuring an uplink policy for the customer-side port
The uplink policy on the customer-side port changes the SVLAN ID of incoming traffic.
To configure an uplink policy for the customer-side port:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Configure one class for a CVLAN and a SVLAN. |
a. Create a class and enter class view: b. Specify one CVLAN as the match criterion: c.
Specify one SVLAN as the match criterion: d.
Return to system view: |
Repeat these steps to create one class for each CVLAN and foreign SVLAN pair. |
3. Configure one behavior for an SVLAN. |
a. Create a traffic behavior and enter traffic behavior view: b. Configure an SVLAN marking action to replace the foreign SVLAN ID
with a local SVLAN ID: c.
Return to system view: |
Repeat these steps to configure one SVLAN marking action for each CVLAN and foreign SVLAN pair. |
4. Create a QoS policy and enter QoS policy view. |
qos policy policy-name |
N/A |
5. Associate the class with the behavior. |
classifier tcl-name behavior behavior-name |
Repeat this step to create other class-behavior associations. |
6. Return to system view. |
quit |
N/A |
Configuring a downlink policy for the customer-side port
The downlink policy on the customer-side port replaces a local SVLAN with its corresponding foreign SVLAN.
To configure a downlink policy for the customer-side port:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Configure one class for a CVLAN and a SVLAN. |
a. Create a class and enter class view: b. Specify one CVLAN as the match criterion: c.
Specify one SVLAN as the match criterion: d.
Return to system view: |
Repeat these steps to create one class for each local SVLAN pair. |
3. Configure one behavior for an SVLAN. |
a. Create a traffic behavior and enter traffic behavior view: b. Configure an SVLAN marking action to replace the foreign SVLAN ID
with a local SVLAN ID: c.
Return to system view: |
Repeat these steps to create one VLAN marking behavior for each local SVLAN. |
4. Create a QoS policy and enter QoS policy view. |
qos policy policy-name |
N/A |
5. Associate the class with the behavior. |
classifier tcl-name behavior behavior-name |
Repeat this step to create other class-behavior associations. |
6. Return to system view. |
quit |
N/A |
Configuring the customer-side port
To configure the customer-side port:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Ethernet interface view. |
interface interface-type interface-number |
N/A |
3. Configure the link type of the port. |
· Configure the port as a trunk port: · Configure the port as a hybrid port: |
Use one of the commands. The default link type of an Ethernet port is access. |
4. Assign the port to the foreign SVLANs. |
·
As a trunk port: ·
As a hybrid port: |
Use one of the commands. By default: · A trunk port is assigned to only VLAN 1. · A hybrid port is an untagged member of VLAN 1. |
5. Apply the uplink policy to the incoming traffic. |
qos apply policy policy-name inbound |
Required |
6. Apply the downlink policy to the outgoing traffic. |
qos apply policy policy-name outbound |
Required |
Configuring the network-side port
To configure the network-side port:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter Ethernet interface view. |
interface interface-type interface-number |
N/A |
3. Configure the link type of the port. |
· Configure the port as a trunk port: · Configure the port as a hybrid port: |
Use one of the commands. The default link type of an Ethernet port is access. |
4. Assign the port to the local SVLANs. |
·
As a trunk port: ·
As a hybrid port: |
Use one of the commands. By default: · A trunk port is assigned to only VLAN 1. · A hybrid port is an untagged member of VLAN 1. |
VLAN mapping configuration examples
|
NOTE: If an Ethernet or aggregate interface is down (the default state), use the undo shutdown command to bring it up before you configuring VLAN mapping on it. |
One-to-one VLAN mapping configuration example
Network requirements
As shown in Figure 7, perform one-to-one VLAN mapping on Switch A to replace the VLAN 10 tag with the VLAN 100 tag for transmission in the service provider network.
Configure Switch A
# Create the CVLANs and SVLANs.
<SwitchA> system-view
[SwitchA] vlan 10 to 100
# Configure uplink policy p1 to map CVLAN 10 to SVLAN 100.
[SwitchA] traffic classifier c1
[SwitchA-classifier-c1] if-match service-vlan-id 10
[SwitchA-classifier-c1] quit
[SwitchA] traffic behavior b1
[SwitchA-behavior-b1] remark service-vlan-id 100
[SwitchA-behavior-b1] quit
[SwitchA] qos policy p1
[SwitchA-policy-p1] classifier c1 behavior b1
[SwitchA-policy-p1] quit
# Configure downlink policy p11 to map the SVLAN back to the CVLAN.
[SwitchA] traffic classifier c11
[SwitchA-classifier-c11] if-match service-vlan-id 100
[SwitchA-classifier-c11] quit
[SwitchA] traffic behavior b11
[SwitchA-behavior-b11] remark service-vlan-id 10
[SwitchA-behavior-b11] quit
[SwitchA] qos policy p11
[SwitchA-policy-p11] classifier c11 behavior b11
[SwitchA-policy-p11] quit
# Assign customer-side port GigabitEthernet 4/0/1 to CVLAN 10 and SVLAN 100.
[SwitchA] interface gigabitethernet 4/0/1
[SwitchA-GigabitEthernet4/0/1] port link-type trunk
[SwitchA-GigabitEthernet4/0/1] port trunk permit vlan 10 100
# Apply uplink policy p1 to the incoming traffic and downlink policy p11 to the outgoing traffic
[SwitchA-GigabitEthernet4/0/1] qos apply policy p1 inbound
[SwitchA-GigabitEthernet4/0/1] qos apply policy p11 outbound
# Assign network-side port GigabitEthernet 4/0/2 to the CVLAN and SVLAN.
[SwitchA] interface ethernet gigabitethernet 4/0/2
[SwitchA-GigabitEthernet4/0/2] port link-type trunk
[SwitchA-GigabitEthernet4/0/2] port trunk permit vlan 10 100
One-to-two and two-to-two VLAN mapping configuration example
Network requirements
As shown in Figure 8, Site 1 and Site 2, two remote users in VPN A, are in VLAN 10. SP 1 assigns VLAN 100 for VPN A, and SP 2 assigns VLAN 200 for VPN A.
Configure one-to-two and two-to-two VLAN mappings to enable the two sites to communicate across the two SP networks.
Configure PE 1
# Configure uplink policy test to add outer VLAN tag 100 to VLAN 10 tagged traffic.
<PE1> system-view
[PE1] traffic classifier test
[PE1-classifier-test] if-match service-vlan-id 10
[PE1-classifier-test] quit
[PE1] traffic behavior test
[PE1-behavior-test] nest top-most vlan-id 100
[PE1-behavior-test] quit
[PE1] qos policy test
[PE1-qospolicy-test] classifier test behavior test
[PE1-qospolicy-test] quit
# Set customer-side port GigabitEthernet 4/0/1 as a hybrid port, and assign it to VLAN 100 as an untagged member, so the port forwards VLAN 100 traffic with the VLAN tag removed. Apply uplink policy test to the incoming traffic.
[PE1] interface gigabitethernet 4/0/1
[PE1-GigabitEthernet4/0/1] port link-type hybrid
[PE1-GigabitEthernet4/0/1] port hybrid vlan 100 untagged
[PE1-GigabitEthernet4/0/1] qos apply policy test inbound
[PE1-GigabitEthernet4/0/1] quit
# Set network-side port GigabitEthernet 4/0/2 as a trunk port, and assign it to VLAN 100.
[PE1] interface gigabitethernet 4/0/2
[PE1-GigabitEthernet4/0/2] port link-type trunk
[PE1-GigabitEthernet4/0/2] port trunk permit vlan 100
Configure PE 2
# Set port GigabitEthernet 4/0/1 as a trunk port, and assign it to VLAN 100.
<PE2> system-view
[PE2] interface gigabitethernet 4/0/1
[PE2-GigabitEthernet4/0/1] port link-type trunk
[PE2-GigabitEthernet4/0/1] port trunk permit vlan 100
[PE2-GigabitEthernet4/0/1] quit
# Set port GigabitEthernet 4/0/2 as a trunk port, and assign it to VLAN 100.
[PE2] interface gigabitethernet 4/0/2
[PE2-GigabitEthernet4/0/2] port link-type trunk
[PE2-GigabitEthernet4/0/2] port trunk permit vlan 100
Configure PE 3
# Configure uplink policy down_uplink for customer-side port GigabitEthernet 4/0/1 to substitute SVLAN ID 200 for the SVLAN ID in the incoming traffic tagged with CVLAN 10 and SVLAN 100.
<PE3> system-view
[PE3] traffic classifier down_uplink
[PE3-classifier-down_uplink] if-match customer-vlan-id 10
[PE3-classifier-down_uplink] if-match service-vlan-id 100
[PE3-classifier-down_uplink] quit
[PE3] traffic behavior down_uplink
[PE3-behavior-down_uplink] remark service-vlan-id 200
[PE3-behavior-down_uplink] quit
[PE3] qos policy down_uplink
[PE3-qospolicy-down_uplink] classifier down_uplink behavior down_uplink
[PE3-qospolicy-down_uplink] quit
# Configure downlink policy down_downlink for customer-side port GigabitEthernet 4/0/1 to replace the SVLAN 200 tag with the SVLAN 100 tag.
[PE3] traffic classifier down_downlink
[PE3-classifier-down_downlink] if-match customer-vlan-id 10
[PE3-classifier-down_downlink] if-match service-vlan-id 200
[PE3-classifier-down_downlink] quit
[PE3] traffic behavior down_downlink
[PE3-behavior-down_downlink] remark service-vlan-id 100
[PE3-behavior-down_downlink] quit
[PE3] qos policy down_downlink
[PE3-qospolicy-down_downlink] classifier down_downlink behavior down_downlink
[PE3-qospolicy-down_downlink] quit
# Set customer-side port GigabitEthernet 4/0/1 as a trunk port, assign it to VLAN 200, and apply uplink policy down_uplink to the incoming traffic and downlink policy down_downlink to the outgoing traffic on the port.
[PE3] interface gigabitethernet 4/0/1
[PE3-GigabitEthernet4/0/1] port link-type trunk
[PE3-GigabitEthernet4/0/1] port trunk permit vlan 200
[PE3-GigabitEthernet4/0/1] qos apply policy down_uplink inbound
[PE3-GigabitEthernet4/0/1] qos apply policy down_downlink outbound
[PE3-GigabitEthernet4/0/1] quit
# Set network-side port GigabitEthernet 4/0/2 as a trunk port, and assign it to VLAN 200.
[PE3] interface gigabitethernet 4/0/2
[PE3-GigabitEthernet4/0/2] port link-type trunk
[PE3-GigabitEthernet4/0/2] port trunk permit vlan 200
[PE3-GigabitEthernet4/0/2] quit
Configue PE 4
# Configure uplink policy test to add outer VLAN tag 200 to VLAN 10 tagged traffic.
<PE4> system-view
[PE4] traffic classifier test
[PE4-classifier-test] if-match service-vlan-id 10
[PE4-classifier-test] quit
[PE4] traffic behavior test
[PE4-behavior-test] nest top-most vlan-id 200
[PE4-behavior-test] quit
[PE4] qos policy test
[PE4-qospolicy-test] classifier test behavior test
[PE4-qospolicy-test] quit
# Assign port GigabitEthernet 4/0/2 to VLAN 200.
[PE4] interface gigabitethernet 4/0/2
[PE4-GigabitEthernet4/0/2] port link-type trunk
[PE4-GigabitEthernet4/0/2] port trunk permit vlan 200
# Set port GigabitEthernet 4/0/1 as a hybrid port, and assign it to VLAN 200 as un untagged member, so the port forwards VLAN 200 traffic with the VLAN tag removed. Apply uplink policy test to the incoming traffic on the port.
[PE4] interface gigabitethernet 4/0/1
[PE4-GigabitEthernet4/0/1] port link-type hybrid
[PE4-GigabitEthernet4/0/1] port hybrid vlan 200 untagged
[PE4-GigabitEthernet4/0/1] qos apply policy test inbound