Article 56TG4 DHCP Failover and DDNS

DHCP Failover and DDNS

by
elst
from LinuxQuestions.org on (#56TG4)
Hello everyone!
I'm a newbie here and with Linux.
I explain my situation, I have a school projet in Linux to do.
I'm trying to do a dhcp failover with DDNS. I have a Debian and Centos. When I restart the services, in both servers, everything seems ok, but when I start a client I have an "unexpected error". I search everywhere but I can not understand (find) the problem.
If someone can help me I'll appreciate it.
Thank you for the help!

Debian dhcp.conf
authoritative;
log-facility local7;
failover peer "failover" {
primary;
address 192.168.2.250;
port 519;
peer address 192.168.2.251;
peer port 520;
max-response-delay 60;
max-unacked-updates 10;
mclt 3600;
split 128;
load balance max seconds 3;
}
ddns-updates on;
ddns-update-style standard;
ddns-domainname "tux.labo";
ddns-rev-domainname "2.168.192.in-addr.arpa";
include "/etc/dhcp/tux.key";

zone tux.labo {
primary 192.168.2.250;
key tux-key;
}

zone 2.168.192.in-addr.arpa. {
primary 192.168.2.250;
key tux-key;
}

subnet 192.168.2.0 netmask 255.255.255.0 {
option domain-name-servers 192.168.2.250, 192.168.2.251;
option domain-name "tux.labo";
option routers 192.168.2.254;
default-lease-time 600;
max-lease-time 7200;
pool {
failover peer "failover";
range 192.168.2.1 192.168.2.100;
}
}

Restart bind9
aout 11 10:47:44 srv-deb named[768]: automatic empty zone: B.E.F.IP6.ARPA
aout 11 10:47:44 srv-deb named[768]: automatic empty zone: 8.B.D.0.1.0.0.2.IP6.ARPA
aout 11 10:47:44 srv-deb named[768]: automatic empty zone: EMPTY.AS112.ARPA
aout 11 10:47:44 srv-deb named[768]: automatic empty zone: HOME.ARPA
aout 11 10:47:44 srv-deb named[768]: none:106: 'max-cache-size 90%' - setting to 888MB (out of 98
aout 11 10:47:44 srv-deb named[768]: configuring command channel from '/etc/bind/rndc.key'
aout 11 10:47:44 srv-deb named[768]: command channel listening on 127.0.0.1#953
aout 11 10:47:44 srv-deb named[768]: configuring command channel from '/etc/bind/rndc.key'
aout 11 10:47:44 srv-deb named[768]: command channel listening on ::1#953
aout 11 10:47:44 srv-deb named[768]: managed-keys-zone: loaded serial 7
aout 11 10:47:44 srv-deb named[768]: reverse.dns:12: ignoring out-of-zone data (250)
aout 11 10:47:44 srv-deb named[768]: reverse.dns:13: ignoring out-of-zone data (251)
aout 11 10:47:44 srv-deb named[768]: zone 2.168.192.in-addr.arpa/IN: loaded serial 29
aout 11 10:47:44 srv-deb named[768]: zone tux.labo/IN: loaded serial 53
aout 11 10:47:44 srv-deb named[768]: all zones loaded
aout 11 10:47:44 srv-deb systemd[1]: Started BIND Domain Name Server.
-- Subject: L'unite (unit) bind9.service a termine son demarrage
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- L'unite (unit) bind9.service a termine son demarrage, avec le resultat done.
aout 11 10:47:44 srv-deb named[768]: running
aout 11 10:47:44 srv-deb named[768]: zone 2.168.192.in-addr.arpa/IN: sending notifies (serial 29)
aout 11 10:47:44 srv-deb named[768]: zone tux.labo/IN: sending notifies (serial 53)

Centos - dhcp.conf
authoritative;

failover peer "failover" {
secondary;
address 192.168.2.251;
port 520;
peer address 192.168.2.250;
peer port 519;
max-response-delay 60;
max-unacked-updates 10;
load balance max seconds 3;
}

ddns-updates on;
ddns-update-style standard;
ddns-domainname "tux.labo";
ddns-rev-domainname "2.168.192.in-addr.arpa";

zone tux.labo {
primary 192.168.2.250;
}

zone 2.168.192.in-addr.arpa {
primary 192.168.2.250;
}

subnet 192.168.2.0 netmask 255.255.255.0 {
option domain-name-servers 192.168.2.251, 192.168.2.250;
option domain-name "tux.labo";
option routers 192.168.2.254;
default-lease-time 600;
max-lease-time 7200;
pool {
failover peer "failover";
range 192.168.2.1 192.168.2.100;
}
}

journalctl -f Debian

out 11 10:47:44 srv-deb named[768]: zone 2.168.192.in-addr.arpa/IN: loaded serial 29
aout 11 10:47:44 srv-deb named[768]: zone tux.labo/IN: loaded serial 53
aout 11 10:47:44 srv-deb named[768]: all zones loaded
aout 11 10:47:44 srv-deb systemd[1]: Started BIND Domain Name Server.
aout 11 10:47:44 srv-deb named[768]: running
aout 11 10:47:44 srv-deb named[768]: zone 2.168.192.in-addr.arpa/IN: sending notifies (serial 29)
aout 11 10:47:44 srv-deb named[768]: zone tux.labo/IN: sending notifies (serial 53)
aout 11 10:49:39 srv-deb dhcpd[722]: DHCPREQUEST for 192.168.2.2 from 08:00:27:43:a3:01 (edgar-PC) via enp0s3
aout 11 10:49:39 srv-deb dhcpd[722]: DHCPACK on 192.168.2.2 to 08:00:27:43:a3:01 (edgar-PC) via enp0s3
aout 11 10:49:49 srv-deb dhcpd[722]: DHCPINFORM from 192.168.2.2 via enp0s3
aout 11 10:49:49 srv-deb dhcpd[722]: DHCPACK to 192.168.2.2 (08:00:27:43:a3:01) via enp0s3
aout 11 10:49:49 srv-deb named[768]: resolver priming query complete
aout 11 10:49:53 srv-deb named[768]: resolver priming query complete

journalctl -f Centos

-- Logs begin at Tue 2020-08-11 10:36:29 CEST. --
Aug 11 10:49:00 srv-centos named[1618]: zone tux.labo/IN: loaded serial 17
Aug 11 10:49:00 srv-centos named[1618]: zone localhost.localdomain/IN: loaded serial 0
Aug 11 10:49:00 srv-centos named[1618]: zone localhost/IN: loaded serial 0
Aug 11 10:49:00 srv-centos named[1618]: zone 2.168.192.in-addr.arpa/IN: loaded serial 14
Aug 11 10:49:00 srv-centos named[1618]: zone 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0. 0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 0
Aug 11 10:49:00 srv-centos named[1618]: all zones loaded
Aug 11 10:49:00 srv-centos named[1618]: running
Aug 11 10:49:00 srv-centos systemd[1]: Started Berkeley Internet Name Domain (DNS).
Aug 11 10:49:00 srv-centos named[1618]: zone tux.labo/IN: sending notifies (serial 17)
Aug 11 10:49:00 srv-centos named[1618]: zone 2.168.192.in-addr.arpa/IN: sending notifies (serial 14)
[U][B]Aug 11 10:49:31 srv-centos dhcpd[1496]: failover peer failover: unexpected error
Aug 11 10:49:39 srv-centos dhcpd[1496]: DHCPREQUEST for 192.168.2.2 from 08:00:27:43:a3:01 (edgar-PC) via enp0s3
Aug 11 10:49:39 srv-centos dhcpd[1496]: DHCPACK on 192.168.2.2 to 08:00:27:43:a3:01 (edgar-PC) via enp0s3

Because of this error, I can not update the zones file.
Thank you!latest?d=yIl2AUoC8zA latest?i=QitQ0V96hPs:GspV-a6XRZI:F7zBnMy latest?i=QitQ0V96hPs:GspV-a6XRZI:V_sGLiP latest?d=qj6IDK7rITs latest?i=QitQ0V96hPs:GspV-a6XRZI:gIN9vFwQitQ0V96hPs
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments