<div dir="ltr">Holy smokes. The second you say that, and I look at my config I see I missed declaring peer port... wow, I have looked at this for almost a week and for the life of me could not figure it out. Consider hand slapped to forehead, and that's what fixed it.<div><br></div><div>Thanks!</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 28, 2014 at 10:46 AM, Gregory Sloop <span dir="ltr"><<a href="mailto:gregs@sloop.net" target="_blank">gregs@sloop.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div><div class="h5">
<br><br>
<br>
<table>
<tbody><tr>
<td width="2" bgcolor="#0000ff"><br>
</td>
<td><span style="font-family:'courier new';font-size:9pt">Hello,<br>
<br>
For the life of me, I am unable to figure out why my 2 dhcp servers will not talk to each other. I have done multiple searches and poured through as much as the list archives as I could to see if anyone else has run into this. Either I am poor at searching or I'm just unlucky in trying to find anything.<br>
<br>
None of this is production yet, I have set up an internal test to see how exactly dhcp failover will work and will it work with a physical server onsite and a virtual server as its backup. I have checked IP routing and firewalls and have seen nothing to stop them. Both machines are running Centos 6.5.<br>
<br>
Everything starts up, everything seems to be going OK, and my servers will just set at<br>
<br>
Oct 28 10:09:55 dhcpd: failover peer dhcp: I move from recover to startup<br>
Oct 28 10:10:10 dhcpd: failover peer dhcp: I move from startup to recover<br>
<br>
And nothing more. I have let this sit for a couple of days as well to see if the states will change, however, that has done nothing either. I have for the life me cannot figure out why this is. I know the boxes can reach other, I can ssh into either from either box, I can reach either server through omshell just fine as well. Which through omshell forcing the state change seems to do nothing for me as well.<br>
<br>
Here is how my Primary and Secondary are set up. If I have missed anything, please let me know. Thanks in advance for advice and guidance.<br>
<br>
<b>**** Primary Server ****<br>
<br>
dhcpd.conf<br>
<br>
</b>authoritative;<br>
default-lease-time 3600;<br>
max-lease-time 3600;<br>
<br>
# OMAPI Setup<br>
<br>
omapi-port 7911;<br>
omapi-key omapi_key;<br>
<br>
key omapi_key {<br>
algorithm hmac-md5;<br>
secret hey a key;<br>
}<br>
<br>
# Failover Configuration<br>
<br>
failover peer "dhcp" {<br>
primary;<br>
address </span><a style="font-family:'courier new';font-size:9pt" href="http://dhcp.example.net" target="_blank">dhcp.example.net</a><span style="font-family:'courier new';font-size:9pt">;<br>
port 647;<br>
peer address </span><a style="font-family:'courier new';font-size:9pt" href="http://dhcp2.example.net" target="_blank">dhcp2.example.net</a><span style="font-family:'courier new';font-size:9pt">;<br>
port 647;<br>
max-response-delay 60;<br>
max-unacked-updates 10;<br>
mclt 3600;<br>
split 128;<br>
load balance max seconds 3;<br>
}<br>
<br>
# Stub to make DHCP to start<br>
<br>
subnet xxx.xxx.xxx.xxx netmask 255.255.255.0 {}<br>
<br>
# DHCP Declarations<br>
<br>
subnet 172.16.101.0 netmask 255.255.255.0 {<br>
option routers 172.16.101.1;<br>
option subnet-mask 255.255.255.0;<br>
pool {<br>
failover peer "dhcp";<br>
range 172.16.101.2 172.16.101.254;<br>
deny dynamic bootp clients;<br>
}<br>
}<br>
<br>
<b>/etc/shorewall/rules<br>
<br>
</b>#DHCP Failover<br>
ACCEPT net fw tcp 647<br>
ACCEPT net fw tcp 67,68,69<br>
ACCEPT net fw udp 67,68,69<br>
<br>
<b>/var/log/messages<br>
<br>
</b>Oct 28 10:09:55 dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1<br>
Oct 28 10:09:55 dhcpd: Copyright 2004-2010 Internet Systems Consortium.<br>
Oct 28 10:09:55 dhcpd: All rights reserved.<br>
Oct 28 10:09:55 dhcpd: For info, please visit </span><a style="font-family:'courier new';font-size:9pt" href="https://www.isc.org/software/dhcp/" target="_blank">https://www.isc.org/software/dhcp/</a><br>
<span style="font-family:'courier new';font-size:9pt">Oct 28 10:09:55 dhcpd: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file<br>
Oct 28 10:09:55 dhcpd: Wrote 0 leases to leases file.<br>
Oct 28 10:09:55 dhcpd: Listening on LPF/eth0/00:25:90:6c:cf:90/</span><a style="font-family:'courier new';font-size:9pt" href="http://137.118.48.0/24" target="_blank">137.118.48.0/24</a><br>
<span style="font-family:'courier new';font-size:9pt">Oct 28 10:09:55 dhcpd: Sending on LPF/eth0/00:25:90:6c:cf:90/</span><a style="font-family:'courier new';font-size:9pt" href="http://137.118.48.0/24" target="_blank">137.118.48.0/24</a><br>
<span style="font-family:'courier new';font-size:9pt">Oct 28 10:09:55 dhcpd: Sending on Socket/fallback/fallback-net<br>
Oct 28 10:09:55 dhcpd: failover peer dhcp: I move from recover to startup<br>
Oct 28 10:10:10 dhcpd: failover peer dhcp: I move from startup to recover<br>
<br>
<b>/var/lib/dhcpd/dhcpd.leases<br>
<br>
</b># The format of this file is documented in the dhcpd.leases(5) manual page.<br>
# This lease file was written by isc-dhcp-4.1.1-P1<br>
<br>
<br>
failover peer "dhcp" state {<br>
my state recover at 4 2014/10/23 19:51:14;<br>
partner state unknown-state at 4 2014/10/23 19:51:14;<br>
}<br>
server-duid "\000\001\000\001\033\334\030\262\000%\220l\317\220";<br>
<br>
<br>
failover peer "dhcp" state {<br>
my state recover at 4 2014/10/23 19:51:14;<br>
partner state unknown-state at 4 2014/10/23 19:51:14;<br>
}<br>
<br>
failover peer "dhcp" state {<br>
my state recover at 4 2014/10/23 19:51:14;<br>
partner state unknown-state at 4 2014/10/23 19:51:14;<br>
}<br>
<br>
<b>**** Secondary Server ****<br>
<br>
dhcpd.conf<br>
<br>
</b>authoritative;<br>
default-lease-time 3600;<br>
max-lease-time 3600;<br>
<br>
# OMAPI Setup<br>
<br>
omapi-port 7911;<br>
omapi-key omapi_key;<br>
<br>
key omapi_key {<br>
algorithm hmac-md5;<br>
secret hey a key;<br>
}<br>
<br>
# Failover Configuration<br>
<br>
failover peer "dhcp" {<br>
secondary;<br>
address </span><a style="font-family:'courier new';font-size:9pt" href="http://dhcp2.example.net" target="_blank">dhcp2.example.net</a><span style="font-family:'courier new';font-size:9pt">;<br>
port 647;<br>
peer address </span><a style="font-family:'courier new';font-size:9pt" href="http://dhcp.example.net" target="_blank">dhcp.example.net</a><span style="font-family:'courier new';font-size:9pt">;<br>
port 647;<br>
max-response-delay 60;<br>
max-unacked-updates 10;<br>
mclt 3600;<br>
load balance max seconds 3;<br>
}<br>
<br>
# DHCP Declarations<br>
<br>
#stub to make DHCP start<br>
subnet xxx.xxx.xxx.xxx netmask 255.255.255.0 {}<br>
<br>
subnet 172.16.101.0 netmask 255.255.255.0 {<br>
option routers 172.16.101.1;<br>
option subnet-mask 255.255.255.0;<br>
pool {<br>
failover peer "dhcp";<br>
range 172.16.101.2 172.16.101.254;<br>
deny dynamic bootp clients;<br>
}<br>
}<br>
<br>
<b>/etc/shorewall/rules<br>
<br>
</b>#DHCP Failover<br>
ACCEPT net fw tcp 647<br>
ACCEPT net fw tcp 67,68,69<br>
ACCEPT net fw udp 67,68,69<br>
<br>
<b>/var/log/messages<br>
<br>
</b>Oct 28 10:09:57 dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1<br>
Oct 28 10:09:57 dhcpd: Copyright 2004-2010 Internet Systems Consortium.<br>
Oct 28 10:09:57 dhcpd: All rights reserved.<br>
Oct 28 10:09:57 dhcpd: For info, please visit </span><a style="font-family:'courier new';font-size:9pt" href="https://www.isc.org/software/dhcp/" target="_blank">https://www.isc.org/software/dhcp/</a><br>
<span style="font-family:'courier new';font-size:9pt">Oct 28 10:09:57 dhcpd: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file<br>
Oct 28 10:09:57 dhcpd: Wrote 0 leases to leases file.<br>
Oct 28 10:09:57 dhcpd: Listening on LPF/eth0/00:50:56:02:08:00/</span><a style="font-family:'courier new';font-size:9pt" href="http://137.118.42.0/24" target="_blank">137.118.42.0/24</a><br>
<span style="font-family:'courier new';font-size:9pt">Oct 28 10:09:57 dhcpd: Sending on LPF/eth0/00:50:56:02:08:00/</span><a style="font-family:'courier new';font-size:9pt" href="http://137.118.42.0/24" target="_blank">137.118.42.0/24</a><br>
<span style="font-family:'courier new';font-size:9pt">Oct 28 10:09:57 dhcpd: Sending on Socket/fallback/fallback-net<br>
Oct 28 10:09:57 dhcpd: failover peer dhcp: I move from recover to startup<br>
Oct 28 10:10:12 dhcpd: failover peer dhcp: I move from startup to recover<br>
<br>
<b>/var/lib/dhcpd/dhcpd.leases<br>
<br>
</b># The format of this file is documented in the dhcpd.leases(5) manual page.<br>
# This lease file was written by isc-dhcp-4.1.1-P1<br>
<br>
<br>
failover peer "dhcp" state {<br>
my state recover at 4 2014/10/23 19:51:14;<br>
partner state unknown-state at 4 2014/10/23 19:51:14;<br>
mclt 3600;<br>
}<br>
server-duid "\000\001\000\001\033\334\030\262\000PV\002\010\000";<br>
<br>
<br>
failover peer "dhcp" state {<br>
my state recover at 4 2014/10/23 19:51:14;<br>
partner state unknown-state at 4 2014/10/23 19:51:14;<br>
mclt 3600;<br>
}<br>
<br>
failover peer "dhcp" state {<br>
my state recover at 4 2014/10/23 19:51:14;<br>
partner state unknown-state at 4 2014/10/23 19:51:14;<br>
mclt 3600;<br>
}<br>
<br>
-- <br>
Jonathan Labbé<br>
<br>
</span></td>
</tr>
</tbody></table>
</div></div><span style="font-family:'Courier New';font-size:9pt">You need a "port" which is the port this DHCP server uses to listen for peer updates, AND [missing] a <br>
"peer port" which is what the other peer will use to listen.<br>
<br>
See: </span><a style="font-family:'Courier New';font-size:9pt" href="https://kb.isc.org/article/AA-00502/0/A-Basic-Guide-to-Configuring-DHCP-Failover.html" target="_blank">https://kb.isc.org/article/AA-00502/0/A-Basic-Guide-to-Configuring-DHCP-Failover.html</a> <br>
<br>
<span style="font-family:'Courier New';font-size:9pt">My guess is, they won't talk because you haven't configured the port/peer port directives properly.<br>
[At least that's what jumps out at me.]<br>
<br>
HTH<br>
<br>
-Greg<br>
<br>
</span></div><br>_______________________________________________<br>
dhcp-users mailing list<br>
<a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/dhcp-users" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Jonathan Labbé<div>Systems Engineer</div><div>NeoNova Network Services</div><div><a href="mailto:jlabbe@neonova.net" target="_blank">jlabbe@neonova.net</a></div><div>919-460-3330<br><div><br></div></div></div>
</div>