- Table of Contents
-
- 03-Layer 2 - LAN Switching Configuration Examples
- 01-H3C_S10500_MAC_Address_Table_Configuration_Examples
- 02-H3C_S10500_Ethernet_Link_Aggregation_Configuration_Examples
- 03-H3C_S10500_Port_Isolation_Configuration_Examples
- 04-H3C_S10500_Spanning_Tree_Configuration_Examples
- 05-H3C_S10500_VLAN_Configuration_Examples
- 06-H3C_S10500_MVRP_Configuration_Examples
- 07-H3C_S10500_QinQ_Configuration_Examples
- 08-H3C_S10500_VLAN_Mapping_Configuration_Examples
- Related Documents
-
Title | Size | Download |
---|---|---|
08-H3C_S10500_VLAN_Mapping_Configuration_Examples | 296.75 KB |
H3C S10500 VLAN Mapping Configuration Examples
Copyright © 2015 Hangzhou H3C Technologies Co., Ltd. All rights reserved. No part of this manual may be reproduced or transmitted in any form or by any means without prior written consent of Hangzhou H3C Technologies Co., Ltd. The information in this document is subject to change without notice. |
|
Contents
Example: Configuring one-to-two VLAN mapping
Configuration restrictions and guidelines
Configuring devices between PE A and PE B
Example: Configuring two-to-two VLAN mapping
Configuration restrictions and guidelines
Introduction
This document provides examples of adding or modifying VLAN tags by using VLAN mapping.
Prerequisites
The configuration examples in this document were created and verified in a lab environment, and all the devices were started with the factory default configuration. When you are working on a live network, make sure you understand the potential impact of every command on your network.
This document assumes that you have basic knowledge of H3C VLAN mapping.
Example: Configuring one-to-two VLAN mapping
Network requirements
As shown in Figure 1:
· Customer A and Customer B each have two branches that require Layer 2 connectivity over the service provider network.
· Both customers have three types of traffic. For each customer, the service provider assigns one SVLAN by traffic type.
Configure one-to-two VLAN mapping on each customer-side port of PE A and PE B to meet the following requirements:
· The service provider adds an SVLAN tag to packets from customer networks based on the traffic type, as described in Table 1 and Figure 2.
· The SVLAN tag uses the same 802.1p priority as the CVLAN tag.
Table 1 VLAN mapping table
Traffic type |
CVLANs |
SVLAN |
Customer A |
|
|
Video |
31 to 40 |
1003 |
Voice |
21 to 30 |
1002 |
Data |
10 to 20 |
1001 |
Customer B |
|
|
Storage |
36 to 40 |
2003 |
Voice |
26 to 35 |
2002 |
Data |
15 to 25 |
2001 |
Figure 2 Required traffic pattern in the service provider network
Requirements analysis
To support multiple SVLANs and send traffic to the customer networks with the SVLAN tag removed, perform the following tasks on the customer-side ports:
1. Configure the link type of the ports as hybrid.
2. Assign the ports to the SVLANs as untagged VLAN members.
For the SVLAN tag to use the same 802.1p priority as the CVLAN tag, configure the customer-side port to use the 802.1p priority in incoming packets for priority mapping.
Software version used
This configuration example was created and verified on S10500-CMW710-R7150.
Configuration restrictions and guidelines
When you configure ports on the forwarding path of double-tagged packets across the service provider network, follow these restrictions and guidelines:
· Set the MTU to a minimum of 1504 bytes for each port.
· Configure all ports to allow double-tagged packets to pass through without removing the SVLAN tag.
Configuration procedures
Configuring PE A
1. Create CVLANs and SVLANs:
# Create CVLANs 10 to 40.
<PE_A> system-view
[PE_A] vlan 10 to 40
# Create SVLANs 1001 through 1003 and SVLANs 2001 through 2003.
[PE_A] vlan 1001 to 1003
[PE_A] vlan 2001 to 2003
2. Configure the customer-side port Ten-GigabitEthernet 1/0/1:
# Configure the port as a hybrid port.
[PE_A] interface ten-gigabitethernet 1/0/1
[PE_A-Ten-GigabitEthernet1/0/1] port link-type hybrid
# Assign the port to CVLANs 10 through 40 as a tagged VLAN member.
[PE_A-Ten-GigabitEthernet1/0/1] port hybrid vlan 10 to 40 tagged
# Assign the port to SVLANs 1001 through 1003 as an untagged VLAN member.
[PE_A-Ten-GigabitEthernet1/0/1] port hybrid vlan 1001 to 1003 untagged
# Remove the port from VLAN 1.
[PE_A-Ten-GigabitEthernet1/0/1] undo port hybrid vlan 1
# Configure one-to-two VLAN mapping to add SVLAN tag 1001 to traffic from VLANs 10 through 20.
[PE_A-Ten-GigabitEthernet1/0/1] vlan mapping nest range 10 to 20 nested-vlan 1001
# Configure one-to-two VLAN mapping to add SVLAN tag 1002 to traffic from VLANs 21 through 30.
[PE_A-Ten-GigabitEthernet1/0/1] vlan mapping nest range 21 to 30 nested-vlan 1002
# Configure one-to-two VLAN mapping to add SVLAN tag 1003 to traffic from VLANs 31 through 40.
[PE_A-Ten-GigabitEthernet1/0/1] vlan mapping nest range 31 to 40 nested-vlan 1003
# Configure the port to use the 802.1p priority in incoming packets for priority mapping.
[PE_A-Ten-GigabitEthernet1/0/1] qos trust dot1p
[PE_A-Ten-GigabitEthernet1/0/1] quit
3. Configure the customer-side port Ten-GigabitEthernet 1/0/2:
# Configure the port as a hybrid port.
[PE_A] interface ten-gigabitethernet 1/0/2
[PE_A-Ten-GigabitEthernet1/0/2] port link-type hybrid
# Assign the port to CVLANs 15 through 40 as a tagged VLAN member.
[PE_A-Ten-GigabitEthernet1/0/2] port hybrid vlan 15 to 40 tagged
# Assign the port to SVLANs 2001 through 2003 as an untagged VLAN member.
[PE_A-Ten-GigabitEthernet1/0/2] port hybrid vlan 2001 to 2003 untagged
# Remove the port from VLAN 1.
[PE_A-Ten-GigabitEthernet1/0/2] undo port hybrid vlan 1
# Configure one-to-two VLAN mapping to add SVLAN tag 2001 to traffic from VLANs 15 through 25.
[PE_A-Ten-GigabitEthernet1/0/2] vlan mapping nest range 15 to 25 nested-vlan 2001
# Configure one-to-two VLAN mapping to add SVLAN tag 2002 to traffic from VLANs 26 through 35.
[PE_A-Ten-GigabitEthernet1/0/2] vlan mapping nest range 26 to 35 nested-vlan 2002
# Configure one-to-two VLAN mapping to add SVLAN tag 2003 to traffic from VLANs 36 through 40.
[PE_A-Ten-GigabitEthernet1/0/2] vlan mapping nest range 36 to 40 nested-vlan 2003
# Configure the port to use the 802.1p priority in incoming packets for priority mapping.
[PE_A-Ten-GigabitEthernet1/0/2] qos trust dot1p
[PE_A-Ten-GigabitEthernet1/0/2] quit
4. Configure the service provider-side port Ten-GigabitEthernet 1/0/3:
# Configure the port as a trunk port.
[PE_A] interface ten-gigabitethernet 1/0/3
[PE_A-Ten-GigabitEthernet1/0/3] port link-type trunk
# Remove the port from VLAN 1.
[PE_A-Ten-GigabitEthernet1/0/3] undo port trunk permit vlan 1
# Assign the port to SVLANs 1001 through 1003 and SVLANs 2001 through 2003.
[PE_A-Ten-GigabitEthernet1/0/3] port trunk permit vlan 1001 to 1003 2001 to 2003
[PE_A-Ten-GigabitEthernet1/0/3] quit
Configuring PE B
1. Create CVLANs and SVLANs:
# Create CVLANs 10 to 40.
<PE_B> system-view
[PE_B] vlan 10 to 40
# Create SVLANs 1001 through 1003 and SVLANs 2001 through 2003.
[PE_B] vlan 1001 to 1003
[PE_B] vlan 2001 to 2003
2. Configure the customer-side port Ten-GigabitEthernet 1/0/1:
# Configure the port as a hybrid port.
[PE_B] interface ten-gigabitethernet 1/0/1
[PE_B-Ten-GigabitEthernet1/0/1] port link-type hybrid
# Assign the port to CVLANs 15 through 40 as a tagged VLAN member.
[PE_B-Ten-GigabitEthernet1/0/1] port hybrid vlan 15 to 40 tagged
# Assign the port to SVLANs 2001 through 2003 as an untagged VLAN member.
[PE_B-Ten-GigabitEthernet1/0/1] port hybrid vlan 2001 to 2003 untagged
# Remove the port from VLAN 1.
[PE_B-Ten-GigabitEthernet1/0/1] undo port hybrid vlan 1
# Configure one-to-two VLAN mapping to add SVLAN tag 2001 to traffic from VLANs 15 through 25.
[PE_B-Ten-GigabitEthernet1/0/1] vlan mapping nest range 15 to 25 nested-vlan 2001
# Configure one-to-two VLAN mapping to add SVLAN tag 2002 to traffic from VLANs 26 through 35.
[PE_B-Ten-GigabitEthernet1/0/1] vlan mapping nest range 26 to 35 nested-vlan 2002
# Configure one-to-two VLAN mapping to add SVLAN tag 2003 to traffic from VLANs 36 through 40.
[PE_B-Ten-GigabitEthernet1/0/1] vlan mapping nest range 36 to 40 nested-vlan 2003
# Configure the port to use the 802.1p priority in incoming packets for priority mapping.
[PE_B-Ten-GigabitEthernet1/0/1] qos trust dot1p
[PE_B-Ten-GigabitEthernet1/0/1] quit
3. Configure the customer-side port Ten-GigabitEthernet 1/0/2:
# Configure the port as a hybrid port.
[PE_B] interface ten-gigabitethernet 1/0/2
[PE_B-Ten-GigabitEthernet1/0/2] port link-type hybrid
# Assign the port to CVLANs 10 through 40 as a tagged VLAN member.
[PE_B-Ten-GigabitEthernet1/0/2] port hybrid vlan 10 to 40 tagged
# Assign the port to SVLANs 1001 through 1003 as an untagged VLAN member.
[PE_B-Ten-GigabitEthernet1/0/2] port hybrid vlan 1001 to 1003 untagged
# Remove the port from VLAN 1.
[PE_B-Ten-GigabitEthernet1/0/2] undo port hybrid vlan 1
# Configure one-to-two VLAN mapping to add SVLAN tag 1001 to traffic from VLANs 10 through 20.
[PE_B-Ten-GigabitEthernet1/0/2] vlan mapping nest range 10 to 20 nested-vlan 1001
# Configure one-to-two VLAN mapping to add SVLAN tag 1002 to traffic from VLANs 21 through 30.
[PE_B-Ten-GigabitEthernet1/0/2] vlan mapping nest range 21 to 30 nested-vlan 1002
# Configure one-to-two VLAN mapping to add SVLAN tag 1003 to traffic from VLANs 31 through 40.
[PE_B-Ten-GigabitEthernet1/0/2] vlan mapping nest range 31 to 40 nested-vlan 1003
# Configure the port to use the 802.1p priority in incoming packets for priority mapping.
[PE_B-Ten-GigabitEthernet1/0/2] qos trust dot1p
[PE_B-Ten-GigabitEthernet1/0/2] quit
4. Configure the service provider-side port Ten-GigabitEthernet 1/0/3:
# Configure the port as a trunk port.
[PE_B] interface ten-gigabitethernet 1/0/3
[PE_B-Ten-GigabitEthernet1/0/3] port link-type trunk
# Remove the port from VLAN 1.
[PE_B-Ten-GigabitEthernet1/0/3] undo port trunk permit vlan 1
# Assign the port to SVLANs 1001 through 1003 and SVLANs 2001 through 2003.
[PE_B-Ten-GigabitEthernet1/0/3] port trunk permit vlan 1001 to 1003 2001 to 2003
[PE_B-Ten-GigabitEthernet1/0/3] quit
Configuring devices between PE A and PE B
# Set the MTU to a minimum of 1504 bytes for each port on the path of double-tagged packets. (Details not shown.)
# Configure all ports on the forwarding path to allow packets from VLANs 1001 through 1003 and VLANs 2001 through 2003 to pass through without removing the SVLAN tag. (Details not shown.)
Verifying the configuration
1. Verify VLAN mapping information:
# Verify VLAN mapping information on PE A.
[PE_A] display vlan mapping
Interface Ten-GigabitEthernet1/0/1:
Outer VLAN Inner VLAN Translated Outer VLAN Translated Inner VLAN
10-20 N/A 1001 10-20
21-30 N/A 1002 21-30
31-40 N/A 1003 31-40
Interface Ten-GigabitEthernet1/0/2:
Outer VLAN Inner VLAN Translated Outer VLAN Translated Inner VLAN
15-25 N/A 2001 15-25
26-35 N/A 2002 26-35
36-40 N/A 2003 36-40
# Verify VLAN mapping information on PE B.
[PE_B] display vlan mapping
Interface Ten-GigabitEthernet1/0/1:
Outer VLAN Inner VLAN Translated Outer VLAN Translated Inner VLAN
15-25 N/A 2001 15-25
26-35 N/A 2002 26-35
36-40 N/A 2003 36-40
Interface Ten-GigabitEthernet1/0/2:
Outer VLAN Inner VLAN Translated Outer VLAN Translated Inner VLAN
10-20 N/A 1001 10-20
21-30 N/A 1002 21-30
31-40 N/A 1003 31-40
2. Verify that PCs of the same customer in a CVLAN can ping each other across the service provider network. (Details not shown.)
3. Verify that PCs of different customers in a CVLAN cannot communicate at Layer 2. The ARP tables on one customer's PCs do not contain entries for MAC addresses of the other customer's PCs. (Details not shown.)
Configuration files
· PE A:
#
vlan 10 to 40
#
vlan 1001 to 1003
#
vlan 2001 to 2003
#
interface Ten-GigabitEthernet1/0/1
port link-type hybrid
undo port hybrid vlan 1
port hybrid vlan 10 to 40 tagged
port hybrid vlan 1001 to 1003 untagged
vlan mapping nest range 10 to 20 nested-vlan 1001
vlan mapping nest range 21 to 30 nested-vlan 1002
vlan mapping nest range 31 to 40 nested-vlan 1003
qos trust dot1p
#
interface Ten-GigabitEthernet1/0/2
port link-type hybrid
undo port hybrid vlan 1
port hybrid vlan 15 to 40 tagged
port hybrid vlan 2001 to 2003 untagged
vlan mapping nest range 15 to 25 nested-vlan 2001
vlan mapping nest range 26 to 35 nested-vlan 2002
vlan mapping nest range 36 to 40 nested-vlan 2003
qos trust dot1p
#
interface Ten-GigabitEthernet1/0/3
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 1001 to 1003 2001 to 2003
#
· PE B:
#
vlan 10 to 40
#
vlan 1001 to 1003
#
vlan 2001 to 2003
#
interface Ten-GigabitEthernet1/0/1
port link-type hybrid
undo port hybrid vlan 1
port hybrid vlan 15 to 40 tagged
port hybrid vlan 2001 to 2003 untagged
vlan mapping nest range 15 to 25 nested-vlan 2001
vlan mapping nest range 26 to 35 nested-vlan 2002
vlan mapping nest range 36 to 40 nested-vlan 2003
qos trust dot1p
#
interface Ten-GigabitEthernet1/0/2
port link-type hybrid
undo port hybrid vlan 1
port hybrid vlan 10 to 40 tagged
port hybrid vlan 1001 to 1003 untagged
vlan mapping nest range 10 to 20 nested-vlan 1001
vlan mapping nest range 21 to 30 nested-vlan 1002
vlan mapping nest range 31 to 40 nested-vlan 1003
qos trust dot1p
#
interface Ten-GigabitEthernet1/0/3
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 1001 to 1003 2001 to 2003
#
Example: Configuring two-to-two VLAN mapping
Network requirements
As shown in Figure 3:
· A company assigns its branch sites (Site 1 and Site 2) to VLAN 10, and the headquarters provides services in VLAN 30.
· Service provider A uses SVLAN 100 to transmit VLAN 10 traffic for the branch sites.
· Service provider B uses SVLAN 200 to transmit VLAN 30 traffic for the headquarters.
Configure two-to-two VLAN mapping to permit the two branch sites to access VLAN 30 of the headquarters without changing their VLAN assignment.
Software version used
This configuration example was created and verified on S10500-CMW710-R7150.
Configuration restrictions and guidelines
Configure two-to-two VLAN mapping on one of the edge devices between the two service provider networks. This example uses Switch C.
Configuration procedures
Configuring Switch A
# Create SVLAN 100.
<SwitchA> system-view
[SwitchA] vlan 100
[SwitchA-vlan100] quit
# Assign Ten-GigabitEthernet 1/0/1 to VLAN 100.
[SwitchA] interface ten-gigabitethernet 1/0/1
[SwitchA-Ten-GigabitEthernet1/0/1] port access vlan 100
# Configure QinQ on Ten-GigabitEthernet 1/0/1.
[SwitchA-Ten-GigabitEthernet1/0/1] qinq enable
[SwitchA-Ten-GigabitEthernet1/0/1] quit
# Configure the network-side port Ten-GigabitEthernet 1/0/2 as a trunk port.
[SwitchA] interface ten-gigabitethernet 1/0/2
[SwitchA-Ten-GigabitEthernet1/0/2] port link-type trunk
# Assign Ten-GigabitEthernet 1/0/2 to VLAN 100.
[SwitchA-Ten-GigabitEthernet1/0/2] port trunk permit vlan 100
# Remove Ten-GigabitEthernet 1/0/2 from VLAN 1.
[SwitchA-Ten-GigabitEthernet1/0/2] undo port trunk permit vlan 1
[SwitchA-Ten-GigabitEthernet1/0/2] quit
Configuring Switch B
# Create SVLAN 100.
<SwitchB> system-view
[SwitchB] vlan 100
[SwitchB-vlan100] quit
# Assign Ten-GigabitEthernet 1/0/3 to VLAN 100.
[SwitchB] interface ten-gigabitethernet 1/0/3
[SwitchB-Ten-GigabitEthernet1/0/3] port access vlan 100
# Configure QinQ on Ten-GigabitEthernet 1/0/3.
[SwitchB-Ten-GigabitEthernet1/0/3] qinq enable
[SwitchB-Ten-GigabitEthernet1/0/3] quit
# Configure Ten-GigabitEthernet 1/0/1 as a trunk port.
[SwitchB] interface ten-gigabitethernet 1/0/1
[SwitchB-Ten-GigabitEthernet1/0/1] port link-type trunk
# Assign Ten-GigabitEthernet 1/0/1 to VLAN 100.
[SwitchB-Ten-GigabitEthernet1/0/1] port trunk permit vlan 100
# Remove Ten-GigabitEthernet 1/0/1 from VLAN 1.
[SwitchB-Ten-GigabitEthernet1/0/1] undo port trunk permit vlan 1
[SwitchB-Ten-GigabitEthernet1/0/1] quit
# Configure Ten-GigabitEthernet 1/0/2 as a trunk port.
[SwitchB] interface ten-gigabitethernet 1/0/2
[SwitchB-Ten-GigabitEthernet1/0/2] port link-type trunk
# Assign Ten-GigabitEthernet 1/0/2 to VLAN 100.
[SwitchB-Ten-GigabitEthernet1/0/2] port trunk permit vlan 100
# Remove Ten-GigabitEthernet 1/0/2 from VLAN 1.
[SwitchB-Ten-GigabitEthernet1/0/2] undo port trunk permit vlan 1
[SwitchB-Ten-GigabitEthernet1/0/2] quit
Configuring Switch C
# Create SVLANs 100 and 200.
<SwitchC> system-view
[SwitchC] vlan 100
[SwitchC-vlan100] quit
[SwitchC] vlan 200
[SwitchC-vlan200] quit
# Configure Ten-GigabitEthernet 1/0/1 as a trunk port.
[SwitchC] interface ten-gigabitethernet 1/0/1
[SwitchC-Ten-GigabitEthernet1/0/1] port link-type trunk
# Assign Ten-GigabitEthernet 1/0/1 to VLANs 100 to 200.
[SwitchC-Ten-GigabitEthernet1/0/1] port trunk permit vlan 100 200
# Remove Ten-GigabitEthernet 1/0/1 from VLAN 1.
[SwitchC-Ten-GigabitEthernet1/0/1] undo port trunk permit vlan 1
# Configure two-to-two VLAN mapping on Ten-GigabitEthernet 1/0/1 to map SVLAN 100 and CVLAN 10 to SVLAN 200 and CVLAN 30.
[SwitchC-Ten-GigabitEthernet1/0/1] vlan mapping tunnel 100 10 translated-vlan 200 30
[SwitchC-Ten-GigabitEthernet1/0/1] quit
# Configure Ten-GigabitEthernet 1/0/2 as a trunk port.
[SwitchC] interface ten-gigabitethernet 1/0/2
[SwitchC-Ten-GigabitEthernet1/0/2] port link-type trunk
# Assign Ten-GigabitEthernet 1/0/2 to VLAN 200.
[SwitchC-Ten-GigabitEthernet1/0/2] port trunk permit vlan 200
# Remove Ten-GigabitEthernet 1/0/2 from VLAN 1.
[SwitchC-Ten-GigabitEthernet1/0/2] undo port trunk permit vlan 1
[SwitchC-Ten-GigabitEthernet1/0/2] quit
Configuring Switch D
# Create SVLAN 200.
<SwitchD> system-view
[SwitchD] vlan 200
[SwitchD-vlan200] quit
# Assign Ten-GigabitEthernet 1/0/2 to VLAN 200.
[SwitchD] interface ten-gigabitethernet 1/0/2
[SwitchD-Ten-GigabitEthernet1/0/2] port access vlan 200
# Configure QinQ on Ten-GigabitEthernet 1/0/2.
[SwitchD-Ten-GigabitEthernet1/0/2] qinq enable
[SwitchD-Ten-GigabitEthernet1/0/2] quit
# Configure Ten-GigabitEthernet 1/0/1 as a trunk port.
[SwitchD] interface ten-gigabitethernet 1/0/1
[SwitchD-Ten-GigabitEthernet1/0/1] port link-type trunk
# Assign Ten-GigabitEthernet 1/0/1 to VLAN 200.
[SwitchD-Ten-GigabitEthernet1/0/1] port trunk permit vlan 200
# Remove Ten-GigabitEthernet 1/0/1 from VLAN 1.
[SwitchD-Ten-GigabitEthernet1/0/1] undo port trunk permit vlan 1
[SwitchD-Ten-GigabitEthernet1/0/1] quit
Verifying the configuration
# Verify VLAN mapping information on Switch C.
[SwitchC] display vlan mapping
Interface Ten-GigabitEthernet1/0/1:
Outer VLAN Inner VLAN Translated Outer VLAN Translated Inner VLAN
100 10 200 30
Configuration files
· Switch A:
#
vlan 100
#
interface Ten-GigabitEthernet1/0/1
port access vlan 100
qinq enable
#
interface Ten-GigabitEthernet1/0/2
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 100
· Switch B:
#
vlan 100
#
interface Ten-GigabitEthernet1/0/1
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 100
qinq enable
#
interface Ten-GigabitEthernet1/0/2
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 100
#
interface Ten-GigabitEthernet1/0/3
port access vlan 100
qinq enable
#
vlan 100
#
vlan 200
#
interface Ten-GigabitEthernet1/0/1
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 100 200
vlan mapping tunnel 100 10 translated-vlan 200 30
#
interface Ten-GigabitEthernet1/0/2
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 200
#
· Switch D:
#
vlan 200
#
interface Ten-GigabitEthernet1/0/1
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 200
#
interface Ten-GigabitEthernet1/0/2
port access vlan 200
qinq enable
#
Related documentation
· H3C S10500 Switch Series Layer 2—LAN Switching Configuration Guide-Release 7150
· H3C S10500 Switch Series Layer 2—LAN Switching Command Reference-Release 7150