I'm trying to run a DHCP server on my Beaglebone Black (running Debian), and I want to give it a static IP address - 192.168.17.1 - but it keeps assigning itself its own different IP address - 192.168.17.12. I checked the leases to make sure that it was in fact assigning its own address, and not that I had a typo somewhere.
Here is my /etc/network/interfaces file:
auto eth0
iface eth0 inet static
address 192.168.17.1
netmask 255.255.255.0
gateway 192.168.17.1
iface usb0 inet static
address 192.168.7.2
netmask 255.255.255.0
network 192.168.7.0
gateway 192.168.7.1
And here's my dhcpd.conf file:
option domain-name "BBB";
option domain-name-servers ns1.example.org, ns2.example.org;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.17.0 netmask 255.255.255.0 {
range 192.168.17.10 192.168.17.20;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.17.255;
option routers 192.168.17.1;
}
One possible solution might be to fix the IP address in the dhcpd.conf file. For example:
host fantasia {
hardware ethernet 08:00:07:26:c0:a5;
fixed-address fantasia.fugue.com;
}
But this method doesn't seem right, or safe. Does anyone know a better solution?