DHCP monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
hgw
Posts: 3
Joined: Fri Jul 25, 2014 1:03 am

DHCP monitoring

Post by hgw »

Hello,

I'm testing a Nagios-XI installation (CentOS 6.5 + Nagios 2014 R1.3) in my company network. One thing I'd like to monitor is the DHCP Service on three different servers in three different subnets. Two of These servers are Microsoft DHCP (W2K3 and W2K8), the third one is a Linux based ISC DHCPv4.
With 'check_dhcp -v - s Windowsserveraddress -u' I got no problems to Monitor the ms-based DHCP Servers but the linux-based Server writes

DHCPDSISCOVER from my_test_macaddress via my_nagiosxi_ip_address : unkown network segment to the syslog.

check_dhcp gives
CRITICAL: No DHCPOFFERs were received.

dhcping yields
'no Answer'

ping/traceroute between both boxes is no Problem.

Service iptables is down on both the nagiosxi- and the dhcpd-box.

I'd be glad on any advice on this.

Regards,
Hans
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: DHCP monitoring

Post by sreinhardt »

Can you run and send us the output from the following commands please?

Code: Select all

check_dhcp -v - s linuxserver -u
ip route  (or if that fails just: route )
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
hgw
Posts: 3
Joined: Fri Jul 25, 2014 1:03 am

Re: DHCP monitoring

Post by hgw »

Thanks for the reply. Here are the requested outputs:

[root@localhost libexec]# ./check_dhcp -v -s 10.56.195.197 -u
Requested server address: 10.56.195.197
DHCP socket: 3
Hardware address: 00:50:56:81:3e:f2
Pretending to be relay client 10.56.195.65
DHCPDISCOVER to 10.56.195.197 port 67
DHCPDISCOVER XID: 1124810679 (0x430B3FB7)
DHCDISCOVER ciaddr: 0.0.0.0
DHCDISCOVER yiaddr: 0.0.0.0
DHCDISCOVER siaddr: 0.0.0.0
DHCDISCOVER giaddr: 10.56.195.65
send_dhcp_packet result: 548

No (more) data received (nfound: 0)
Result=ERROR
Total responses seen on the wire: 0
Valid responses for this machine: 0
CRITICAL: No DHCPOFFERs were received.

[root@localhost libexec]# ip route
10.56.195.0/25 dev eth0 proto kernel scope link src 10.56.195.65
169.254.0.0/16 dev eth0 scope link metric 1002
default via 10.56.195.20 dev eth0

The target network with the Linux-DHCPD is 10.56.195.192/27. The default gateway (10.56.195.20) has the essentials about the route to 10.56.195.197:

[root@localhost libexec]# traceroute 10.56.195.197
traceroute to 10.56.195.197 (10.56.195.197), 30 hops max, 60 byte packets
1 catalyst6509-2-vlan50.gd.nrw.de (10.56.195.9) 0.511 ms 0.566 ms 0.633 ms
2 eas-linux2.gd.nrw.de (10.56.195.197) 0.461 ms 0.462 ms 0.458 ms

[root@localhost libexec]# ping 10.56.195.197
PING 10.56.195.197 (10.56.195.197) 56(84) bytes of data.
64 bytes from 10.56.195.197: icmp_seq=1 ttl=63 time=3.62 ms
64 bytes from 10.56.195.197: icmp_seq=2 ttl=63 time=1.94 ms
64 bytes from 10.56.195.197: icmp_seq=3 ttl=63 time=3.95 ms

Regards, Hans
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: DHCP monitoring

Post by lmiltchev »

This may be a firewall related issue. Make sure UDP ports 67 and 68 are open.
Note: UDP port 67 is used on the server site; UDP port 68 is used on the client site.
Be sure to check out our Knowledgebase for helpful articles and solutions!
hgw
Posts: 3
Joined: Fri Jul 25, 2014 1:03 am

Re: DHCP monitoring

Post by hgw »

No, I dont't think this might have been a firewall-Problem since both iptables services on nagios-server and dhcpd-box are down and there is no packetfiltering in place between them. The good news is, that I found a workaround:

After including the sub-network and the address of the nagios-box in the dhcpd.conf file (of course without an addess-range and with a very short lease-time of 60 sec.)

subnet 10.56.195.0 netmask 255.255.255.128 {
default-lease-time 60;
max-lease-time 60;
host nagios-xi {
fixed-address 10.56.195.65;
hardware ethernet 00:50:56:81:3E:F2;
}
}

in the dhcpd.conf file, the nagios-monitoring of the DHCPD started to work.

Regards, Hans
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: DHCP monitoring

Post by sreinhardt »

Interesting, I wonder if your dhcp server requires known macs before a response will be given. Regardless, glad this is working for you!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked