Creating a VPN for communicating two different boards

cn flag

Beforehand, I would like to say that I am not experienced in networking and would like to learn more regarding this.

I have two boards that have to send and receive ethernet packets to each other. Let's call them board 1 and board 2. Board 1 is connected to Ubuntu 1 and Board 2 is connected to Ubuntu 2. Both Ubuntu 1 and 2 are connected to a bigger network. The diagram below shows the topology of the network.

I want board 1 and 2 to be able to receive and send ethernet packets through Ubuntu 1 and 2. If possible, in layer 2 (Data Link Layer) not layer 3 (Network Layer). I have read TUN/TAP interfaces, but am still puzzled on how to implement this into my network. I have also read IP Forwarding (routing) but this uses layer 3. I want these boards to communicate through layer 2.

My final solution was creating a VPN server in Ubuntu 1 or 2 using OpenVPN. This also uses the TUN interface (layer 3), but I am hoping it can be replaced with a TAP interface. This is my current question. How do i switch to a TAP interface in OpenVPN?

If there are easier suggestions, instead of creating a VPN an such, I would love to hear it also. Thank you in advance for your help.

Network Topology

cn flag

I have decided to use OpenVPN as the solution to my problem. Even though VXLAN is the most compatible and easiest solution, it lacks security measures and thus I decided to use OpenVPN.

OpenVPN allows ethernet bridging (layer 2) and this is enough for my purpose. It is slightly harder to configure and install compared to VXLAN.

Thank you to everyone who have commented and helped.

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.