Ability to insert VLAN id into packets?


I am using Cumulus Linux 2.5.7. After reading the Technical Documentation, I have not found a way to accomplish VLAN tagging. If I have traffic coming into an interface, I would like to insert a VLAN id into all packets received and send them out another interface with the new VLAN id. Is it possible to insert VLAN tags into incoming packets?

Basically, what I would like to accomplish is this:

Incoming Packet to interface swp1:



Switch inserts VLAN tag, packet leaving switch swp2:



Currently, I would add both swp1 and swp2 to a bridge and set a drop rule in ebtables to make this unidirectional. So I am hoping there is a way to add a VLAN tag to packets within this scheme.

4 replies

Userlevel 5
Bryan

This article explains the VLAN tagging.

https://docs.cumulusnetworks.com/display/CL25ESR/VLAN+Tagging

If this does not help, can you post your /etc/network/interfaces file?
Scott Suehle wrote:

Bryan

This article explains the VLAN tagging.

[url=https://docs.cumulusnetworks.com/display/C...

Thank you.
Userlevel 1
Hi, Bryan.
The way I see it - you can have two interfaces in bridge, one untagged (swp1), and one tagged (swp2). Everything received on untagged port will be tagged and sent out swp2.

Although, if you are looking for vlan swapping feature (swap one vlan tag with another) - it looks like more complicated task to achieve, and I don't see any simple solution for that.
Sergei Hanus wrote:

Hi, Bryan.
The way I see it - you can have two interfaces in bridge, one untagged (swp1), and on...

Your suggestion works. I was making it more complicated than it needed to be. Thanks for the suggestion!

Reply