Got it

Understanding of VLAN - VLAN Mapping

Latest reply: Jun 11, 2021 06:22:26 305 29 18 0 2

OBJECTIVE


The purpose of this post is to present an introduction to VLAN Mapping.


Principles


VLAN effectively controls the scale of broadcast domains and isolates users. Some low-end switches do not support VLAN IDs ranging from 1 to 4094. They support a limited range such as 1 to 512. Some VLAN IDs are reserved and unavailable to users, and customer VLAN (C-VLAN) IDs conflict with S-VLAN IDs. VLAN mapping is used to resolve this problem.


VLAN mapping, also called VLAN translation, implements the mapping between C-VLAN tags and S-VLAN tags by replacing the inner and outer VLAN tags of packets. VLAN mapping allows services to be transmitted based on the provider's network plan.


VLAN mapping takes effect after outbound interfaces on a switch forward the packets received by inbound interfaces. The switch maintains a VLAN mapping table.


After receiving a packet, the switch processes it based on tags:


  • After receiving a tagged packet, the switch determines whether a single tag, double tags, or the outer tag is to be replaced based on the VLAN mapping mode. Then the switch learns the MAC addresses contained in the packet. Based on the source MAC address and mapped VLAN ID, the switch updates the MAC address entries in the VLAN mapping table. Based on the destination MAC address and the mapped VLAN ID, the switch searches for the MAC address entries. If the destination MAC address matches no entry, the switch broadcasts the packet in the specified VLAN; if the destination MAC address matches an entry, the switch forwards the packet through the corresponding outbound interface.


  • If the packet has no tag, the switch determines whether to add a VLAN tag to the packet based on the VLAN creation mode. If the packet cannot be added to a VLAN, the switch delivers the packet to the CPU or discards it. If the packet can be added to a VLAN, the switch adds a VLAN tag to it and learns the MAC addresses. Then the switch performs Layer 2 forwarding based on the destination MAC address.


As shown in Figure 1, VLAN mapping between VLAN 2 and VLAN 3 is configured on PORT 1. Before sending packets from VLAN 2 to VLAN 3, PORT 1 replaces the VLAN tags with VLAN 3tags. When receiving packets from VLAN 3 to VLAN 2, PORT 1 replaces the VLAN tags with VLAN 2 tags. This implements the communication between devices in VLAN 2 and VLAN 3.


15

Figure 5 - VLAN mapping


If devices in two VLANs need to communicate based on VLAN mapping, the IP addresses of these devices must be on the same network segment. If their IP addresses are on different network segments, communication between these devices must be implemented using Layer 3 routes, which makes VLAN mapping invalid.


VLAN Mapping Mode


Currently, devices support the following VLAN mapping modes:


  • 1 to 1 VLAN mapping


When the primary interface on a device configured with VLAN mapping receives a single-tagged packet, the interface maps the VLAN tag in the packet to an S-VLAN tag.


  • N to 1 VLAN mapping


The primary interface maps a VLAN tag at multiple user sides to an S-VLAN tag.


  • 2 to 1 VLAN mapping


When the primary interface on a device configured with VLAN mapping receives a double-tagged packet, the interface maps the outer VLAN tag in the packet to an S-VLAN tag and transparently transmits the inner VLAN tag.


  • 2 to 2 VLAN mapping


When the primary interface on a device configured with VLAN mapping receives a double-tagged packet, the interface maps the double VLAN tags in the packet to the double S-VLAN tags.


Application


  • 1 to 1 VLAN mapping


When receiving a single-tagged packet, the primary interface maps the VLAN tag to aspecified single VLAN tag.

1 to 1 VLAN mapping applies to the network shown in Figure 2.

16

Figure 2 - 1 to 1 VLAN mapping


