ISC DHCP Howto (1)
This howto is based on the following documentation:
- Home Router [EN] @ Gentoo Wiki
Installation
Synchronize the repository and show dependencies:
emaint --auto sync
emerge --update --pretend 'net-misc/dhcp'
Install the package:
emerge --update 'net-misc/dhcp'
Configuration
Edit the following files:
Validate the JSON file:
python -m 'json.tools' '/root/etc/raysoft.loc.json'
Run the script mk-named-dhcpd-conf.py to generate the file dhcpd-hosts.conf:
/root/bin/mk-named-dhcpd-conf.py '/root/etc/raysoft.loc.json'
Move the file:
install --mode=0644 --owner='root' --group='root' --target-directory='/etc/dhcp' \
'dhcpd-hosts.conf'
Validate the configuration:
dhcpd -t -cf '/etc/dhcp/dhcpd.conf'
Start the daemon:
/etc/init.d/dhcpd start
Include the daemon to the start procedure:
rc-update add 'dhcpd' 'default'
rc-update show | grep 'dhcpd'
Output:
dhcpd | default
Test
- Test the listener's availability
netstat --numeric --program --listening --all --tcp --udp | grep ':67 '
Output:
udp 0 0 0.0.0.0:67 0.0.0.0:* 2786/dhcpd