DHCP error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

DHCP error

Post by benningtonr »

No DHCPOFFERs were received.

command = check_dhcp!

Any Ideas?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: DHCP error

Post by scottwilkerson »

Is there an active DHCP server on your network?

Does the DHCP server have available IP's to allocate?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: DHCP error

Post by benningtonr »

Yes and yes
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: DHCP error

Post by scottwilkerson »

it could be a firewall issue. To test you can do

Code: Select all

cd /usr/local/nagios/libexec
service iptables stop
./check_dhcp
service iptables start
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: DHCP error

Post by benningtonr »

I am guessing this is ok?

[root@helpdesk27 libexec]# service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules: [ OK ]
[root@helpdesk27 libexec]# ./check_dhcp
OK: Received 1 DHCPOFFER(s), max lease time = 0 sec.
[root@helpdesk27 libexec]# service iptables start
iptables: Applying firewall rules: [ OK ]
[root@helpdesk27 libexec]#
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: DHCP error

Post by lmiltchev »

Yes, this was a firewall issue. It's working now:
[root@helpdesk27 libexec]# ./check_dhcp
OK: Received 1 DHCPOFFER(s), max lease time = 0 sec.
I believe you need to open UDP ports 67 & 68 in iptables.
Be sure to check out our Knowledgebase for helpful articles and solutions!
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: DHCP error

Post by benningtonr »

i need to open them on the nagios?
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: DHCP error

Post by benningtonr »

[root@helpdesk27 ~]# iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:https
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: DHCP error

Post by scottwilkerson »

benningtonr wrote:i need to open them on the nagios?
Yes.

Run

Code: Select all

iptables -I INPUT -i eth0 -p udp --dport 67:68 --sport 67:68 -j ACCEPT
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
benningtonr
Posts: 524
Joined: Tue May 22, 2012 2:16 pm

Re: DHCP error

Post by benningtonr »

Great, that worked, thank you
Locked