简体   繁体   English

是否可以仅使用 ethe.net 电缆建立通信?

[英]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.

相关问题 使用套接字进行以太网通信的最佳实践 - Best practice for ethernet communication using socket 在Linux中的“以太网电缆插入”事件中得到通知 - Getting Notified on “Ethernet cable plugged in” events in linux 在 Python 中确定计算机是否通过 WiFi 网络或以太网电缆连接到 Internet - Determine if a computer is connected to internet via WiFi network or ethernet cable in Python Python 套接字通过以太网电缆连接提供 [WinError 10057] - Python socket gives [WinError 10057] with Ethernet cable connection 如何确定服务器断开连接(外壳电缆以太网断开) - How do you determine the server disconnection (case cut off cable ethernet) pythons“socket”库中的“recvfrom”无法在UDP实现中找到通过以太网电缆成功发送的消息 - “recvfrom” from pythons “socket” library cant find message successfully sent over ethernet cable in UDP implementation 是否可以使用 Azure 通信服务 Python SDK 接收 SMS 文本? - Is it possible to RECEIVE SMS texts using Azure Communication Services Python SDK? MAC,使用python的以太网ID - MAC, ethernet id using python 如何在 C# 和 python 应用程序之间建立快速通信? - How to establish fast communication between C# and python apps? 如何在android设备和python脚本之间建立通信? - How can I establish a communication between an android device an a python script?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM