通用接口板通过以太网连接到计算机。在正确配置的系统 (A) 上,arp -a 列出其 MAC 地址并建立连接。连接似乎通过 /dev/ttyACM0 进行
arp -a
...
(10.0.0.100) at d8:80:39:27:d5:4b [ether] on eth1
...
在另一个系统(B)上,该设备可见,但其 MAC 地址被隐藏,无法建立连接。
arp -a
...
(10.0.0.100) at <incomplete> on eth2
...
更有趣的是,当我将 UIB 连接到 A,然后断开连接并连接到 B 时,与 UIB 的连接就建立了。
/etc/network/interfaces A:
# The loopback network interface
auto lo
iface lo inet loopback
auto eth1
#allow-hotplug eth1
iface eth1 inet static
address 10.0.0.1
netmask 255.255.0.0
network 10.0.0.0
broadcast 10.0.255.255
post-up /usr/bin/logger -p syslog.info $0 eth1 up
auto eth1:0
#allow-hotplug eth1:0
iface eth1:0 inet static
address 192.168.0.50
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
# The primary network interface auto eth0
#auto eth0
allow-hotplug eth0
iface eth0 inet dhcp
iface eth0:0 inet static
address 192.168.1.99
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-nameservers 8.8.8.8 8.8.4.4
# post-up ip route add default via 192.168.1.1 dev eth0 table classic-route
# post-up ip rule add fwmark 0x1 table classic-route
#auto eth0:1
#allow-hotplug eth0:1
iface eth0:1 inet static
address 192.168.6.1
netmask 255.255.255.0
network 192.168.6.0
broadcast 192.168.6.255
#access pi3 on eth0 at 192.168.5.254
#auto eth0:2
#allow-hotplug eth0:2
iface eth0:2 inet static
address 192.168.5.2
netmask 255.255.255.0
network 192.168.5.0
broadcast 192.168.5.255
allow-hotplug usb0
iface usb0 inet static
address 192.168.4.2
netmask 255.255.255.0
network 192.168.4.0
broadcast 192.168.4.255
# eth2 tablet on usb
#auto eth2
allow-hotplug eth2
iface eth2 inet static
address 10.2.0.1
netmask 255.255.0.0
network 10.2.0.0
broadcast 10.2.255.255
B的网络设置:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
#auto eth2
allow-hotplug eth2
iface eth2 inet static
address 10.0.0.1
netmask 255.255.0.0
network 10.0.0.0
broadcast 10.0.255.255
#auto eth3
allow-hotplug eth3
iface eth3 inet dhcp