- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
02-S12500_VLAN_Termination_Configuration_Examples | 174.63 KB |
Contents
Example: Configuring ambiguous QinQ termination for a traditional solution
Configuration restrictions and guidelines
Example: Configuring ambiguous QinQ termination for a lite solution
Configuration restrictions and guidelines
Configuring Host A, Host B, and Host C
Introduction
This document provides VLAN termination configuration examples.
VLAN termination allows VLAN interfaces to identify and remove the VLAN information of VLAN-tagged packets, so that these packets can be forwarded at Layer 3.
VLAN termination includes the following types:
· Dot1q termination—Terminates the outermost layer of VLAN tags of received packets. By default, each VLAN interface supports Dot1q termination. You do not need to configure Dot1q termination on a VLAN interface. Packets sent out of the VLAN interface are single-tagged and tagged with the ID of that VLAN.
· QinQ termination—Terminates the outermost two layers of VLAN tags of received packets. Packets sent out of a QinQ termination interface are double-tagged. QinQ termination includes unambiguous QinQ termination and ambiguous QinQ termination. When an unambiguous QinQ termination interface sends a packet, it tags the packet with two layers of VLAN IDs, where the inner VLAN ID is the specified value. When an ambiguous QinQ termination interface sends out the packet, it tags the packet with two layers of VLAN tags, where the inner VLAN ID is one of the specified VLAN IDs.
The following QinQ termination networking solutions are available:
· Traditional solution—Configure QinQ on the distribution layer devices and configure QinQ termination on core layer devices.
· Lite solution—Configure both QinQ and QinQ termination on core layer devices, and you do not need to configure the distribution layer devices.
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 VLAN termination.
Example: Configuring ambiguous QinQ termination for a traditional solution
Network requirements
As shown in Figure 1:
· The CVLANs for users in site A are VLANs 10 through 70, and the CVLANs for users in site B are VLANs 30 through 90.
· Basic QinQ is enabled on the edges devices PE1 and PE2 of the public network, which add SVLAN tag 100 and SVLAN tag 200 to the uplink packets from site A and site B, respectively. The basic QinQ configuration isolates packets from site A and site B.
Configure ambiguous QinQ termination on the P device, so that the users in site A and site B can communicate with the Internet through the public network.
Software version used
This configuration example was created and verified on the S12500-CMW520-R1825P01 version.
Configuration restrictions and guidelines
When you configure ambiguous QinQ termination for a traditional solution, follow these restrictions and guidelines:
· A VLAN interface can receive only the packets whose outermost layer VLAN ID is the same as the VLAN interface number.
· When the QinQ termination configuration changes on a VLAN interface, you must use the reset arp interface command in user view to change the ARP entries of the Layer 2 physical interface bound to the VLAN interface.
Configuration procedures
Configuring the hosts
Configure the gateway address of Host A as 1.1.1.11/24, and configure the gateway address of Host B as 1.1.2.11/24. (Details not shown.)
Configuring CE1 and CE2
Configure CE1 of site A as follows: (Details not shown.)
1. Create CVLANs for site A.
2. Assign the ports connecting to user terminals to these CVLANs.
3. Configure the port connecting to PE1 as a trunk port, and assign the port to all CVLANs for site A.
Configure CE2 of site B as follows: (Details not shown.)
1. Create CVLANs for site B.
2. Assign the ports connecting to user terminals to these CVLANs.
3. Configure the port connecting to PE2 as a trunk port, and assign the port to all CVLANs for site B.
Configuring PE 1
Configuring the customer-side port GigabitEthernet 3/0/1
# Configure GigabitEthernet 3/0/1 as a trunk port.
<PE1> system-view
[PE1] vlan 100
[PE1-vlan100] quit
[PE1] interface GigabitEthernet3/0/1
[PE1-GigabitEthernet3/0/1] undo shutdown
# Remove the port from VLAN 1, and assign the port to VLAN 100.
[PE1-GigabitEthernet3/0/1] port link-type trunk
[PE1-GigabitEthernet3/0/1] undo port trunk permit vlan 1
[PE1-GigabitEthernet3/0/1] port trunk permit vlan 100
# Configure VLAN 100 as the PVID of GigabitEthernet 3/0/1.
[PE1-GigabitEthernet3/0/1] port trunk pvid vlan 100
# Enable basic QinQ on the port to add outer VLAN tag 100 to the received packets.
[PE1-GigabitEthernet3/0/1] qinq enable
[PE1-GigabitEthernet3/0/1] quit
Configuring the network-side port GigabitEthernet 3/0/2
# Configure GigabitEthernet 3/0/2 as a trunk port.
[PE1] interface GigabitEthernet3/0/2
[PE1-GigabitEthernet3/0/2] undo shutdown
[PE1-GigabitEthernet3/0/2] port link-type trunk
# Assign the port to VLAN 100.
[PE1-GigabitEthernet3/0/2] port trunk permit vlan 100
Configuring PE 2
Configuring the customer-side port GigabitEthernet 3/0/1
# Create VLAN 200.
<PE2> system-view
[PE2] vlan 200
[PE2-vlan200] quit
# Configure GigabitEthernet 3/0/1 as a trunk port.
[PE2] interface GigabitEthernet3/0/1
[PE2-GigabitEthernet3/0/1] undo shutdown
[PE2-GigabitEthernet3/0/1] port link-type trunk
# Remove the port from VLAN 1, and assign the port to VLAN 200.
[PE2-GigabitEthernet3/0/1] undo port trunk permit vlan 1
[PE2-GigabitEthernet3/0/1] port trunk permit vlan 200
# Configure VLAN 200 as the PVID of GigabitEthernet 3/0/1.
[PE2-GigabitEthernet3/0/1] port trunk pvid vlan 200
# Enable basic QinQ on the port to add outer VLAN tag 200 to the received packets.
[PE2-GigabitEthernet3/0/1] qinq enable
[PE2-GigabitEthernet3/0/1] quit
Configuring the network-side port GigabitEthernet 3/0/2
# Configure GigabitEthernet 3/0/2 as a trunk port.
[PE2] interface GigabitEthernet3/0/2
[PE2-GigabitEthernet3/0/2] undo shutdown
[PE2-GigabitEthernet3/0/2] port link-type trunk
# Assign the port to VLAN 200.
[PE2-GigabitEthernet3/0/2] port trunk permit vlan 200
Configuring the P device
Configuring QinQ termination
# Create VLAN-interface 100, and assign an IP address to the interface.
<P>system-view
[P]vlan 100
[P-vlan100]quit
[P]interface vlan-interface 100
[P-Vlan-interface100]undo shutdown
[P-Vlan-interface100]ip address 1.1.1.11 24
# Configure QinQ termination on VLAN interface 100 to terminate packets with the inner VLAN tags 10 through 70.
[P-Vlan-interface100]second-dot1q 10 to 70
[P-Vlan-interface100]quit
# Create VLAN-interface 200, and assign an IP address to the interface.
[P]vlan 200
[P-vlan200]quit
[P]interface vlan-interface 200
[P-Vlan-interface200]undo shutdown
[P-Vlan-interface200]ip address 1.1.2.11 24
# Configure QinQ termination on VLAN interface 200 to terminate packets with the inner VLAN tags 30 through 90.
[P-Vlan-interface200]second-dot1q 30 to 90
[P-Vlan-interface200]quit
Configuring the network-side ports
# Configure the network-side ports GigabitEthernet 3/0/1 and GigabitEthernet 3/0/2 as trunk ports.
[P] interface range GigabitEthernet 3/0/1 to GigabitEthernet 3/0/2
[P-if-range] undo shutdown
[P-if-range] port link-type trunk
# Assign them to the SVLANs 100 and 200.
[P-if-range] port trunk permit vlan 100 200
[P-if-range] quit
Configuring the Internet-side port
# Assign the Internet-side port GigabitEthernet 3/0/3 to VLAN 3.
[P] vlan 3
[P-vlan3] port GigabitEthernet 3/0/3
[P-vlan3] quit
[P] interface GigabitEthernet3/0/3
[P-GigabitEthernet3/0/3] undo shutdown
[P-GigabitEthernet3/0/3] quit
# Create VLAN interface 3, and assign an IP address to VLAN interface 3.
[P] interface vlan-interface 3
[P-Vlan-interface3] undo shutdown
[P-Vlan-interface3] ip address 1.1.3.11 24
[P-Vlan-interface3] quit
Verifying the configuration
Users in site A and site B can communicate with the Internet.
Configuration files
· PE1:
#
vlan 100
#
interface GigabitEthernet3/0/1
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 100
port trunk pvid vlan 100
qinq enable
#
interface GigabitEthernet3/0/2
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 100
#
· PE2:
#
vlan 200
#
interface GigabitEthernet3/0/1
port link-mode bridge
port link-type trunk
undo port trunk permit vlan 1
port trunk permit vlan 200
port trunk pvid vlan 200
qinq enable
#
interface GigabitEthernet3/0/2
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 200
#
· P:
#
vlan 3
#
vlan 100
#
vlan 200
#
interface Vlan-interface3
ip address 1.1.3.11 255.255.255.0
#
interface Vlan-interface100
second-dot1q 10 to 70
ip address 1.1.1.11 255.255.255.0
#
interface Vlan-interface200
second-dot1q 30 to 90
ip address 1.1.2.11 255.255.255.0
#
interface GigabitEthernet3/0/1
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 100 200
#
interface GigabitEthernet3/0/2
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 100 200
#
interface GigabitEthernet3/0/3
port link-mode bridge
port access vlan 3
#
Example: Configuring ambiguous QinQ termination for a lite solution
Network requirements
As shown in Figure 2:
· Host A, Host B, and Host C are connected to L2 Switch A, and they belong to VLAN 11, VLAN 12, and VLAN 13, respectively. The server group is connected to L2 Switch C, which supports only single-tagged packets.
· QinQ is enabled on the port GigabitEthernet 3/0/10 that connects L3 Switch B to the customer sides, so that the port can add outer VLAN tag 100 before forwarding packets.
Configure ambiguous QinQ termination on L3 Switch B so that Host A, Host B, and Host C can communicate with the server group.
Software version used
This configuration example was created and verified on the S12500-CMW520-R1825P01 version.
Configuration restrictions and guidelines
When you configure ambiguous QinQ termination for a lite solution, follow these restrictions and guidelines:
· A VLAN interface can receive only the packets whose outermost layer VLAN ID is the same as the VLAN interface number.
· When the QinQ termination configuration changes on a VLAN interface, you must use the reset arp interface command in user view to change the ARP entries of the Layer 2 physical interface bound to the VLAN interface.
· When you configure QinQ termination for a lite solution, make sure the inner VLAN ID range does not conflict with the VLAN interface number. For example, on VLAN-interface 100, the vlan-list argument cannot include 100 and do not specify the any keyword in the second-dot1q { vlan-list | any } command.
Configuration procedures
Configuring Host A, Host B, and Host C
Configuring L2 Switch A
# Assign port GigabitEthernet 3/0/1 to VLAN 11.
<L2 Switch A>system-view
System View: return to User View with Ctrl+Z.
[L2 Switch A]vlan 11
[L2 Switch A-vlan11]port GigabitEthernet 3/0/1
[L2 Switch A-vlan11]quit
[L2 Switch A]interface GigabitEthernet 3/0/1
[L2 Switch A-GigabitEthernet3/0/1]undo shutdown
[L2 Switch A-GigabitEthernet3/0/1]quit
# Assign port GigabitEthernet 3/0/2 to VLAN 12.
[L2 Switch A]vlan 12
[L2 Switch A-vlan12]port GigabitEthernet 3/0/2
[L2 Switch A-vlan12]quit
[L2 Switch A]interface GigabitEthernet 3/0/2
[L2 Switch A-GigabitEthernet3/0/2]undo shutdown
[L2 Switch A-GigabitEthernet3/0/2]quit
# Assign port GigabitEthernet 3/0/3 to VLAN 13.
[L2 Switch A]vlan 13
[L2 Switch A-vlan13]port GigabitEthernet 3/0/3
[L2 Switch A-vlan13]quit
[L2 Switch A]interface GigabitEthernet 3/0/3
[L2 Switch A-GigabitEthernet3/0/3]undo shutdown
[L2 Switch A-GigabitEthernet3/0/3]quit
# Configure GigabitEthernet 3/0/10 as a trunk port.
[L2 Switch A]interface GigabitEthernet 3/0/10
[L2 Switch A-GigabitEthernet3/0/10]undo shutdown
[L2 Switch A-GigabitEthernet3/0/10]port link-type trunk
# Assign the port GigabitEthernet 3/0/10 to VLANs 11 through 13.
[L2 Switch A-GigabitEthernet3/0/10]port trunk permit vlan 11 to 13
Configuring L3 Switch B
# Assign port GigabitEthernet 3/0/10 to VLAN 100.
<L3 Switch B>system-view
System View: return to User View with Ctrl+Z.
[L3 Switch B]vlan 100
[L3 Switch B-vlan100]quit
[L3 Switch B]interface GigabitEthernet 3/0/10
[L3 Switch B-GigabitEthernet3/0/10]undo shutdown
[L3 Switch B-GigabitEthernet3/0/10]port access vlan 100
# Enable QinQ on the port GigabitEthernet 3/0/10 to tag the received packets with the PVID.
[L3 Switch B-GigabitEthernet3/0/10]qinq enable
[L3 Switch B-GigabitEthernet3/0/10]quit
# Create VLAN-interface 100, and assign an IP address to the interface.
[L3 Switch B]interface vlan-interface 100
[L3 Switch B-Vlan-interface100]undo shutdown
[L3 Switch B-Vlan-interface100]ip address 1.1.1.11 255.255.255.0
# Configure QinQ termination on VLAN-interface 100 to terminate double-tagged packets whose outermost VLAN tag is 100 and tag the packets to be sent out with inner CVLAN tag 11, 12, or 13.
[L3 Switch B-Vlan-interface100]second-dot1q 11 to 13
[L3 Switch B-Vlan-interface100]quit
# Assign port GigabitEthernet 3/0/1 to VLAN 2.
[L3 Switch B]vlan 2
[L3 Switch B-vlan2]port GigabitEthernet 3/0/1
[L3 Switch B-vlan2]quit
[L3 Switch B]interface GigabitEthernet 3/0/1
[L3 Switch B-GigabitEthernet3/0/1]undo shutdown
[L3 Switch B-GigabitEthernet3/0/1] quit
# Configure VLAN-interface 2, and assign an IP address to the interface.
[L3 Switch B]interface vlan-interface 2
[L3 Switch B-Vlan-interface2]undo shutdown
[L3 Switch B-Vlan-interface2]ip address 1.1.2.11 255.255.255.0
[L3 Switch B-Vlan-interface2]quit
Configuring L2 Switch C
Use the factory default settings for L2 Switch C.
Configuring the server group
Assign each server in the server group an IP address on the network segment 1.1.2.0/24 and configure the gateway IP address as 1.1.2.11/24.
Verifying the configuration
The Server Group and each of Host A, Host B, and Host C can ping each other.
Configuration files
· L2 Switch A:
#
sysname L2 Switch A
#
vlan 11 to 13
#
interface GigabitEthernet3/0/1
port link-mode bridge
port access vlan 11
#
interface GigabitEthernet3/0/2
port link-mode bridge
port access vlan 12
#
interface GigabitEthernet3/0/3
port link-mode bridge
port access vlan 13
#
interface GigabitEthernet3/0/10
port link-mode bridge
port link-type trunk
port trunk permit vlan 1 11 to 13
#
· L3 Switch B:
#
sysname L3 Switch B
#
vlan 2
#
vlan 100
#
interface Vlan-interface2
ip address 1.1.2.11 255.255.255.0
#
interface Vlan-interface100
second-dot1q 11 to 13
ip address 1.1.1.11 255.255.255.0
#
interface GigabitEthernet3/0/1
port link-mode bridge
port access vlan 2
#
interface GigabitEthernet3/0/10
port link-mode bridge
port access vlan 100
qinq enable
#
Related documentation
· H3C S12500 Routing Switch Series Layer 2—LAN Switching Configuration Guide
· H3C S12500 Routing Switch Series Layer 2—LAN Switching Command Reference