Closed. This question needs to be more focused. It is not currently accepting answers. Learn more。
想改进这个问题吗?更新问题,使其只关注一个问题editing this post。
我是网络事物的发起者…
我正在尝试在两个Linux设备(IMX-6板)之间进行通信。
这些设备通过以太网电缆连接。设备将不会连接到本地LAN。
我正在尝试使用以太网在这两个设备之间进行通信。
通过以下方式连接交叉电缆并为两个设备分配静态IP
在/etc/network/interfaces中启用以下代码
自动eth0
iface eth0 inet静态
地址192.168.0.xx
网络192.168.0.0
网络掩码255.255.255.0
设备之间不发生ping(网络端口指示灯也不亮)。
但当我把这个设备连接到笔记本电脑(使静态IP连接到笔记本电脑)时,它会发出ping。
我遗漏了什么吗???
我正在使用Timesys氮气6x板(https://linuxlink.timesys.com/docs/gsg/NITROGEN6X#SECTION00042000000000000000)
# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 6
Transceiver: external
Auto-negotiation: on
Link detected: no
请给我一个建议。
谢谢
最佳答案
如果NIC不支持crossover cable,请通过Auto-MDIX连接设备。
将它们分配到同一子网上。如:
A: 192.168.100.20 255.255.255.0
B: 192.168.100.30 255.255.255.0
像处理其他网络编程一样处理应用程序协议。
08-04 10:26