/~r/sysadmin/ Have you tried turning it on and off again?

Raspberry Pi Self-Assigned IP Address via Ethernet mDNS

I’ve used this technique to discover a Raspberry Pi’s self-configured 169.254.0.0/16 IP address, when it’s connected directly to my MacBook Pro via Ethernet. Run this command:

dns-sd -G v4 raspberrypi.local

The Raspbian image runs Avahi by default, which responds to mDNS queries. The default hostname is raspberrypi, so a mDNS request for raspberrypi.local will receive a response from the Rasberry Pi containing its self-configured IP address.

If this technique isn’t working, check that:

  • Your MacBook’s firewall isn’t rejecting mDNS responses
  • The ethernet status light on the Raspberry Pi blinks when you send the mDNS request (so you know that the Raspberry Pi definitely has received the request)
  • You haven’t changed the hostname of the Raspberry Pi