I have two linux systems, server and client, whose both ethernet port has VLAN tagging(preconfigured IP address and same subnet), and connected with a common ethernet cable (no router or network switch in between them).
I need to establish communication between the two systems. On the server, I need to develop a program which runs in while(1) and listens to the VLAN port and responds to client request. On the client I need to use normal TCP socket programming in python/C++, which basically binds to its own VLAN IP and connects to server VLAN IP and sends requests.
I tried using
scapy to send Ether() packets over the Vlan's and I was able to observe traffic on wireshark, but when I used client request, the server is not accepting the connection.
Can the above problem statement be possible to implement?
For now my question is, can we establish a connection between two vlan ports with just an ethernet cable?