Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Setting up Mac OS X as a DHCP server

I want to be able to sit on a plane and connect my Raspberry Pi to My Mac on a private local network for software development on the Pi.

I have tried to follow this to set it up but failed (my ip address was still an unassigned one) -


http://www.iconnectit.nl/?p=29


Can anyone point me at an idiot proof guide to doing just this please.

MacBook Pro with Retina display, OS X Yosemite (10.10.2)

Posted on May 4, 2015 7:17 AM

Reply
11 replies

May 4, 2015 11:21 AM in response to tonydenson

At first glance, the most obvious missing component in that page you linked to is any discussion about your Mac's own IP address.

The article seems to be valid to setup a DHCP server to hand out addresses in the range 192.168.222.2-254 via en0. I would expect the Pi to connect as long as it's on the same physical network, so things to check:


1) are you sure 'en0' is the right interface on your Mac? is your Pi connecting wirelessly or wired?


2) the server advertises 192.168.222.2-254, but the article doesn't mention that it's only practical if your Mac's interface is set to 192.168.222.1. Is that the address you've assigned your Mac? If your Mac is in a different subnet then it's not going to work.

There may be other considerations, but I'd start with these two.

May 4, 2015 12:24 PM in response to Camelot

Camelot wrote:


At first glance, the most obvious missing component in that page you linked to is any discussion about your Mac's own IP address.

The article seems to be valid to setup a DHCP server to hand out addresses in the range 192.168.222.2-254 via en0. I would expect the Pi to connect as long as it's on the same physical network, so things to check:


1) are you sure 'en0' is the right interface on your Mac? is your Pi connecting wirelessly or wired?


2) the server advertises 192.168.222.2-254, but the article doesn't mention that it's only practical if your Mac's interface is set to 192.168.222.1. Is that the address you've assigned your Mac? If your Mac is in a different subnet then it's not going to work.

There may be other considerations, but I'd start with these two.

1. That's a good point. When I do "ls /dev" from a Terminal I don't see en0 - however I don't see any ethernet devices, even though the ethernet connection is fine and working.

2. I rather assumed that I leave the Mac in DHCP mode. I'll try that.

May 4, 2015 12:55 PM in response to rccharles

rccharles wrote:


I would not expect being on a plane would make a difference. I do not think the uplink has to be active. I've only done it with an active uplink.


But, I'll defer to the other posters.


Robert

I think you were missing my point. You cannot switch on wifi in a plane. But even putting that aside I want a wired connection as I find wifi rather erratic on a Pi.

May 5, 2015 6:16 AM in response to tonydenson

I think you were missing my point. You cannot switch on wifi in a plane. But even putting that aside I want a wired connection as I find wifi rather erratic on a Pi.

Yea, I think several of us were not clear on that point, and our natural bias for using WiFi dominated our brains 😊


If you use Applications -> Utilities -> Terminal -> ifconfig (After connecting the Pi to the Mac via Ethernet), does the Ethernet device (typically en0) have a self-assigned IP address (169.254.x.x) that you can use from your Pi to make a connection?


Or is this a matter of the Pi needing the DHCP server to pick its own IP address so that the Mac can connect and control the Pi ?


Can you just run "sudo /usr/libexec/bootpd -D -d -i en0" from a Terminal session? "man bootpd" for more information. This is apparently what Internet Sharing runs. If this works, then after you connect your Pi, you can use ifconfig to see what IP address was assigned to en0 (I think).


Applications -> Utilities -> Console -> system.log should contain any error messages from /usr/libexec/bootpd


At the moment I'm sitting in a coffee shop with ONLY my Macbook Pro to play with, and no other computer systems I can attach to see if my guesses work.

May 5, 2015 6:18 AM in response to BobHarris

BobHarris wrote:


I think you were missing my point. You cannot switch on wifi in a plane. But even putting that aside I want a wired connection as I find wifi rather erratic on a Pi.

Yea, I think several of us were not clear on that point, and our natural bias for using WiFi dominated our brains 😊


If you use Applications -> Utilities -> Terminal -> ifconfig (After connecting the Pi to the Mac via Ethernet), does the Ethernet device (typically en0) have a self-assigned IP address (169.254.x.x) that you can use from your Pi to make a connection?


Or is this a matter of the Pi needing the DHCP server to pick its own IP address so that the Mac can connect and control the Pi ?


Can you just run "sudo /usr/libexec/bootpd -D -d -i en0" from a Terminal session? "man bootpd" for more information. This is apparently what Internet Sharing runs. If this works, then after you connect your Pi, you can use ifconfig to see what IP address was assigned to en0 (I think).


Applications -> Utilities -> Console -> system.log should contain any error messages from /usr/libexec/bootpd


At the moment I'm sitting in a coffee shop with ONLY my Macbook Pro to play with, and no other computer systems I can attach to see if my guesses work.

Thanks for all your input. I have now got it working by simply fixing my ip address at both ends (192.168.0.x), I seem to have been making heavy weather of it ! The problem I had as that for some reason it takes about 10-15 seconds before it responds to an SSH command and I was being too impatient.

Setting up Mac OS X as a DHCP server

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.