MacOS DHCP with bootpd, static IPs in bootptab not working
I am trying to configure my MacBookPro to server as a DHCP server. I have researched and been able to get bootpd working, however when I try to configure static IP addresses in the /etc/bootptab file it doesn't work.
I have my /etc/bootpd.plist file configured to dynamically assign IPs between 10.0.0.3 and 10.0.0.99 with a IP lease term of 1 month. In my case, the network interface I want DHCP running on is called en11. The file contents are:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>bootp_enabled</key>
<false/>
<key>detect_other_dhcp_server</key>
<integer>1</integer>
<key>dhcp_enabled</key>
<array>
<string>en11</string>
</array>
<key>reply_threshold_seconds</key>
<integer>0</integer>
<key>Subnets</key>
<array>
<dict>
<key>allocate</key>
<true/>
<key>lease_max</key>
<integer>2592000</integer>
<key>lease_min</key>
<integer>2592000</integer>
<key>name</key>
<string>10.0.0</string>
<key>net_address</key>
<string>10.0.0.0</string>
<key>net_mask</key>
<string>255.255.255.0</string>
<key>net_range</key>
<array>
<string>10.0.0.3</string>
<string>10.0.0.99</string>
</array>
</dict>
</array>
</dict>
</plist>
I am able to start and stop the DHCP server with the following commands:
sudo /bin/launchctl load -w /System/Library/LaunchDaemons/bootps.plist
sudo /bin/launchctl unload -w /System/Library/LaunchDaemons/bootps.plist
All of the above works perfectly. The last piece of the puzzle is having a device with a static IP address. To accomplish that, I created the /etc/bootptab file to map a static IP to a MAC address. My /etc/bootptab file are as follows:
%%
# hostname hwtype hwaddr ipaddr bootfile
kvm-ubuntu 1 00:0c:29:1f:ed:54 10.0.0.128
But whenever I test it, the kvm-ubuntu PC is assigned an IP address of 10.0.0.3 instead of 10.0.0.128.
I have tried looking at (and clearing) /var/db/dhcpd_leases file which hasn't helped. After clearing the file and re-testing the DHCP functionality, the file is re-created by bootpd with the following entry:
{
name=kvm-ubuntu
ip_address=10.0.0.3
hw_address=1,0:c:29:1f:ed:54
identifier=1,0:c:29:1f:ed:54
lease=0x61809a32
}
Any ideas for troubleshooting or help configuring a static IP address with bootp DHCP server would be immensely appreciated!