How to check syntax of dhcpd (dhcpd.conf file )

/usr/sbin/dhcpd -t -cf /etc/dhcpd.conf

 Some other quick tips:




1. Syntax checking for dhcpd files:



/usr/sbin/dhcpd -t -cf /etc/dhcpd.conf



This will do a basic syntax check to find those missing ; or other odd things.



2. host {} are global. You will see this warning if you place the host in a subnet zone. This is because when ISC will parse the file and make hostnames work globally (you can also make it do neat if then things but that makes my head hurt.) For the most part it is useful to put hosts in a group setting. This keeps them out of subnets, and also allows you to put common items with them (say for PXE booting with cobbler).



group {

next-server rhn.example.com;

filename “pxelinux.0″;



host noah {

hardware ethernet 00:11:00:11:00:11;

fixed-address 192.168.1.121;

}

}

No comments: