Dhcpd
From Hackepedia
Jump to navigationJump to search
If you want to use a sniffer to watch dhcp requests, replace rl0 with your NIC:
# tcpdump -i rl0 -lenX -s 1500 port bootps or port bootpc
Sample dhcpd.conf
ddns-update-style none; default-lease-time 60000; max-lease-time 72000; local-address 192.168.1.1; option subnet-mask 255.255.255.0; option broadcast-address 192.168.3.255; option routers 192.168.1.1; # This will become the /etc/resolv.conf nameserver line(s): option domain-name-servers 192.168.1.1, 206.248.154.22, 65.39.192.130; # This will become the /etc/resolv.conf search line: option domain-name "home.lan example.com"; subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.2 192.168.1.15; }
BSD
vi /usr/local/etc/dhcpd.conf
Perhaps using the above example. In your /etc/rc.conf you will want to add:
dhcpd_enable="YES" dhcpd_flags="-q rl0" dhcpd_chroot_enable="YES"
And if all looks well, you will want to start the daemon:
/usr/local/etc/rc.d/isc-dhcpd.sh start
and then make sure it's running on the right ports.