Re: Is there a way to detect/validate DHCP static IP assignment?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Wow, it works perfectly! all solved. Thanks. -- David


 

    On Thursday, March 31, 2016 11:46 AM, David Copperfield <cao2dan@xxxxxxxxx> wrote:
 

 Hi tris,
 Many thanks, I'll give the perl script a try shortly....
Best,David 

    On Thursday, March 31, 2016 6:00 AM, Tris Hoar <trishoar@xxxxxxxx> wrote:
 

 On 30/03/2016 18:08, David Copperfield wrote:
> Hi,
>  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=<my_dhcp_server> --interface=eth0 --mac=<real_Mac_for_servers_in_diff_networks> --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,
>

Hi David,

You need to use check_dhcp_relayed.pl 
(https://github.com/timb07/check_dhcp_relayed) if you wish to test for a 
reservation outside of the servers subnet, otherwise the DHCP server 
will assume you are on the local range and issue from that subnet.

Also as an FYI Forman (http://theforeman.org) can do things like 
building VM's and Physical servers and integrates with DHCP to create 
static DHCP reservations for PXE booting servers which should eliminate 
typos.

Tris





*************************************************************
This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity 
to whom they are addressed. If you have received this email 
in error please notify postmaster@xxxxxxxx

The views expressed within this email are those of the 
individual, and not necessarily those of the organisation
*************************************************************
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos


   

  
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux