Got it

What is the difference between VLAN, C-VLAN, and S-VLAN Highlighted

Latest reply: Oct 19, 2021 13:31:11 4942 31 19 0 2

Hello, everyone!

This time, I want to share information about VLAN, C-VLAN, and S-VLAN. I hope you enjoy it.

What are VLAN, C-VLAN, and S-VLAN?

VLAN

Virtual Local Area Network(VLAN). A logical grouping of two or more nodes that are not necessarily on the same physical network segment but which share the same IP network number. This is often associated with switched Ethernet.

S-VLAN and C-VLAN

Before I explain S-VLAN and C-VLAN, I need to explain the concept of QinQ.

The QinQ technology provides a cheap and easy Layer 2 (L2) virtual private network (VPN) solution. With the VLAN stacking and nesting technology, the data packets carry two VLAN tags at two different layers to identify different data packets. This method clears the limit of the original solution in which only one VLAN tag at one layer is used to identify different data packets. As a result, the VLAN IDs are extended. VLAN stacking refers to a technique in which one more VLAN tag is added in front of the existing VLAN tag in a data frame structure. That is, one data frame carries two VLAN tags at two layers in VLAN stacking.


C-VLAN indicates the customer-side VLAN.

S-VLAN indicates the supplier-side VLAN.


Figure 1 VLAN stacking in the frame structure:

VLAN


What is the difference between VLAN, C-VLAN, and S-VLAN?

1. VLAN is a very broad concept. It is widely used in the field of information and communication technology.

2. S-VLAN and C-VLAN are special types of VLANs. In the QinQ application scenario, S-VLANs and C-VLANs are named to differentiate VLANs at different levels.

3, C-VLAN are mainly reflected on the client layer network. S-VLANs are mainly implemented on the transport layer above the client layer.

4. The C-VLAN and S-VLAN are relative, and the C-VLAN is contained in the S-VLAN. Add another tag to a VLAN to form a double-tagged VLAN. The outer tag is an SVLAN and the inner tag is a CVLAN.  If a VLAN tag is added to the current S-VLAN, the S-VLAN becomes a new S-VLAN, and the original S-VLAN becomes a C-VLAN of the current S-VLAN.


Application Scenario

Take two common scenarios as examples.


Working principle of QinQ in Ethernet Private Line Services

This section uses EVPL (QinQ) services illustrated in Figure 2 to describe how data frames are processed on a QinQ network.

Figure 2 EVPL (QinQ) services:

VLAN

On the network, the data frames from NE1 to NE4 are processed as follows:

1. NE1 adds an S-TAG to each data frame from the customer a and customer b that are connected to NE1, and forwards the frames to NE2. NE1 adds an S-VLAN1 tag to each data frame from the customer a and an S-VLAN2 tag to each frame from customer b.

2. Based on S-VLAN tags, NE2 transparently transmits the data frames of customer a and customer b to NE3 on service network B.

3. Because service provider B plans different S-VLAN tags for a customer a and customer b, NE3 translates the data frame that contains an S-VLAN1 tag into a data frame that contains an S-VLAN3 tag, translates the data frame that contains an S-VLAN2 tag into a data frame that contains an S-VLAN4 tag, and forwards the data frames to NE4.

4. NE4 removes the S-VLAN3 tag and S-VLAN4 tag and forwards the data frames to the Ethernet ports of customer a and customer b.

The data frame process from NE4 to NE1 is reverse to the preceding process.


Working principles of QinQ in the Packet service network

QinQ Stacking

QinQ tunneling adds the same outer tag to all frames received on a QinQ port. The VLAN-based QinQ stacking technology can add outer tags to frames on QinQ ports based on different inner tags and support refined VLAN classification.

In the carrier network-accessing environment, user packets usually need to be differentiated according to the user's applications, access points, or access devices. Therefore, QinQ stacking is adopted to realize packet differentiation by adding different outer VLAN tags to user packets according to the inner VLAN tags of these packets.

Multiple QinQ stacking sub-interfaces (adding S-VLAN) can be created on a port that supports the QinQ stacking function.

The port can be configured with multiple outer VLAN tags. Then different outer VLAN tags can be assigned to different VLAN frames.

The port can add outer VLAN tags to the received frames, and strip the outer VLAN tags from the sent frames.

This topic uses the service networking mentioned in Figure 3 to describe the processing of data frames on a QinQ network.

Figure 3 Processing of QinQ stacking packets:

QinQ


On a QinQ network, QinQ service packets are described as follows:

