Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Possible Duplicate:
Show Active Connections to “Internet Sharing”

Using the following scenario as an example:

I have a Macbook Pro connected to my LAN via its Airport. I enabled Internet Sharing so that the Airport connection would be shared among any devices connected to the ethernet port of the MBP. I plug a Raspberry Pi into the ethernet port of my MBP and boot it up.

How do I determine its IP address so I know what to SSH into?

share|improve this question
add comment

marked as duplicate by robmathers, patrix, Stu Wilson, Mark, CajunLuke Oct 25 '12 at 14:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 2 down vote accepted

Try pinging the broadcast address. This should work as long as the Pi got an IP from DHCP and responds to ping.

First, open up a terminal and run ifconfig en0. This should give you the info for your ethernet interface, if not, just use ifconfig and find it yourself. Make a note of the broadcast address. In my case, it's 192.168.2.255:

inet 192.168.2.99 netmask 0xffffff00 broadcast 192.168.2.255

So I'll run the command ping 192.168.2.255. Do the same with your broadcast address, and hit CTRL-C to stop the ping once you have some results:

Miramar:~ gabriel$ ping 192.168.2.255
PING 192.168.2.255 (192.168.2.255): 56 data bytes
64 bytes from 192.168.2.99: icmp_seq=0 ttl=64 time=0.113 ms
64 bytes from 192.168.2.1: icmp_seq=0 ttl=255 time=3.567 ms
64 bytes from 192.168.2.99: icmp_seq=1 ttl=64 time=0.096 ms
64 bytes from 192.168.2.1: icmp_seq=1 ttl=255 time=3.455 ms
^C

The broadcast is intended to go out to everything on the network. Everything that hears it should respond. In my case, I only see my IP and my router's - I guess it didn't bother passing the request on to my other machines, but you're directly connected to the Pi so you should see it there.

share|improve this answer
add comment

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