[英]Is it possible to establish communication using just an ethernet cable?
I have two linux systems, server and client, whose both ethe.net port has VLAN tagging(preconfigured IP address and same su.net), and connected with a common ethe.net cable (no router or.network switch in between them).我有两个 linux 系统,服务器和客户端,它们的两个 ethe.net 端口都有 VLAN 标记(预配置的 IP 地址和相同的 su.net),并使用普通的 ethe.net 电缆连接(它们之间没有路由器或.network 交换机) .
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.
在服务器上,我需要开发一个程序,它在 while(1) 中运行并监听 VLAN 端口并响应客户端请求。 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.
在客户端我需要使用python/C++中的正常TCP套接字编程,它基本上绑定到它自己的VLAN IP并连接到服务器VLAN IP并发送请求。
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.我尝试使用
scapy
通过 Vlan 发送 Ether() 数据包,我能够观察到 wireshark 上的流量,但是当我使用客户端请求时,服务器不接受连接。
Can the above problem statement be possible to implement?上面的问题陈述可以实现吗?
You are going to need a VLAN switch between the two.您将需要两者之间的 VLAN 交换机。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.