I am trying to establish a wired connection between my RPi 3 B+ and my MacBook Air. After I connected the two devices with a wire, my MacBook got IP=169.254.214.218, and my RPi got IP=10.0.0.21. When I pinged my RPi from my MacBook, ping recognized the name "realtimepi.local" (IP=10.0.0.21). However, the requests always went timeout. When I pinged my MacBook from my RPi, ping only occasionally recognized "<my MacBook's name>.local", so I pinged 169.254.214.218 directly. The requests always encountered the error "Destination Host Unreachable". I checked several related posts and ran some commands to diagnose this problem but in vain. The following is what I have known so far. Could someone share any thoughts/feedback? Thanks.
I found that my MacBook's IP indicated that the DHCP server is not reachable. I am unsure if this is the cause and why. On my MacBook, I have set "Configure IPv4: Using DHCP", "Location: Automatic", "Configure IPv6: Automatically", and "DNS Servers: 10.0.0.1, 10.10.10.10, ..., 8.8.8.8, ...".
My RPi has been configured to automatically search for and connect to my phone's Wi-Fi. My MacBook can then communicate with my RPi wirelessly. In this way, I ssh-logged into my RPi, ran ifconfig
, route -n
, ip route ls
, and checked /etc/dhcpcd.conf
.
pi@realtimepi:~ $ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.21 netmask 255.255.255.0 broadcast 10.0.0.255
inet6 fe80::cebe:1e7a:d284:3733 prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:01:cc:42 txqueuelen 1000 (Ethernet)
RX packets 695 bytes 220566 (215.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 266 bytes 13230 (12.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 167 bytes 16130 (15.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 167 bytes 16130 (15.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.43.228 netmask 255.255.255.0 broadcast 192.168.43.255
inet6 fe80::a639:4e7c:b4ef:f5e5 prefixlen 64 scopeid 0x20<link>
inet6 2607:fb90:6e2c:1057:abd:aa36:70c7:7123 prefixlen 64 scopeid 0x0<global>
ether b8:27:eb:54:99:17 txqueuelen 1000 (Ethernet)
RX packets 811 bytes 90049 (87.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 476 bytes 72780 (71.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
pi@realtimepi:~ $ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.0.1 0.0.0.0 UG 202 0 0 eth0
0.0.0.0 192.168.43.1 0.0.0.0 UG 303 0 0 wlan0
10.0.0.0 0.0.0.0 255.255.255.0 U 202 0 0 eth0
192.168.43.0 0.0.0.0 255.255.255.0 U 303 0 0 wlan0
pi@realtimepi:~ $ ip route ls
default via 10.0.0.1 dev eth0 src 10.0.0.21 metric 202
default via 192.168.43.1 dev wlan0 src 192.168.43.228 metric 303
10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.21 metric 202
192.168.43.0/24 dev wlan0 proto kernel scope link src 192.168.43.228 metric 303
part of /etc/dhcpcd.conf
, the unlikely relevant lines omitted
interface eth0
static ip_address=10.0.0.21/24
static routers=10.0.0.1
static domain_name_servers=10.0.0.1 8.8.8.8
interface eth0
nogateway
I also ran ifconfig
on my MacBook.
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=400<CHANNEL_IO>
ether 48:bf:6b:d3:2f:de
inet6 fe80::1810:2058:e5a0:4491%en0 prefixlen 64 secured scopeid 0x4
inet 192.168.43.173 netmask 0xffffff00 broadcast 192.168.43.255
inet6 2607:fb90:6e2c:1057:4e6:3b53:93b:f117 prefixlen 64 autoconf secured
inet6 2607:fb90:6e2c:1057:15b5:d130:cc2b:1e16 prefixlen 64 autoconf temporary
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=460<TSO4,TSO6,CHANNEL_IO>
ether 82:18:34:12:02:40
media: autoselect <full-duplex>
status: inactive
bridge0: flags=8822<BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 1500
options=63<RXCSUM,TXCSUM,TSO4,TSO6>
ether 82:18:34:12:02:40
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x0
member: en1 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 5 priority 0 path cost 0
media: <unknown type>
status: inactive
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
options=400<CHANNEL_IO>
ether 0a:bf:6b:d3:2f:de
media: autoselect
status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
options=400<CHANNEL_IO>
ether 96:9e:70:32:fd:dd
inet6 fe80::949e:70ff:fe32:fddd%awdl0 prefixlen 64 scopeid 0x8
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
llw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=400<CHANNEL_IO>
ether 96:9e:70:32:fd:dd
inet6 fe80::949e:70ff:fe32:fddd%llw0 prefixlen 64 scopeid 0x9
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
inet6 fe80::1d3f:f1bc:8034:44e3%utun0 prefixlen 64 scopeid 0xa
nd6 options=201<PERFORMNUD,DAD>
utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
inet6 fe80::bedd:ab54:da62:8d19%utun1 prefixlen 64 scopeid 0xb
nd6 options=201<PERFORMNUD,DAD>
en3: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=50b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV,CHANNEL_IO>
ether a8:60:b6:00:77:85
inet6 fe80::834:760f:3480:a927%en3 prefixlen 64 secured scopeid 0xc
inet 169.254.214.218 netmask 0xffff0000 broadcast 169.254.255.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect (1000baseT <full-duplex,flow-control,energy-efficient-ethernet>)
status: active
I hope these results help. I will supply more if needed.