3.9. Configuring VLAN Mapping

Overview

Function Introduction

Service-provider business customers often have specific requirements for VLAN IDs and the number of VLANs to be supported. The VLAN required by different customers in the same service-provider network might overlap, and traffic of customers through the infrastructure might be mixed. Assigning different VIDs to each customer to mapping their own’s would bring the traffic from different customers separate. Using the VLAN translation feature, service providers can use a series of VLANs to support customers who have their own VLANs. Customer VLAN IDs are translated, and traffic from different customers is segregated within the service-provider infrastructure, even when they appear to be on the same VLAN.

802.1Q tunneling expands VLAN space by using a VLAN-in-VLAN hierarchy and tagging the tagged packets, and the maximal VLAN number can reach 4096 × 4096 . Using the 802.1Q tunneling feature, service providers can use a single VLAN to support clients which have multiple VLANs. The ISP usually builds a VLAN model to monitor whole VLAN of backbone network by using GARP or GVRP and accelerate network convergence speed by using STP. Using 802.1Q tunneling as initial solution is right at first, but it can cause expansibility problem as clients increased. Some clients hope to bring their own VLAN ID which will face two problems. Firstly, the first client’s VLAN tag may clash with the other clients. Secondly, the usable tags may be severely limited for the service-provider. The core network will have limits on the 4096 numbers VLAN, if the clients are permitted to use their respective VLAN ID by their own manner.

image

Using 802.1Q tunneling, the client’s VLAN tag is encapsulated in the public VLAN tag and packets with two tags will traverse on backbone network. The client’s VLAN tag will be shield and only the public VLAN tag will be used to transmit. By separating data stream, the client’s VLAN tag is transmitted transparently and different VLAN tags can be used repeatedly. Therefore, using 802.1Q tunneling expands the available VLAN tags. Two types of 802.1q tunneling are supported: basic 802.1Q tunneling and selective 802.1Q tunneling. Basic 802.1Q tunneling is founded on tagging on ports and all dates will be encapsulated a common VLAN tag of the same port, so this type has great limitations in practical applications. While selective 802.1Q tunneling can separate data stream and encapsulate different VLAN tags base on different data.

Principle Description

N/A

Configuration

Configuring VLAN Translation

image

Fig. 3.11 VLAN mapping

step 1 Enter the configure mode

Switch# configure terminal

step 2 Enter the vlan configure mode and create vlan

Switch(config)# vlan database
Switch(config-vlan)# vlan 2,3
Switch(config-vlan)# exit

step 3 Create evc and set dot1q mapped vlan

Switch(config)# ethernet evc evc_c1
Switch(config-evc)# dot1q mapped-vlan 2
Switch(config)# ethernet evc evc_c2
Switch(config-evc)# dot1q mapped-vlan 3

step 4 Create vlan mapping table and bind the vlan and evc

Switch(config)# vlan mapping table vm
Switch(config-vlan-mapping)# raw-vlan 10 evc evc_c1
Switch(config-vlan-mapping)# raw-vlan 20 evc evc_c2
Switch(config-vlan-mapping)# exit

step 5 Enable vlan translation on the interface and apply the vlan mapping table

Switch(config)# interface eth-0-1
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk vlan-translation
Switch(config-if)# switchport trunk vlan-translation mapping table vm
Switch(config-if)# switchport trunk allowed vlan add 2,3
Switch(config-if)# interface eth-0-2
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan add 2,3
Switch(config-if)# exit

step 6 Exit the configure mode

Switch(config)# end

step 7 Validation

Use the following command to display the information of the switch port interface:

Switch# show interface switchport interface eth-0-1
Interface name : eth-0-1
Switchport mode : trunk
VLAN traslation : enable
VLAN mapping table : vm
Ingress filter : enable
Acceptable frame types : all
Default Vlan : 1
Configured Vlans : 1 2 3

Use the following command to display the information of the vlan mapping table

Switch# show vlan mapping table
Table Name EVC Name Mapped VLAN Raw VLAN
=========================================
vm evc_c1 2 10 evc_c2 3 20

Configuring 802.1q Tunneling (Basic 802.1Q tunneling)

image

Fig. 3.12 QinQ Tunnel

step 1 Enter the configure mode

Switch# configure terminal

step 2 Enter the interface configure mode, set the switch port mode

Switch(config)# interface eth-0-1
Switch(config-if)# no shutdown
Switch(config-if)# switchport mode dot1q-tunnel

step 3 Exit the configure mode

Switch(config-if)# end

step 4 Validation

This example shows how to configure a switchport to basic dot1q-tunnel port. You can use show the configuration on the switchport:

Switch# show interface switchport interface eth-0-1
Interface name : eth-0-1
Switchport mode : dot1q-tunnel(basic)
Ingress filter : enable
Acceptable frame types : all
Default Vlan : 1
Configured Vlans : 1

Configuring 802.1q Tunneling (Selective 802.1Q tunneling, Add one tag for incoming untagged packet)

image

Fig. 3.13 QinQ Tunnel

step 1 Enter the configure mode

Switch# configure terminal

step 2 Enter the vlan configure mode and create vlan

