We have tens of networks(VLANs) in data center with a central Linux DHCP server. each network has their router to do the DHCP relay. So, the DHCP server’s configuration files has tens ‘subnet’ statements. Because PXE booting is standard in whole data center, there are also thousands of static MAC-IP mapping ‘host’ statements in dhcp configuration. The big challenge with a central dhcp server is how to detect typo in the thousands of MAC-IP ‘host’ statements? — a single char/digit typo here will fail a PXE booting or download wrong post-installation snippets.
Is there a tool to validate all ‘host’ statements from another Linux box?
I tried nagios check-dhcp plugin, with a series of real MAC addresses(for hosts in other different networks). Surprisingly, the IP address came back were not the static IP addresses in ‘host’ statement, but dynamic addresses in the pool defined for this particular network (where I ran check-dhcp from). check_dhcp was run with the following arguments:
/usr/lib64/nagios/plugins/check_dhcp –verbose –server= –interface=eth0 –mac= –unicast remove –unicast doesn’t help but just see more DHCP replys. Interestingly, with a same MAC address, and the above same command, from two CentOS boxes on different network there will be different dynamic IPs! instead the static IP defined with ‘host’ statement.
So, how can we validate static IP assignment? Thanks. Best,David,