1. After the service packets of users A1 and B1 are transmitted to the access layer and converged, the service packets carry different C-VLAN tags and are transmitted to NE1 using port 1. The C-VLAN ID of service packets of user A1 is 10 and that of user B1 is 20.

2. When service packets are transmitted to a carrier network, multiple QinQ stacking sub-interfaces (adding S-VLAN) can be created on port 1 to add different S-VLAN tags for packets with different C-VLAN tags. For packets whose C-VLAN ID is 10, the ID of the added S-VLAN tags is 100. For packets whose C-VLAN ID is 20, the ID of the added S-VLAN tags is 200.

3. The service packets carry two VLAN tags and are forwarded by following the normal Layer 2 forwarding process.

When the service packets arrive at NE2, a user-side port strips S-VLAN tags from the service packets, and forwards the service packets to the destination users based on the VLAN IDs (10 or 20).


QinQ Mapping

By modifying the VLAN tags carried in packets, QinQ mapping can map a customer-VLAN (C-VLAN) tag to a service-VLAN (S-VLAN) tag so that different VLAN tags are shielded.


Multiple QinQ mapping sub-interfaces can be created on a port that supports the QinQ mapping function. The sub-interfaces are described as follows:

A sub-interface replaces the VLAN tag in a packet sent from the local VLAN with the outer VLAN tag.

A sub-interface replaces the VLAN tag in a received packet with the local VLAN tag.

This topic uses the service networking mentioned in Figure 4 to describe the processing of data frames on a QinQ network.

Figure 4 Schematic diagram of the QinQ mapping function

VLAN


On a QinQ network, QinQ service packets are described as follows:

1. After the service packets of users A1 and B1 are transmitted to the access layer and converged, the service packets carry different C-VLAN tags and are transmitted to NE1 using port 1. The C-VLAN ID of service packets of user A1 is 10 and that of user B1 is 20.


2. When service packets are transmitted to a carrier network, the QinQ mapping sub-interfaces on port 1 can map the VLAN tags carried in the service packets to the specified C-VLAN tags and adds S-VLAN tags of the carrier network. For service packets whose C-VLAN ID is 10, change the ID of the inner VLAN tag to 30. For service packets whose C-VLAN ID is 20, change the ID of the inner VLAN to 40.


3. The service packets carry two VLAN tags and are forwarded by following the normal Layer 2 forwarding process.


4. When the service packets arrive at NE2, a user-side port strips S-VLAN tags from the service packets, and forwards the service packets to the destination users based on the VLAN IDs.


Thank you!

BAZ
MVE Author Created Sep 17, 2021 22:23:09

Thats what I was looking for.
Thanks for sharing.
View more
  • x
  • convention:

BAZ
MVE Author Created Sep 17, 2021 22:23:52

Whatif client (customer) doesn't have QinQ feature and we need more vlans
View more
  • x
  • convention:

liqiang185
liqiang185 Created Sep 23, 2021 06:14:43 (0) (0)
Generally, the QinQ function is unavailable on the terminal of the device, but the QinQ function is available on the network device.  
zaheernew
zaheernew Created Oct 20, 2021 01:55:05 (0) (0)
 
figure 3:
when frame pass through NE1,why the C-VLAN change to 30/40
View more
  • x
  • convention:

liqiang185
liqiang185 Created Sep 23, 2021 06:57:06 (0) (0)
Thank you very much for your question, because I hadn't finished editing the post at that time. But now, you can read normally.  
chantha
chantha Created Sep 24, 2021 11:15:22 (0) (0)
 
liqiang185
liqiang185 Reply chantha  Created Sep 24, 2021 11:48:19 (0) (0)
 
Thanks for sharing
View more
  • x
  • convention:

liqiang185
liqiang185 Created Sep 23, 2021 06:57:22 (0) (0)
 
Thanks for sharing!!
View more
  • x
  • convention:

I really appreciate that, thanks a bunch
View more
  • x
  • convention:

liqiang185
liqiang185 Created Sep 23, 2021 06:59:14 (0) (0)
Thanks for your support!  
  • x
  • convention:

Unicef
Unicef Created Sep 22, 2021 07:31:27 (0) (0)
 
chantha
chantha Created Sep 24, 2021 11:15:32 (0) (0)
 
HELPFUL THX
View more
  • x
  • convention:

Very important
View more
  • x
  • convention:

liqiang185
liqiang185 Created Sep 23, 2021 06:59:27 (0) (0)
 
123
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 " User Agreement."

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.