Switch(config)# vlan database
Switch(config-vlan)# vlan 2,3,20,30
Switch(config-vlan)# exit

step 3 Create evc and set dot1q mapped vlan

Switch(config)# ethernet evc evc_c1
Switch(config-evc)# dot1q mapped-vlan 2
Switch(config)# ethernet evc evc_c2
Switch(config-evc)# dot1q mapped-vlan 3
Switch(config)# ethernet evc evc_c3
Switch(config-evc)# dot1q mapped-vlan 20
Switch(config)# ethernet evc evc_c4
Switch(config-evc)# dot1q mapped-vlan 30
Switch(config-evc)# exit

step 4 Create vlan mapping table and bind the vlan and evc

Switch(config)# vlan mapping table vm
Switch(config-vlan-mapping)# raw-vlan 10 evc evc_c1
Switch(config-vlan-mapping)# raw-vlan 30-40 evc evc_c2
Switch(config-vlan-mapping)# raw-vlan untagged evc evc_c3
Switch(config-vlan-mapping)# raw-vlan out-of-range evc evc_c4
Switch(config-vlan-mapping)# exit

step 5 Enable vlan translation on the interface and apply the vlan mapping table

eth-0-1:

Switch(config-if)# switchport mode dot1q-tunnel
Switch(config-if)# switchport dot1q-tunnel type selective
Switch(config-if)# switchport dot1q-tunnel vlan mapping table vm
Switch(config-if)# switchport dot1q-tunnel allowed vlan add 2,3,20,30

eth-0-2:

Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan add 2,3,20,30

step 6 Exit the configure mode

Switch(config-if)# end

step 7 Validation

This example shows how to configure a switchport to selective dot1q-tunnel port:

Switch# show interface switchport interface eth-0-1
Interface name : eth-0-1
Switchport mode : dot1q-tunnel(selective)
VLAN mapping table : vm
Ingress filter : enable
Acceptable frame types : all
Default Vlan : 1
Configured Vlans : 1 2 3 20 30

Use the following command to display the information of the vlan mapping table

Switch# show vlan mapping table
Table Name EVC Name Mapped VLAN Raw VLAN
=========================================
vm evc_c1 2 10
evc_c2 3 30-40
evc_c3 20 untagged
evc_c4 30 out-of-range

Configuring 802.1q Tunneling (Selective 802.1Q tunneling, Add two tags for incoming untagged packet)

image

Fig. 3.14 QinQ Tunnel

step 1 Enter the configure mode

Switch# configure terminal

step 2 Enter the vlan configure mode and create vlan

Switch(config)# vlan database
Switch(config-vlan)# vlan 2,3,10,20,30
Switch(config-vlan)# exit

step 3 Create evc and set dot1q mapped vlan

Switch(config)# ethernet evc evc_c1
Switch(config-evc)# dot1q mapped-vlan 2
Switch(config-evc)# exit
Switch(config)# ethernet evc evc_c2
Switch(config-evc)# dot1q mapped-vlan 3
Switch(config-evc)# exit
Switch(config)# ethernet evc evc_c3
Switch(config-evc)# dot1q mapped-double-vlan 10 20
Switch(config-evc)# exit
Switch(config)# ethernet evc evc_c4
Switch(config-evc)# dot1q mapped-vlan 30
Switch(config-evc)# exit

step 4 Create vlan mapping table and bind the vlan and evc

Switch(config)# vlan mapping table vm
Switch(config-vlan-mapping)# raw-vlan 10 evc evc_c1
Switch(config-vlan-mapping)# raw-vlan 30-40 evc evc_c2
Switch(config-vlan-mapping)# raw-vlan untagged evc evc_c3
Switch(config-vlan-mapping)# raw-vlan out-of-range evc evc_c4
Switch(config-vlan-mapping)# raw-vlan 10 20 egress-vlan untag
Switch(config-vlan-mapping)# exit

step 5 Enable vlan translation on the interface and apply the vlan mapping table

eth-0-1:

Switch(config)# interface eth-0-1
Switch(config-if)# switchport mode dot1q-tunnel
Switch(config-if)# switchport dot1q-tunnel type selective
Switch(config-if)# switchport dot1q-tunnel vlan mapping table vm
Switch(config-if)# switchport dot1q-tunnel native inner-vlan 10
Switch(config-if)# switchport dot1q-tunnel allowed vlan add 2,3,20,30
Switch(config-if)# exit

eth-0-2:

Switch(config)# interface eth-0-2
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan add 2,3,20,30
Switch(config-if)# exit

step 6 Exit the configure mode

Switch(config)# end

step 7 Validation

This example shows how to configure a switchport to selective dot1q-tunnel port:

Switch# show interface switchport interface eth-0-1
Interface name : eth-0-1
Switchport mode : dot1q-tunnel(selective)
VLAN mapping table : vm
Ingress filter : enable
Acceptable frame types : all
Default Vlan : 10
Configured Vlans : 1 2 3 20 30

Use the following command to display the information of the vlan mapping table:

Table Name EVC Name Mapped VLAN Raw VLAN
=========================================
vm evc_c1 2 10
evc_c2 3 30-40
evc_c3 20(10) untagged
evc_c4 30 out-of-range

Application cases

N/A