Setting up a dhcp server with MacOS .

I need to test my network by setting up a dhcp server. Is there a clean procedure to do so ? I can only find partial scripts and incomplete howtos, and I keep running in Apple's own way of managing safeties. I'd really like not to start my OpenBSD Box.


I spend some hours reading howtos that just happen not to work (mostly on Apple's forum), how come there is not a simple way to start a DHCP server (such as typing bootpd - D) ?


How do you convince MacOs to allow writing preferences files other than logging in with a superuser account ? I'd hate to get all the privileges just to perform a single task.


what I typed :

bootpd -D


what I got : (from zsh)

command not found


when I vi bootpd.plist I just cannot save in /etc


when I look up the forum everyone just seems to think it is so obvious that it doesn't need explaining, and when I look elsewhere, I just get the "log in as root and then you can do whatever you want". Is there a clean way to start a DHCP server ?


MacOS 12.6.1

MacBookPro13,2


TIA

MacBook Pro 13″, macOS 12.6

Posted on Nov 26, 2022 10:30 AM

Reply
Question marked as Top-ranking reply

Posted on Nov 26, 2022 11:55 AM

Short answer:


/usr/libexec/bootpd -D


That directory is not in your PATH. You can add it, or specify the full path to the file, as shown above.



Longer answer:


This all used to be easy, with a nice GUI and everything, but has gotten progressively less tractable with the Apple tools starting with Mojave and with the demise of macOS Server.


Apple does point to using the in-built dhcp, but I’d probably avoid that.


There’s a Server Plus app in the Mac App Store, which might be an option for you:

https://apps.apple.com/us/app/server-plus/id1503420154?mt=12


Here, for DHCP testing, I’d probably load isc-dhcp from Homebrew, and use that. There’s doc around for using the ISC dhcpd over at the ISC website, too. Or maybe load and use dnsmasq.



Similar questions

1 reply
Question marked as Top-ranking reply

Nov 26, 2022 11:55 AM in response to Volny

Short answer:


/usr/libexec/bootpd -D


That directory is not in your PATH. You can add it, or specify the full path to the file, as shown above.



Longer answer:


This all used to be easy, with a nice GUI and everything, but has gotten progressively less tractable with the Apple tools starting with Mojave and with the demise of macOS Server.


Apple does point to using the in-built dhcp, but I’d probably avoid that.


There’s a Server Plus app in the Mac App Store, which might be an option for you:

https://apps.apple.com/us/app/server-plus/id1503420154?mt=12


Here, for DHCP testing, I’d probably load isc-dhcp from Homebrew, and use that. There’s doc around for using the ISC dhcpd over at the ISC website, too. Or maybe load and use dnsmasq.



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Setting up a dhcp server with MacOS .

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