- Table of Contents
-
- H3C Low-End and Mid-Range Ethernet Switches Configuration Examples(V1.01)
- 00-1Cover
- 01-Login Configuration Guide
- 02-VLAN Configuration Guide
- 03-GVRP Configuration Guide
- 04-Voice VLAN Configuration Guide
- 05-IP Addressing and Performance Configuration Guide
- 06-QinQ Configuration Guide
- 07-BPDU Tunnel Configuration Guide
- 08-VLAN Mapping Configuration Guide
- 09-MAC Address Table Management Configuration Guide
- 10-Link Aggregation Configuration Guide
- 11-IP Source Guard Configuration Guide
- 12-DLDP Configuration Guide
- 13-MSTP Configuration Guide
- 14-IPv4 Routing Configuration Guide
- 15-IPv6 Configuration Guide
- 16-IPv6 Routing Configuration Guide
- 17-IPv4 Multicast Configuration Guide
- 18-IPv6 Multicast Configuration Examples
- 19-802.1x Configuration Guide
- 20-AAA Configuration Guide
- 21-MAC Authentication Configuration Guide
- 22-Portal Configuration Guide
- 23-ARP Configuration Guide
- 24-DHCP Configuration Guide
- 25-ACL Configuration Guide
- 26-QoS Configuration Guide
- 27-Port Mirroring Configuration Guide
- 28-Cluster Management Configuration Guide
- 29-SNMP-RMON Configuration Guide
- 30-NTP Configuration Guide
- 31-FTP-TFTP Configuration Guide
- 32-UDP Helper Configuration Guide
- 33-Information Center Configuration Guide
- 34-DNS Configuration Guide
- 35-File System Management Configuration Guide
- 36-Remote Upgrade Configuration Guide
- 37-NQA Configuration Guide
- 38-VRRP Configuration Guide
- 39-SSH Configuration Guide
- 40-Port Security Configuration Guide
- 41-Port Isolation Configuration Guide
- 42-LLDP Configuration Guide
- 43-MCE Configuration Guide
- 44-PoE Configuration Guide
- 45-OAM Configuration Guide
- 46-Connectivity Fault Detection Configuration Guide
- 47-RRPP Configuration Guide
- 48-sFlow Configuration Guide
- 49-SSL-HTTPS Configuration Guide
- 50-PKI Configuration Guide
- 51-Track Configuration Guide
- 52-EPON-OLT Configuration Guide
- 53-Smart Link Configuration Guide
- 54-MPLS Configuration Guide
- Related Documents
-
06-QinQ Configuration Guide
Networking and Configuration Requirements
Configuring Flow-Based Selective QinQ
Networking and Configuration Requirements
Configuring One-to-One VLAN Mapping
Networking and Configuration Requirements
Configuring QinQ
Network diagram
Figure 1-1 Network diagram for QinQ configuration
Networking and Configuration Requirements
l Provider A and Provider B are service provider network access devices.
l Customer A, Customer B and Customer C are customer network access devices.
l Provider A and Provider B are interconnected through a trunk port. Provider A belongs to service provider VLAN (SVLAN) 1000, and Provider B belongs to SVLAN 2000.
l Third-party devices are deployed between Provider A and Provider B, with a TPID value of 0x8200.
By default, H3C series switches adopt the TPID value 0x8100.
Configure the network to satisfy the following requirements:
l Frames of VLAN 10 of Customer A and frames of VLAN 10 of Customer B can be forwarded to each other through SVLAN 1000;
l Frames of VLAN 20 of Customer A and frames of VLAN 20 of Customer C can be forwarded to each other through SVLAN 2000.
Applicable Product Matrix
Product series |
Software version |
|
S3610 Series Ethernet Switches |
Release 5301, Release 5303 |
All versions |
S5510 Series Ethernet Switches |
Release 5301, Rlease 5303 |
All versions |
S5500-SI Series Ethernet Switches |
Release 1207 |
All versions except S5500-20TP-SI |
Release 1301 |
S5500-20TP-SI |
|
S5500-EI Series Ethernet Switches |
Release 2102 |
All versions |
Configuration Procedure
This example assumes that the SVLANs can pass through the devices inside the network of the service provider.
1) Configuration on Provider A
# Create VLAN 1000 and VLAN 2000.
<ProviderA> system-view
[ProviderA] vlan 1000
[ProviderA-vlan1000] quit
[ProviderA] vlan 2000
[ProviderA-vlan2000] quit
l Configuration on GigabitEthernet 1/0/1
# Configure GigabitEthernet 1/0/1 as a hybrid port and assign it to VLAN 1000 and VLAN 2000 in untagged mode.
[ProviderA] interface GigabitEthernet 1/0/1
[ProviderA-GigabitEthernet1/0/1] port link-type hybrid
[ProviderA-GigabitEthernet1/0/1] port hybrid vlan 1000 2000 untagged
l If your switch is an S3610 or S5510 switch using Release 5301 software version, you must also assign GigabitEthernet 1/0/1 to VLAN 10 and VLAN 20 in untagged mode using the port hybrid vlan 10 20 1000 2000 untagged command.
l If your switch is an an S3610 or S5510 switch using Release 5303 software version, you can disable VLAN check using the vlan-check disable command in interface view. In this way, you do not need to configure GigabitEthernet 1/0/1 to permit VLAN 10 and VLAN 20.
# Configure the port to tag frames from VLAN 10 with an outer tag with the VLAN ID of 1000.
[ProviderA-GigabitEthernet1/0/1] qinq vid 1000
[ProviderA-GigabitEthernet1/0/1-vid-1000] raw-vlan-id inbound 10
[ProviderA-GigabitEthernet1/0/1-vid-1000] quit
# Configure the port to tag frames from VLAN 20 with an outer tag with the VLAN ID of 2000.
[ProviderA-GigabitEthernet1/0/1] qinq vid 2000
[ProviderA-GigabitEthernet1/0/1-vid-2000] raw-vlan-id inbound 20
[ProviderA-GigabitEthernet1/0/1-vid-2000] quit
[ProviderA-GigabitEthernet1/0/1] quit
l Configuration on GigabitEthernet 1/0/2
# Configure GigabitEthernet 1/0/2 as an access port and assign it to VLAN 1000.
[ProviderA] interface GigabitEthernet 1/0/2
[ProviderA-GigabitEthernet1/0/2] port access vlan 1000
# Enable basic QinQ so that the port tags frames from VLAN 10 with an outer tag with the VLAN ID of 1000.
[ProviderA-GigabitEthernet1/0/2] qinq enable
[ProviderA-GigabitEthernet1/0/2] quit
l Configuration on GigabitEthernet 1/0/3.
# Configure GigabitEthernet 1/0/3 as a trunk port, and assign it to VLAN 1000 and VLAN 2000.
[ProviderA] interface GigabitEthernet 1/0/3
[ProviderA-GigabitEthernet1/0/3] port link-type trunk
[ProviderA-GigabitEthernet1/0/3] port trunk permit vlan 1000 2000
# To enable interoperability with the third-party devices in the public network, set the TPID value to be carried in VLAN tags to 0x8200.
[ProviderA-GigabitEthernet1/0/3] quit
[ProviderA] qinq ethernet-type service-tag 8200
l On the S5500-EI and S5500-SI series switches, selective QinQ configuration can coexist with basic QinQ configuration but enjoys a higher priority, that is, a received frame will be tagged with an outer VLAN ID based on basic QinQ only after it fails to match the match criteria defined in the traffic class. On the S3610 and S5510 series switches, basic QinQ and selective QinQ are mutually exclusive.
2) Configuration on Provider B
# Create VLAN 1000 and VLAN 2000.
<ProviderB> system-view
[ProviderB] vlan 1000
[ProviderB-vlan1000] quit
[ProviderB] vlan 2000
[ProviderB-vlan2000] quit
l Configuration on GigabitEthernet 1/0/1
# Configure GigabitEthernet 1/0/1 as a trunk port, and assign it to VLAN 1000 and VLAN 2000.
<ProviderB> system-view
[ProviderB] interface GigabitEthernet 1/0/1
[ProviderB-GigabitEthernet1/0/1] port link-type trunk
[ProviderB-GigabitEthernet1/0/1] port trunk permit vlan 1000 2000
# To enable interoperability with the third-party devices in the public network, set the TPID value to be carried in VLAN tags to 0x8200.
[ProviderB-GigabitEthernet1/0/1] quit
[ProviderB] qinq ethernet-type service-tag 8200
l Configuration on GigabitEthernet 1/0/2
# Configure GigabitEthernet 1/0/2 as an access port and assign it to VLAN 2000.
[ProviderB] interface GigabitEthernet 1/0/2
[ProviderB-GigabitEthernet1/0/2] port access vlan 2000
# Enable basic QinQ so as to tag frames from VLAN 20 with an outer tag with the VLAN ID of 2000.
[ProviderB-GigabitEthernet1/0/2] qinq enable
3) Configuration on the devices on the public network
As third-party devices are deployed between Provider A and Provider B, only the basic configurations that should be made on the devices are discussed here. Configure that device connecting with GigabitEthernet 1/0/3 of Provider A and the device connecting with GigabitEthernet 1/0/1 of Provider B so that the involved ports on them send tagged frames of VLAN 1000 and VLAN 2000. The configuration steps are omitted here.
Complete Configuration
l Configuration on ProviderA
#
qinq ethernet-type service-tag 8200
#
vlan 1000
#
vlan 2000
#
interface GigabitEthernet1/0/1
port link-type hybrid
port hybrid vlan 1 1000 2000 untagged
qinq vid 1000
raw-vlan-id inbound 10
qinq vid 2000
raw-vlan-id inbound 20
#
interface GigabitEthernet1/0/2
port access vlan 1000
qinq enable
#
interface GigabitEthernet1/0/3
port link-type trunk
port trunk permit vlan 1 1000 2000
l Configuration on DeviceB
#
qinq ethernet-type service-tag 8200
#
vlan 1000
#
vlan 2000
#
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk permit vlan 1 1000 2000
#
interface GigabitEthernet1/0/2
port access vlan 2000
qinq enable
Configuration Guidelines
An inner VLAN tag corresponds to only one outer VLAN tag. If you want to change an outer VLAN tag, you must delete the old outer VLAN tag configuration and configure a new outer VLAN tag.
Configuring Flow-Based Selective QinQ
Network Diagram
Figure 1-2 Network diagram for flow-based selective QinQ configuration
Networking and Configuration Requirements
l Provider A and Provider B are service provider network access devices.
l Customer A, Customer B, Customer C, and Customer D are customer network access devices.
l Provider A and Provider B are interconnected through a trunk port, which permits the frames of SVLAN 1000, SVLAN 2000, and SVLAN 3000 to pass through.
l Third-party devices are deployed between Provider A and Provider B, with a TPID value of 0x8200.
Configure the network to satisfy the following requirements:
l VLAN 10 of Customer A and VLAN 10 of Customer B can intercommunicate across SVLAN 1000.
l VLAN 20 of Customer A and VLAN 20 of Customer C can intercommunicate across SVLAN 2000.
l Frames of the VLANs other than VLAN 10 and VLAN 20 of Customer A can be forwarded to Customer D across SVLAN 3000.
Applicable Product Matrix
Product series |
Software version |
Hardware version |
S7500E Series Ethernet Switches |
Release 6100, Release 6300 |
All versions |
Configuration Procedure
1) Configuration on Provider A
# Create VLAN 1000, VLAN 2000, and VLAN 3000.
<ProviderA> system-view
[ProviderA] vlan 1000
[ProviderA-vlan1000] quit
[ProviderA] vlan 2000
[ProviderA-vlan2000] quit
[ProviderA] vlan 3000
[ProviderA-vlan3000] quit
l Configuration on Ethernet 2/0/1
# Configure Ethernet 2/0/1 as a hybrid port and assign it to VLAN 1000, VLAN 2000, and VLAN 3000 in untagged mode.
[ProviderA] interface ethernet 2/0/1
[ProviderA-Ethernet2/0/1] port link-type hybrid
[ProviderA-Ethernet2/0/1] port hybrid vlan 1000 2000 3000 untagged
# Configure VLAN 3000 as the default VLAN of Ethernet 2/0/1, and enable basic QinQ on Ethernet 2/0/1. As a result, the frames received on the port are tagged with the outer VLAN tag 3000.
[ProviderA-Ethernet2/0/1] port hybrid pvid vlan 3000
[ProviderA-Ethernet2/0/1] qinq enable
[ProviderA-Ethernet2/0/1] quit
# Create a class A10 to match frames of VLAN 10 of Customer A.
[ProviderA] traffic classifier A10
[ProviderA-classifier-A10] if-match customer-vlan-id 10
[ProviderA-classifier-A10] quit
# Create a traffic behavior P1000 and configure the action of tagging frames with the outer VLAN tag 1000 for the traffic behavior.
[ProviderA] traffic behavior P1000
[ProviderA-behavior-P1000] nest top-most vlan-id 1000
[ProviderA-behavior-P1000] quit
# Create a class A20 to match frames of VLAN 20 of Customer A. Create a traffic behavior P2000 and configure the action of tagging frames with the outer VLAN tag 2000 for the traffic behavior.
[ProviderA] traffic classifier A20
[ProviderA-classifier-A20] if-match customer-vlan-id 20
[ProviderA-classifier-A20] quit
[ProviderA] traffic behavior P2000
[ProviderA-behavior-P2000] nest top-most vlan-id 2000
[ProviderA-behavior-P2000] quit
# Create a QoS policy qinq. Associate the class A10 with the traffic behavior P1000, and associate the class A20 with the traffic behavior P2000 in the QoS policy qinq.
[ProviderA] qos policy qinq
[ProviderA-qospolicy-qinq] classifier A10 behavior P1000
[ProviderA-qospolicy-qinq] classifier A20 behavior P2000
[ProviderA-qospolicy-qinq] quit
# Apply the QoS policy qinq in the inbound direction of Ethernet 2/0/1.
[ProviderA] interface Ethernet 2/0/1
[ProviderA-Ethernet2/0/1] qos apply policy qinq inbound
l Configuration on Ethernet 2/0/2
# Configure VLAN 1000 as the default VLAN of Ethernet 2/0/2.
[ProviderA] interface ethernet 2/0/2
[ProviderA-Ethernet2/0/2] port access vlan 1000
# Enable basic QinQ. Tag frames from VLAN 10 with the outer VLAN tag 1000.
[ProviderA-Ethernet2/0/2] qinq enable
[ProviderA-Ethernet2/0/2] quit
l Configuration on Ethernet 2/0/3.
# Configure Ethernet 2/0/3 as a trunk port, and assign it to VLAN 1000 and VLAN 2000.
[ProviderA] interface ethernet 2/0/3
[ProviderA-Ethernet2/0/3] port link-type trunk
[ProviderA-Ethernet2/0/3] port trunk permit vlan 1000 2000
# To enable interoperability with the third-party devices in the public network, set the TPID of the SVLAN tags to 0x8200. Therefore, the port tags the frames with the outer VLAN tag whose TPID is 0x8200.
[ProviderA-Ethernet2/0/3] qinq ethernet-type service-tag 8200
2) Configuration on Provider B
# Create VLAN 1000, VLAN 2000, and VLAN 3000.
<ProviderA> system-view
[ProviderA] vlan 1000
[ProviderA-vlan1000] quit
[ProviderA] vlan 2000
[ProviderA-vlan2000] quit
[ProviderA] vlan 3000
[ProviderA-vlan3000] quit
l Configuration on Ethernet 2/0/1
# Configure Ethernet 2/0/1 as a trunk port, and assign it to VLAN 1000、VLAN 2000 and VLAN 3000.
<ProviderB> system-view
[ProviderB] interface ethernet 2/0/1
[ProviderB-Ethernet2/0/1] port link-type trunk
[ProviderB-Ethernet2/0/1] port trunk permit vlan 1000 2000 3000
# To enable interoperability with the third-party devices in the public network, set the TPID of the SVLAN tags to 0x8200. Therefore, the port tags the received frames with the outer VLAN tag whose TPID is 0x8200.
[ProviderB-Ethernet2/0/1] qinq ethernet-type service-tag 8200
[ProviderB-Ethernet2/0/1] quit
l Configuration on Ethernet 2/0/2
# Configure VLAN 2000 as the default VLAN.
[ProviderB] interface ethernet 2/0/2
[ProviderB-Ethernet2/0/2] port access vlan 2000
# Enable basic QinQ. Tag frames from VLAN 20 with the outer VLAN tag 2000.
[ProviderB-Ethernet2/0/2] qinq enable
[ProviderB-Ethernet2/0/2] quit
l Configuration on Ethernet 2/0/3
# Configure VLAN 3000 as the default VLAN of Ethernet 2/0/3.
[ProviderB] interface ethernet 2/0/3
[ProviderB-Ethernet2/0/3] port access vlan 3000
# Enable basic QinQ to tag frames of all customer VLANs (CVLANs) with the outer VLAN tag 3000.
[ProviderB-Ethernet2/0/3] qinq enable
3) Configuration on devices on the public network
As third-party devices are deployed between Provider A and Provider B, only the basic configurations that should be made on the devices are discussed here. Configure that device connecting with Ethernet 2/0/3 of Provider A and the device connecting with Ethernet 2/0/1 of Provider B so that the involved ports on them send tagged frames of VLAN 1000, VLAN 2000 and VLAN 3000. The configuration steps are omitted here.
Complete Configuration
l Configuration on ProviderA
#
vlan 1000
#
vlan 2000
#
vlan 3000
#
#
traffic classifier A10 operator and
if-match customer-vlan-id 10
traffic classifier A20 operator and
if-match customer-vlan-id 20
#
traffic behavior P1000
nest top-most vlan-id 1000
traffic behavior P2000
nest top-most vlan-id 2000
#
qos policy qinq
classifier A10 behavior P1000
classifier A20 behavior P2000
#
interface Ethernet2/0/1
port link-type hybrid
port hybrid vlan 1 100 1000 2000 3000 untagged
port hybrid pvid vlan 3000
qinq enable
qos apply policy qinq inbound
#
interface Ethernet2/0/2
port access vlan 1000
qinq enable
#
interface Ethernet2/0/3
port link-type trunk
port trunk permit vlan 1 100 2000 3000
qinq ethernet-type service-tag 8200
l Configuration on ProviderB
#
vlan 1000
#
vlan 2000
#
vlan 3000
#
interface GigabitEthernet2/0/1
port link-type trunk
port trunk permit vlan 1 1000 2000 3000
qinq ethernet-type service-tag 8200
#
interface GigabitEthernet2/0/2
port access vlan 2000
qinq enable
#
interface GigabitEthernet2/0/3
port access vlan 3000
qinq enable
Configuration Guidelines
l Before enabling selective QinQ on a port, enable basic QinQ on the port first. Selective QinQ enjoys higher priority than basic QinQ. Therefore, a received frame will be tagged with an outer VLAN ID based on basic QinQ only after it fails to match the match criteria defined in the traffic class.
l On the S7500E series switches, selective QinQ is achieved through QoS policies. For detailed information about QoS policies, refer to the part talking about QoS.
Configuring One-to-One VLAN Mapping
Network Diagram
Figure 1-3 Network diagram for one-to-one VLAN mapping
Networking and Configuration Requirements
For a home, different types of traffic (PC, IPTV, and VoIP) are transmitted in different VLANs.
For a traffic type, packets from different users are isolated from each other.
Applicable Product Matrix
Product series |
Software version |
Hardware version |
S7500E Series Ethernet Switches |
Release 6100 |
All versions |
Configuration Procedure
1) Configuration on Switch A
<SwitchA> system-view
# Create CVLANs and SVLANs.
[SwitchA] vlan 2 to 3
[SwitchA] vlan 101 to 102
[SwitchA] vlan 201 to 202
[SwitchA] vlan 301 to 302
# Configure uplink policies to map the CVLANs to the SVLANs.
[SwitchA] traffic classifier c1
[SwitchA-classifier-c1] if-match customer-vlan-id 1
[SwitchA-classifier-c1] traffic classifier c2
[SwitchA-classifier-c2] if-match customer-vlan-id 2
[SwitchA-classifier-c2] traffic classifier c3
[SwitchA-classifier-c3] if-match customer-vlan-id 3
[SwitchA-classifier-c3] quit
[SwitchA] traffic behavior b1
[SwitchA-behavior-b1] remark service-vlan-id 101
[SwitchA-behavior-b1] traffic behavior b2
[SwitchA-behavior-b2] remark service-vlan-id 201
[SwitchA-behavior-b2] traffic behavior b3
[SwitchA-behavior-b3] remark service-vlan-id 301
[SwitchA-behavior-b3] traffic behavior b4
[SwitchA-behavior-b4] remark service-vlan-id 102
[SwitchA-behavior-b4] traffic behavior b5
[SwitchA-behavior-b5] remark service-vlan-id 202
[SwitchA-behavior-b5] traffic behavior b6
[SwitchA-behavior-b6] remark service-vlan-id 302
[SwitchA-behavior-b6] quit
[SwitchA] qos policy p1
[SwitchA-policy-p1] classifier c1 behavior b1
[SwitchA-policy-p1] classifier c2 behavior b2
[SwitchA-policy-p1] classifier c3 behavior b3
[SwitchA-policy-p1] quit
[SwitchA] qos policy p2
[SwitchA-policy-p2] classifier c1 behavior b4
[SwitchA-policy-p2] classifier c2 behavior b5
[SwitchA-policy-p2] classifier c3 behavior b6
[SwitchA-policy-p2] quit
# Configure downlink policies to map the SVLANs to the original CVLANs.
[SwitchA] traffic classifier c11
[SwitchA-classifier-c11] if-match service-vlan-id 101
[SwitchA-classifier-c11] traffic classifier c22
[SwitchA-classifier-c22] if-match service-vlan-id 201
[SwitchA-classifier-c22] traffic classifier c33
[SwitchA-classifier-c33] if-match service-vlan-id 301
[SwitchA-classifier-c33] traffic classifier c44
[SwitchA-classifier-c44] if-match service-vlan-id 102
[SwitchA-classifier-c44] traffic classifier c55
[SwitchA-classifier-c55] if-match service-vlan-id 202
[SwitchA-classifier-c55] traffic classifier c66
[SwitchA-classifier-c66] if-match service-vlan-id 302
[SwitchA-classifier-c66] quit
[SwitchA] traffic behavior b11
[SwitchA-behavior-b11] remark customer-vlan-id 1
[SwitchA-behavior-b11] traffic behavior b22
[SwitchA-behavior-b22] remark customer-vlan-id 2
[SwitchA-behavior-b22] traffic behavior b33
[SwitchA-behavior-b33] remark customer-vlan-id 3
[SwitchA-behavior-b33] quit
[SwitchA] qos policy p11
[SwitchA-policy-p11] classifier c11 behavior b11
[SwitchA-policy-p11] classifier c22 behavior b22
[SwitchA-policy-p11] classifier c33 behavior b33
[SwitchA-policy-p11] quit
[SwitchA] qos policy p22
[SwitchA-policy-p22] classifier c44 behavior b11
[SwitchA-policy-p22] classifier c55 behavior b22
[SwitchA-policy-p22] classifier c66 behavior b33
[SwitchA-policy-p22] quit
# Configure GigabitEthernet 2/0/1 as a trunk port and assign it to the specified CVLANs and SVLANs.
[SwitchA] interface GigabitEthernet 2/0/1
[SwitchA-GigabitEthernet2/0/1] port link-type trunk
[SwitchA-GigabitEthernet2/0/1] port trunk permit vlan 1 2 3 101 201 301
# Enable basic QinQ on GigabitEthernet 2/0/1.
[SwitchA-GigabitEthernet2/0/1] qinq enable
# Apply the uplink policy p1 to the inbound direction of GigabitEthernet 2/0/1.
[SwitchA-GigabitEthernet2/0/1] qos apply policy p1 inbound
# Apply the downlink policy p11 to the outbound direction of GigabitEthernet 2/0/1.
[SwitchA-GigabitEthernet2/0/1] qos apply policy p11 outbound
[SwitchA-GigabitEthernet2/0/1] quit
# Configure GigabitEthernet 2/0/2 as a trunk port and assign it to the specified CVLANs and SVLANs.
[SwitchA] interface GigabitEthernet 2/0/2
[SwitchA-GigabitEthernet2/0/2] port link-type trunk
[SwitchA-GigabitEthernet2/0/2] port trunk permit vlan 1 2 3 102 202 302
# Enable basic QinQ on GigabitEthernet 2/0/2.
[SwitchA-GigabitEthernet2/0/2] qinq enable
# Apply the uplink policy p2 to the inbound direction of GigabitEthernet 1/2.
[SwitchA-GigabitEthernet2/0/2] qos apply policy p2 inbound
# Apply the downlink policy p22 to the outbound direction of GigabitEthernet 1/2.
[SwitchA-GigabitEthernet2/0/2] qos apply policy p22 outbound
[SwitchA-GigabitEthernet2/0/2] quit
# Configure GigabitEthernet 2/0/3 as a trunk port and assign it to the specified SVLANs.
[SwitchA] interface GigabitEthernet 2/0/3
[SwitchA-GigabitEthernet2/0/3] port link-type trunk
[SwitchA-GigabitEthernet2/0/3] port trunk permit vlan 101 201 301 102 202 302
2) Configuration on Switch B
<SwitchB> system-view
# Create CVLANs and SVLANs.
[SwitchB] vlan 2 to 3
[SwitchB] vlan 111 to 112
[SwitchB] vlan 211 to 212
[SwitchB] vlan 311 to 312
# Configure uplink policies to map the CVLANs to the SVLANs.
[SwitchB] traffic classifier c1
[SwitchB-classifier-c1] if-match customer-vlan-id 1
[SwitchB-classifier-c1] traffic classifier c2
[SwitchB-classifier-c2] if-match customer-vlan-id 2
[SwitchB-classifier-c2] traffic classifier c3
[SwitchB-classifier-c3] if-match customer-vlan-id 3
[SwitchB-classifier-c3] quit
[SwitchB] traffic behavior b1
[SwitchB-behavior-b1] remark service-vlan-id 111
[SwitchB-behavior-b1] traffic behavior b2
[SwitchB-behavior-b2] remark service-vlan-id 211
[SwitchB-behavior-b2] traffic behavior b3
[SwitchB-behavior-b3] remark service-vlan-id 311
[SwitchB-behavior-b3] traffic behavior b4
[SwitchB-behavior-b4] remark service-vlan-id 112
[SwitchB-behavior-b4] traffic behavior b5
[SwitchB-behavior-b5] remark service-vlan-id 212
[SwitchB-behavior-b5] traffic behavior b6
[SwitchB-behavior-b6] remark service-vlan-id 312
[SwitchB-behavior-b6] quit
[SwitchB] qos policy p1
[SwitchB-policy-p1] classifier c1 behavior b1
[SwitchB-policy-p1] classifier c2 behavior b2
[SwitchB-policy-p1] classifier c3 behavior b3
[SwitchB-policy-p1] quit
[SwitchB] qos policy p2
[SwitchB-policy-p2] classifier c1 behavior b4
[SwitchB-policy-p2] classifier c2 behavior b5
[SwitchB-policy-p2] classifier c3 behavior b6
[SwitchB-policy-p2] quit
# Configure downlink policies to map the SVLANs to the original CVLANs.
[SwitchB] traffic classifier c11
[SwitchB-classifier-c11] if-match service-vlan-id 111
[SwitchB-classifier-c11] traffic classifier c22
[SwitchB-classifier-c22] if-match service-vlan-id 211
[SwitchB-classifier-c22] traffic classifier c33
[SwitchB-classifier-c33] if-match service-vlan-id 311
[SwitchB-classifier-c33] traffic classifier c44
[SwitchB-classifier-c44] if-match service-vlan-id 112
[SwitchB-classifier-c44] traffic classifier c55
[SwitchB-classifier-c55] if-match service-vlan-id 212
[SwitchB-classifier-c55] traffic classifier c66
[SwitchB-classifier-c66] if-match service-vlan-id 312
[SwitchB-classifier-c66] quit
[SwitchB] traffic behavior b11
[SwitchB-behavior-b11] remark customer-vlan-id 1
[SwitchB-behavior-b11] traffic behavior b22
[SwitchB-behavior-b22] remark customer-vlan-id 2
[SwitchB-behavior-b22] traffic behavior b33
[SwitchB-behavior-b33] remark customer-vlan-id 3
[SwitchB-behavior-b33] quit
[SwitchB] qos policy p11
[SwitchB-policy-p11] classifier c11 behavior b11
[SwitchB-policy-p11] classifier c22 behavior b22
[SwitchB-policy-p11] classifier c33 behavior b33
[SwitchB-policy-p11] quit
[SwitchB] qos policy p22
[SwitchB-policy-p22] classifier c44 behavior b11
[SwitchB-policy-p22] classifier c55 behavior b22
[SwitchB-policy-p22] classifier c66 behavior b33
[SwitchB-policy-p22] quit
# Configure GigabitEthernet 2/0/1 as a trunk port and assign it to the specified CVLANs and SVLANs.
[SwitchB] interface GigabitEthernet 2/0/1
[SwitchB-GigabitEthernet2/0/1] port link-type trunk
[SwitchB-GigabitEthernet2/0/1] port trunk permit vlan 1 2 3 111 211 311
# Enable basic QinQ on GigabitEthernet 2/0/1.
[SwitchA-GigabitEthernet2/0/1] qinq enable
# Apply the uplink policy p1 to the inbound direction of GigabitEthernet 2/0/1.
[SwitchB-GigabitEthernet2/0/1] qos apply policy p1 inbound
# Apply the downlink policy p11 to the outbound direction of GigabitEthernet 2/0/1.
[SwitchB-GigabitEthernet2/0/1] qos apply policy p11 outbound
[SwitchB-GigabitEthernet2/0/1] quit
# Configure GigabitEthernet 2/0/2 as a trunk port and assign it to the specified CVLANs and SVLANs.
[SwitchB] interface GigabitEthernet 2/0/2
[SwitchB-GigabitEthernet2/0/2] port link-type trunk
[SwitchB-GigabitEthernet2/0/2] port trunk permit vlan 1 2 3 112 212 312
# Enable basic QinQ on GigabitEthernet 2/0/2.
[SwitchA-GigabitEthernet2/0/2] qinq enable
# Apply the uplink policy p2 to the inbound direction of GigabitEthernet 1/2.
[SwitchB-GigabitEthernet2/0/2] qos apply policy p2 inbound
# Apply the downlink policy p22 to the outbound direction of GigabitEthernet 1/2.
[SwitchB-GigabitEthernet2/0/2] qos apply policy p22 outbound
[SwitchB-GigabitEthernet2/0/2] quit
# Configure GigabitEthernet 2/0/3 as a trunk port and assign it to the specified SVLANs.
[SwitchB] interface GigabitEthernet 2/0/3
[SwitchB-GigabitEthernet2/0/3] port link-type trunk
[SwitchB-GigabitEthernet2/0/3] port trunk permit vlan 111 211 311 112 212 312
Complete Configuration
Configuration on Switch A:
#
vlan 1
#
vlan 2 to 3
#
vlan 101 to 102
#
vlan 201 to 202
#
vlan 301 to 302
#
traffic classifier c2 operator and
if-match customer-vlan-id 2
traffic classifier c3 operator and
if-match customer-vlan-id 3
traffic classifier c1 operator and
if-match customer-vlan-id 1
traffic classifier c11 operator and
if-match service-vlan-id 101
traffic classifier c22 operator and
if-match service-vlan-id 201
traffic classifier c33 operator and
if-match service-vlan-id 301
traffic classifier c44 operator and
if-match service-vlan-id 102
traffic classifier c55 operator and
if-match service-vlan-id 202
traffic classifier c66 operator and
if-match service-vlan-id 302
#
traffic behavior b11
remark customer-vlan-id 1
traffic behavior b22
remark customer-vlan-id 2
traffic behavior b33
remark customer-vlan-id 3
traffic behavior b6
remark service-vlan-id 302
traffic behavior b4
remark service-vlan-id 102
traffic behavior b2
remark service-vlan-id 201
traffic behavior b5
remark service-vlan-id 202
traffic behavior b3
remark service-vlan-id 301
traffic behavior b1
remark service-vlan-id 101
#
qos policy p11
classifier c11 behavior b11
classifier c22 behavior b22
classifier c33 behavior b33
qos policy p22
classifier c44 behavior b11
classifier c55 behavior b22
classifier c66 behavior b33
qos policy p2
classifier c1 behavior b4
classifier c2 behavior b5
classifier c3 behavior b6
qos policy p1
classifier c1 behavior b1
classifier c2 behavior b2
classifier c3 behavior b3
#
interface GigabitEthernet2/0/1
port link-type trunk
port trunk permit vlan 1 to 3 101 201 301
qos apply policy p1 inbound
qos apply policy p11 outbound
#
interface GigabitEthernet2/0/2
port link-type trunk
port trunk permit vlan 1 to 3 102 202 302
qos apply policy p2 inbound
qos apply policy p22 outbound
#
interface GigabitEthernet2/0/3
port link-type trunk
port trunk permit vlan 1 101 to 102 201 to 202 301 to 302
#
Configuration on Switch B:
#
vlan 1
#
vlan 2 to 3
#
vlan 111 to 112
#
vlan 211 to 212
#
vlan 311 to 312
#
traffic classifier c2 operator and
if-match customer-vlan-id 2
traffic classifier c3 operator and
if-match customer-vlan-id 3
traffic classifier c1 operator and
if-match customer-vlan-id 1
traffic classifier c11 operator and
if-match service-vlan-id 111
traffic classifier c22 operator and
if-match service-vlan-id 211
traffic classifier c33 operator and
if-match service-vlan-id 311
traffic classifier c44 operator and
if-match service-vlan-id 112
traffic classifier c55 operator and
if-match service-vlan-id 212
traffic classifier c66 operator and
if-match service-vlan-id 312
#
traffic behavior b11
remark customer-vlan-id 1
traffic behavior b22
remark customer-vlan-id 2
traffic behavior b33
remark customer-vlan-id 3
traffic behavior b6
remark service-vlan-id 312
traffic behavior b4
remark service-vlan-id 112
traffic behavior b2
remark service-vlan-id 211
traffic behavior b5
remark service-vlan-id 212
traffic behavior b3
remark service-vlan-id 311
traffic behavior b1
remark service-vlan-id 111
#
qos policy p11
classifier c11 behavior b11
classifier c22 behavior b22
classifier c33 behavior b33
qos policy p22
classifier c44 behavior b11
classifier c55 behavior b22
classifier c66 behavior b33
qos policy p2
classifier c1 behavior b4
classifier c2 behavior b5
classifier c3 behavior b6
qos policy p1
classifier c1 behavior b1
classifier c2 behavior b2
classifier c3 behavior b3
#
interface GigabitEthernet2/0/1
port link-type trunk
port trunk permit vlan 1 to 3 111 211 311
qos apply policy p1 inbound
qos apply policy p11 outbound
#
interface GigabitEthernet2/0/2
port link-type trunk
port trunk permit vlan 1 to 3 112 212 312
qos apply policy p2 inbound
qos apply policy p22 outbound
#
interface GigabitEthernet2/0/3
port link-type trunk
port trunk permit vlan 1 111 to 112 211 to 212 311 to 312
#
Configuration Guidelines
Note that:
l Of the VLAN mapping types, only one-to-one VLAN mapping is supported on the S7500E switches.
l On S7500E switches, refer to the corresponding operation and command manuals for support for the inbound and outbound keywords of the qos policy apply command.
l Before configuring one-to-one VLAN mapping, design the CVLAN-SVLAN mapping relationships first.
l To use QoS policies for implementing one-to-one VLAN mapping in the outbound direction of an SA or EA board, you must use the if-match customer-vlan-id command for traffic classification in an uplink policy, and use the remark customer-vlan-id command in the traffic behavior of a downlink policy; additionally, you must enable basic QinQ on a port before applying a QoS policy to the port.