0

I can’t find the ip address of my RPi after I connect it to my MacBook through a USB ethernet adapter. I have both Internet sharing and stealth mode in Firewall setting turned on. But as I run ifconfig, arp -a and even pi finder, none of them works so far. The bridge100 device just doesn’t show up.

enter image description here

enter image description here

Here's my terminal output:

dddde-MacBook-Air% ifconfig
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
XHC20: flags=0<> mtu 0
en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
    options=60<TSO4,TSO6>
    ether 9a:00:06:c6:09:70 
    media: autoselect <full-duplex>
    status: inactive
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 08:6d:41:c2:fc:0a 
    inet6 fe80::409:3020:34ea:68b7%en0 prefixlen 64 secured scopeid 0x7 
    inet 192.168.0.14 netmask 0xffffff00 broadcast 192.168.0.255
    inet6 2600:8802:5301:cb00:46c:7607:4965:19f2 prefixlen 64 autoconf secured 
    inet6 2600:8802:5301:cb00:94d9:2c84:50ad:139f prefixlen 64 autoconf temporary 
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
    ether 0a:6d:41:c2:fc:0a 
    media: autoselect
    status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
    ether d6:d7:b5:3d:72:d3 
    inet6 fe80::d4d7:b5ff:fe3d:72d3%awdl0 prefixlen 64 scopeid 0x9 
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active
bridge0: flags=8822<BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 1500
    options=63<RXCSUM,TXCSUM,TSO4,TSO6>
    ether 9a:00:06:c6:09:70 
    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 0x2
    member: en1 flags=3<LEARNING,DISCOVER>
            ifmaxaddr 0 port 6 priority 0 path cost 0
    media: <unknown type>
    status: inactive
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
    inet6 fe80::137f:a2ab:9594:c61c%utun0 prefixlen 64 scopeid 0xb 
    nd6 options=201<PERFORMNUD,DAD>
utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
    inet6 fe80::f23c:cf30:6183:3bf8%utun1 prefixlen 64 scopeid 0xc 
    nd6 options=201<PERFORMNUD,DAD>
en5: flags=863<UP,BROADCAST,SMART,RUNNING,SIMPLEX> mtu 1500
    ether 00:09:27:c2:7d:32 
    inet 169.254.95.129 netmask 0xffff0000 broadcast 169.254.255.255
    media: autoselect (<unknown type>)
dddde-MacBook-Air% arp -a
? (169.254.174.70) at 5c:9:47:31:72:86 on en0 [ethernet]
? (169.254.255.255) at (incomplete) on en0 [ethernet]
? (192.168.0.1) at dc:ef:9:24:3d:bb on en0 ifscope [ethernet]
? (192.168.0.3) at 7c:1:a:45:e4:f3 on en0 ifscope [ethernet]
? (192.168.0.13) at c0:cc:f8:c3:5c:bb on en0 ifscope [ethernet]
? (192.168.0.14) at 8:6d:41:c2:fc:a on en0 ifscope permanent [ethernet]
? (192.168.0.33) at 54:72:4f:2d:4:79 on en0 ifscope [ethernet]
? (192.168.0.255) at ff:ff:ff:ff:ff:ff on en0 ifscope [ethernet]
? (224.0.0.251) at 1:0:5e:0:0:fb on en0 ifscope permanent [ethernet]
? (239.255.255.250) at 1:0:5e:7f:ff:fa on en0 ifscope permanent [ethernet]
? (239.255.255.250) at 1:0:5e:7f:ff:fa on en5 ifscope permanent [ethernet]

My RPi runs Raspbian Jessie and OSX Sierra on MacBook. I was able to SSH into RPi without any problem when plugged it into the router. Adapter is unbranded but I don’t think it matters because I can still use ethernet with it. So I suppose OSX was unable to assign an ip address to my RPi.

I am travelling so headless setup is my only option right now. Please help me out, thanks!

  • You mean like you are connecting it directly into your computer through the ethernet interface? Do you have a dhcp service running on your computer (and I don't mean like having dhcp set up as a client on that interface on your computer, that's what people normally have set up these day.... I'm talking about a dhcp service that could provide the rpi the network set up when it tries to get it from your host)? If that's not the case, then you will probably have to set up a static IP address on both your computer and the rpi. – eftshift0 May 15 '18 at 4:39
  • If setting up static IPs on both your computer and the rpi is the way you will go, you will have to take out the memory card from the rpi, put it in your computer, mount the working partition from the memory card (not the boot one) and edit either /etc/network/interfaces or /etc/dhcpcd.conf (prepend the mount point you used or you will edit the files on your computer not the rpi, just in case) so that you assign the static ip address for the rpi so that your computer and the rpi can see each other. – eftshift0 May 15 '18 at 4:41
1

Your adapter has a self-assigned ip address 169.254.95.129. So it is very likely that your raspi with avahi followed apples zeroconf and has also a self-assigned ip address from the address range 169.254.0.0, netmask 255.255.0.0. With this your raspi has also got the name raspberrypi.local on the subnet. Try to

dddde-MacBook-Air% ping -I 169.254.95.129 raspberrypi.local
dddde-MacBook-Air% ssh pi@raspberrypi.local
1

If you connect directly the Pi will have a Link-local address, unless you get the Mac DHCP to allocate one.

If you are using Internet sharing this is normal, BUT you will NOT be able to access the Pi from the Mac. You can have Internet sharing OR access NOT both - this is not particular to the Mac, it applies to all systems.

EDIT - To address the additional question in Comment.

ISC basically works by bridging the input port to the shared port, this effectively "hides" the input port from the local machine - this has nothing to do with ssh or any other protocol. (It is not entirely impossible to do both, but involves complex setup - effectively implementing a router.)

  • Good to know! Is blocking SSH if Internet sharing is enabled some kind of default security feature? Does this "mechanism" has a specific name? Would like to learn more about it. – Fabian May 15 '18 at 8:57
  • Just to understand it: from the screen shot above the Status of the adapter is Connected USB 2.0 10/100M Ethernet Adaptor has a self-assigned IP address and will not be able to connect to the internet. I do: ping -I 169.254.95.129 raspberrypi.local and get a response without Internet sharing. With Internet sharing I do not get a response, right? – Ingo May 15 '18 at 11:15
  • @Ingo You can use Link-local address to ssh over a single link (I routinely do this when there is no internet). If you set the Mac to allocate an address (via DHCP or fixed) ICS should work - although it is easier and better to connect the Pi to router (I haven't done this for years, and frankly don't see the point - I can't even test because I have Content Sharing activated on my Mac) – Milliways May 15 '18 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.