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.