04-Layer 2 - LAN Switching Configuration Guide

HomeSupportSwitchesH3C S9500E Switch SeriesConfigure & DeployConfiguration GuidesH3C S9500E Configuration Guide-Release1728-6W17004-Layer 2 - LAN Switching Configuration Guide
07-VLAN Mapping Configuration
Title Size Download
07-VLAN Mapping Configuration 278.06 KB

Configuring VLAN mapping

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

 

Site 1 and Site 2 are in VLAN 2. The VLAN assigned for VPN A is VLAN 10 in the SP 1 network and VLAN 20 in the SP 2 network.

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 trafficTraffic transmitted from the customer network to the service provider network.

·           Downlink trafficTraffic transmitted from the service provider network to the customer network.

·           Network-side portA port connected to the service provider network.

·           Customer-side portA port connected to the customer network.

·           Uplink policyA QoS policy that defines VLAN mapping rules for uplink traffic.

·           Downlink policyA 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

Configuring one-to-one VLAN mapping

Access switch in an SP network (see Figure 1)

Configuring one-to-two VLAN mapping

Edge switch between SP networks, for example, PE 1 and PE 4 in Figure 2

Configuring two-to-two VLAN mapping

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

Configuring an uplink policy

Creates CVLAN-to-SVLAN mappings (required).

Configuring a downlink policy

Creates SVLAN-to-CVLAN mappings (required).

Configuring the customer-side port

Configures settings required for one-to-one VLAN mapping (required).

Configuring the network-side port

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:
traffic classifier tcl-name [ operator { and | or } ]

b.   Specify one CVLAN as the match criterion:
if-match service-vlan-id vlan-id-value

c.    Return to system view:
quit

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:
traffic behavior behavior-name

b.   Configure an SVLAN marking action:
remark service-vlan-id vlan-id

c.    Return to system view:
quit

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:
traffic classifier tcl-name [ operator { and | or } ]

b.   Specify one SVLAN as the match criterion:
if-match service-vlan-id vlan-id

c.    Return to system view:
quit

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:
traffic behavior behavior-name

b.   Configure an SVLAN marking action:
remark service-vlan-id vlan-id-value

c.    Return to system view:
quit

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:
port hybrid
vlan vlan-id-list tagged

·       As a trunk port:
port trunk permit vlan
{ vlan-id-list | all }

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:
port hybrid
vlan vlan-id-list tagged

·       As a trunk port:
port trunk permit vlan
{ vlan-id-list | all }

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

Configuring an uplink policy

Configures an uplink policy for the customer-side port (required).

Configuring the customer-side port

Configures VLAN and other settings required for one-to-two VLAN mapping (required).

Configuring the network-side port

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:
traffic classifier tcl-name [ operator { and | or } ]

b.   Specify one CVLAN as the match criterion:
if-match service-vlan-id vlan-id-value

c.    Return to system view:
quit

N/A

3.     Configure one behavior for an SVLAN.

a.   Create a traffic behavior and enter traffic behavior view:
traffic behavior behavior-name

b.   Add a VLAN nest action to insert an outer VLAN tag into the incoming packets from the CVLAN or CVLANs:
nest top-most vlan-id vlan-id-value

c.    Return to system view:
quit

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:
port link-type
trunk

·       Configure the port as a hybrid port:
port link-type hybrid

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:
port trunk permit vlan
{ vlan-id-list | all }

·       As a hybrid port:
port hybrid
vlan vlan-id-list tagged

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

Configuring an uplink policy for the customer-side port

Replaces foreign SVLANs with local SVLANs for uplink traffic (required).

Configuring a downlink policy for the customer-side port

Replaces local SVLANs with foreign SVLANs (required).

Configuring the customer-side port

Configures VLAN and other settings required for two-to-two VLAN mapping (required).

Configuring the network-side port

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:
traffic classifier tcl-name [ operator { and | or } ]

b.   Specify one CVLAN as the match criterion:
if-match customer-vlan-id vlan-id-value

c.    Specify one SVLAN as the match criterion:
if-match service-vlan-id vlan-id-value

d.   Return to system view:
quit

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:
traffic behavior behavior-name

b.   Configure an SVLAN marking action to replace the foreign SVLAN ID with a local SVLAN ID:
remark service-vlan-id vlan-id-value

c.    Return to system view:
quit

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:
traffic classifier tcl-name [ operator { and | or } ]

b.   Specify one CVLAN as the match criterion:
if-match customer-vlan-id vlan-id-value

c.    Specify one SVLAN as the match criterion:
if-match service-vlan-id vlan-id-value

d.   Return to system view:
quit

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:
traffic behavior behavior-name

b.   Configure an SVLAN marking action to replace the foreign SVLAN ID with a local SVLAN ID:
remark service-vlan-id vlan-id-value

c.    Return to system view:
quit

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:
port link-type
trunk

·       Configure the port as a hybrid port:
port link-type hybrid

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:
port trunk permit vlan
{ vlan-id-list | all }

·       As a hybrid port:
port hybrid
vlan vlan-id-list tagged

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:
port link-type
trunk

·       Configure the port as a hybrid port:
port link-type hybrid

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:
port trunk permit vlan
{ vlan-id-list | all }

·       As a hybrid port:
port hybrid
vlan vlan-id-list tagged

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.

Figure 7 Network diagram

 

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.

Figure 8 Network diagram

 

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

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网