In the networking diagram shown in Figure 2, services (HSI, IPTV, and VoIP) of each user are transmitted on different VLANs. Same services are transmitted on the same C-VLAN. To differentiate users, deploy Corridor Switch to allow the same services used by different users to be transmitted on different VLANs, which implements 1 to 1 VLAN mapping. 1 to 1 VLAN mapping requires a large number of VLANs to isolate services of different users; however, the VLAN quantity provided by the network access device at the aggregation layer is limited. To resolve this problem, configure the VLAN aggregation function to allow the same services to be transmitted on the same VLAN (N to 1 VLAN mapping).


  • 2 to 1 VLAN mapping


When the primary interface receives a double-tagged packet, the interface maps the outer

VLAN tag in the packet to an S-VLAN tag and transparently transmits the inner VLAN tag.

2 to 1 VLAN mapping applies to the network shown in Figure 3.


17

Figure 3 - 2 to 1 VLAN mapping


In the networking diagram shown in Figure 3, Residential Gateway, Corridor Switch, and Community Switch are connected to the aggregation layer on the network. To differentiate users and services to facilitate network management and charging, configure the QinQ function for Corridor Switch. To save VLAN resources, configure VLAN mapping on Corridor Switch and Community Switch to transmit the same services on the same VLAN.


  • 2 to 2 VLAN mapping


2 to 2 VLAN mapping applies to the network shown in Figure 4.


18

Figure 4 - 2 to 2 VLAN mapping


In the networking diagram shown in Figure 4, QinQ is used to send double-tagged packets, which prevents the conflict between C-VLAN IDs and S-VLAN IDs and differentiates services and users. However, the primary interface will discard the packets because C-VLAN IDs are different from S-VLAN IDs. To ensure communication continuity, configure2 to 2 VLAN mapping on the PE and replace double C-VLAN tags with double S-VLAN tags.



--- End


  • x
  • convention:

chenhui
Admin Created Jun 10, 2021 00:55:52

Good to know :D
View more
  • x
  • convention:

andersoncf1
andersoncf1 Created Jun 13, 2021 16:08:11 (0) (0)
thanks teacher  
lucian2003
MVE Author Created Jun 10, 2021 01:05:17

Great, Understanding of VLAN - VLAN Mapping-3964501-1
View more
  • x
  • convention:

user_3015189
user_3015189 Created Jun 10, 2021 19:09:56 (0) (0)
:-)  
andersoncf1
andersoncf1 Created Jun 13, 2021 16:08:29 (0) (0)
thanks my brother  
lucian2003
lucian2003 Reply andersoncf1  Created Jun 14, 2021 00:51:18 (0) (0)
 
zaheernew
MVE Created Jun 10, 2021 01:44:02

cool
View more
  • x
  • convention:

csk99
MVE Created Jun 10, 2021 04:25:40

Good to know
View more
  • x
  • convention:

shakeela
shakeela Created Jun 10, 2021 17:40:00 (0) (0)
 
csk99
csk99 Reply shakeela  Created Jun 11, 2021 02:33:42 (0) (0)
 
csk99
csk99 Reply csk99  Created Jun 12, 2021 04:23:41 (0) (0)
 
DDSN
Admin Created Jun 10, 2021 06:10:44

Thank you for sharing! Understanding of VLAN - VLAN Mapping-3964727-1
View more
  • x
  • convention:

shakeela
shakeela Created Jun 10, 2021 17:40:07 (0) (0)
 
IndianKid
Moderator Author Created Jun 10, 2021 08:01:09

Thank you for sharing!
View more
  • x
  • convention:

carlosalcosta
Created Jun 10, 2021 11:36:21

Thanks. Good to know.
View more
  • x
  • convention:

Unicef
MVE Created Jun 10, 2021 13:35:19

WELL DONE
View more
  • x
  • convention:

GhaziAsad
GhaziAsad Created Jun 10, 2021 17:28:50 (0) (0)
 
Vlada85
MVE Author Created Jun 10, 2021 16:16:24

Nice article. Thank you
View more
  • x
  • convention:

GhaziAsad
GhaziAsad Created Jun 10, 2021 17:28:59 (0) (0)
 
12
Back to list

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.