Article 5T6XH DHCP and DNS on different machines, can't ping client hostnames

DHCP and DNS on different machines, can't ping client hostnames

by
usr456
from LinuxQuestions.org on (#5T6XH)
Hello, i am very new to Linux, follwing a training course intro to Linux. But it's Christmas hollidays so, can't contact my trainer... And he gave us this assigment which is a bit ahead of what i can do... (sorry for my weird english btw)
----------------------------
Well my problem is basically summed up in the title:

I have Bind 9 installed on Ubuntu and a DHCP server on CentOS, all my servers are static and have their DNS pointed to the DNS server.
But none of them can ping the clients (Mint and Win10) by their hostnames (the servers do ping each others fine).

It's just server to client's hostnames. Doesn't ping. Zone file doesn't update.

Been driving me crazy for 5 days now, tbh...
Anyway here are the configurations:

Here's how i've configured my named.conf.local:
Code://
zone "testing.local" IN {
type master;
file "/var/cache/bind/db.testing.local";
allow-update { key rndc-key; };
allow-transfer { 127.0.0.1; };
};

zone "16.16.172.in-addr.arpa" IN {
type master;
file "/var/cache/bind/rev.testing.local";
allow-update { key rndc-key; };
allow-transfer { 127.0.0.1; };
};db.testing.local
Code:;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA DNS.testing.local. root.testing.local. (
24032026 ; Serial
120 ; Refresh
1d ; Retry
4w ; Expire
1d ) ; Negative Cache TTL
;
@ IN NS DNS.testing.local.
DNS IN A 172.16.16.251
DHCP IN A 172.16.16.252
webftp IN A 172.16.16.253
intra.testing.local. IN A 172.16.16.253
ftp.testing.local. IN A 172.16.16.253
Router IN A 172.16.16.254rev.testing.local
Code:;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA DNS.testing.local. root.testing.local. (
24032021 ; Serial
1w ; Refresh
1d ; Retry
4w ; Expire
1d ) ; Negative Cache TTL
;
@ IN NS DNS.
251 IN PTR DNS.testing.local.
252 IN PTR DHCP.testing.local.
253 IN PTR webftp.testing.local.
253 IN PTR intra.testing.local.
253 IN PTR ftp.testing.local.
254 IN PTR router.testing.local.Someone told me i should put the FQDN instead of just "DNS."

dhcpd.conf
Code:# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#

# option definitions common to all supported networks...
option domain-name "testing.local";
option domain-name-servers 172.16.16.251;

default-lease-time 432000;
max-lease-time 604800;

# Use this to enble / disable dynamic dns updates globally.
ddns-update-style interim;
ddns-updates on;
ignore client-updates;
update-static-leases on;
allow-unknown-clients;
key "rndc-key" {
algorithm hmac-md5;
secret "4uRcOS7dyUsswXQYZU3oAg==";
};

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

# No service will be given on this subnet, but declaring it helps the
# DHCP server to understand the network topology.

subnet 172.16.16.0 netmask 255.255.255.0 {
}

# This is a very basic subnet declaration.

subnet 172.16.16.0 netmask 255.255.255.0 {
range 172.16.16.20 172.16.16.60;
option routers 172.16.16.254;
option domain-name-servers 172.16.16.251;
option domain-name "dns.testing.local.";
ddns-domainname "dns.testing.local.";
ddns-rev-domainname "in-addr.arpa.";
}

# This declaration allows BOOTP clients to get dynamic addresses,
# which we don't really recommend.

#subnet 10.254.239.32 netmask 255.255.255.224 {
# range dynamic-bootp 10.254.239.40 10.254.239.60;
# option broadcast-address 10.254.239.31;
# option routers rtr-239-32-1.example.org;
#}

# A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 {
# range 10.5.5.26 10.5.5.30;
# option domain-name-servers ns1.internal.example.org;
# option domain-name "internal.example.org";
# option routers 10.5.5.1;
# option broadcast-address 10.5.5.31;
# default-lease-time 600;
# max-lease-time 7200;
#}

# Hosts which require special configuration options can be listed in
# host statements. If no address is specified, the address will be
# allocated dynamically (if possible), but the host-specific information
# will still come from the host declaration.

#host passacaglia {
# hardware ethernet 0:0:c0:5d:bd:95;
# filename "vmunix.passacaglia";
# server-name "toccata.fugue.com";
#}

# Fixed IP addresses can also be specified for hosts. These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
#host fantasia {
# hardware ethernet 08:00:07:26:c0:a5;
# fixed-address fantasia.fugue.com;
#}

# You can declare a class of clients and then do address allocation
# based on that. The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.

#class "foo" {
# match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
#}

#shared-network 224-29 {
# subnet 10.17.224.0 netmask 255.255.255.0 {
# option routers rtr-224.example.org;
# }
# subnet 10.0.29.0 netmask 255.255.255.0 {
# option routers rtr-29.example.org;
# }
# pool {
# allow members of "foo";
# range 10.17.224.10 10.17.224.250;
# }
# pool {
# deny members of "foo";
# range 10.0.29.10 10.0.29.230;
# }
#}

zone testing.local. {
primary 172.16.16.251;
key rndc-key;
}
zone 16.16.172.in-arpa. {
primary 172.16.16.251;
key rndc-key;
}This same person also asked me he why i have the zone statements at the end here, which i replied: i have no goddamn clue. lol.

I did a " dig @localhost axfr "
This is what i get:
Code:; <<>> DiG 9.9.5-3ubuntu0.19-Ubuntu <<>> @localhost testing.local axfr
; (1 server found)
;; global options: +cmd
testing.local. 604800 IN SOA DNS.testing.local. root.testing.local. 24032026 120 86400 2419200 86400
testing.local. 604800 IN NS DNS.testing.local.
DHCP.testing.local. 604800 IN A 172.16.16.252
DNS.testing.local. 604800 IN A 172.16.16.251
ftp.testing.local. 604800 IN A 172.16.16.253
intra.testing.local. 604800 IN A 172.16.16.253
Routeur.testing.local. 604800 IN A 172.16.16.254
webftp.testing.local. 604800 IN A 172.16.16.253
testing.local. 604800 IN SOA DNS.testing.local. root.testing.local. 24032026 120 86400 2419200 86400
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Dec 19 10:00:30 CET 2021
;; XFR size: 9 records (messages 1, bytes 249)log for dhpcd:
Code:Dec 18 22:41:32 dhcp dhcpd: Internet Systems Consortium DHCP Server 4.2.5
Dec 18 23:13:15 dhcp dhcpd: Internet Systems Consortium DHCP Server 4.2.5
Dec 18 23:13:15 dhcp dhcpd: Copyright 2004-2013 Internet Systems Consortium.
Dec 18 23:13:15 dhcp dhcpd: All rights reserved.
Dec 18 23:13:15 dhcp dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Dec 18 23:13:15 dhcp dhcpd: Warning: subnet 172.16.16.0/24 overlaps subnet 172.16.16.0/24
Dec 18 23:13:15 dhcp dhcpd: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Dec 18 23:13:15 dhcp dhcpd: Internet Systems Consortium DHCP Server 4.2.5
Dec 18 23:13:15 dhcp dhcpd: Copyright 2004-2013 Internet Systems Consortium.
Dec 18 23:13:15 dhcp dhcpd: All rights reserved.
Dec 18 23:13:15 dhcp dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Dec 18 23:13:15 dhcp dhcpd: Wrote 8 leases to leases file.
Dec 18 23:13:15 dhcp dhcpd: Listening on LPF/ens33/00:0c:29:7c:2e:8e/172.16.16.0/24
Dec 18 23:13:15 dhcp dhcpd: Sending on LPF/ens33/00:0c:29:7c:2e:8e/172.16.16.0/24
Dec 18 23:13:15 dhcp dhcpd: Sending on Socket/fallback/fallback-net
Dec 18 23:47:27 dhcp dhcpd: DHCPREQUEST for 192.168.1.105 from 00:0c:29:62:32:2e via ens33: wrong network.
Dec 18 23:47:27 dhcp dhcpd: DHCPNAK on 192.168.1.105 to 00:0c:29:62:32:2e via ens33
Dec 18 23:47:27 dhcp dhcpd: DHCPDISCOVER from 00:0c:29:62:32:2e (CLmint) via ens33
Dec 18 23:47:28 dhcp dhcpd: DHCPOFFER on 172.16.16.30 to 00:0c:29:62:32:2e (CLmint) via ens33
Dec 18 23:47:28 dhcp dhcpd: DHCPREQUEST for 172.16.16.30 (172.16.16.252) from 00:0c:29:62:32:2e (CLmint) via ens33
Dec 18 23:47:28 dhcp dhcpd: DHCPACK on 172.16.16.30 to 00:0c:29:62:32:2e (CLmint) via ens33
Dec 18 23:47:28 dhcp dhcpd: Unable to add forward map from CLmint.testing.local to 172.16.16.30: tsig indicates error
Dec 18 23:47:34 dhcp dhcpd: DHCPREQUEST for 172.16.16.30 from 00:0c:29:62:32:2e (CLmint) via ens33
Dec 18 23:47:34 dhcp dhcpd: DHCPACK on 172.16.16.30 to 00:0c:29:62:32:2e (CLmint) via ens33
Dec 18 23:47:34 dhcp dhcpd: Unable to add forward map from CLmint.testing.local to 172.16.16.30: tsig indicates error
Dec 18 23:51:45 dhcp dhcpd: DHCPREQUEST for 172.16.16.30 from 00:0c:29:62:32:2e (CLmint) via ens33
Dec 18 23:51:45 dhcp dhcpd: DHCPACK on 172.16.16.30 to 00:0c:29:62:32:2e (CLmint) via ens33
Dec 18 23:51:45 dhcp dhcpd: Unable to add forward map from CLmint.testing.local to 172.16.16.30: tsig indicates error
Dec 19 09:41:24 dhcp nm-dispatcher: find-scripts: Cannot execute '/etc/NetworkManager/dispatcher.d/12-dhcpd': not executable by owner.
Dec 19 09:41:24 dhcp nm-dispatcher: find-scripts: Cannot execute '/etc/NetworkManager/dispatcher.d/12-dhcpd': not executable by owner.
Dec 19 09:41:25 dhcp nm-dispatcher: find-scripts: Cannot execute '/etc/NetworkManager/dispatcher.d/12-dhcpd': not executable by owner.
Dec 19 09:41:25 dhcp nm-dispatcher: find-scripts: Cannot execute '/etc/NetworkManager/dispatcher.d/12-dhcpd': not executable by owner.
Dec 19 09:41:26 dhcp dhcpd: Internet Systems Consortium DHCP Server 4.2.5
Dec 19 09:41:26 dhcp dhcpd: Copyright 2004-2013 Internet Systems Consortium.
Dec 19 09:41:26 dhcp dhcpd: All rights reserved.
Dec 19 09:41:26 dhcp dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Dec 19 09:41:26 dhcp dhcpd: Warning: subnet 172.16.16.0/24 overlaps subnet 172.16.16.0/24
Dec 19 09:41:26 dhcp dhcpd: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Dec 19 09:41:26 dhcp dhcpd: Internet Systems Consortium DHCP Server 4.2.5
Dec 19 09:41:26 dhcp dhcpd: Copyright 2004-2013 Internet Systems Consortium.
Dec 19 09:41:26 dhcp dhcpd: All rights reserved.
Dec 19 09:41:26 dhcp dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Dec 19 09:41:26 dhcp dhcpd: Wrote 8 leases to leases file.
Dec 19 09:41:26 dhcp dhcpd: Listening on LPF/ens33/00:0c:29:7c:2e:8e/172.16.16.0/24
Dec 19 09:41:26 dhcp dhcpd: Sending on LPF/ens33/00:0c:29:7c:2e:8e/172.16.16.0/24
Dec 19 09:41:26 dhcp dhcpd: Sending on Socket/fallback/fallback-net
Dec 19 09:41:45 dhcp dhcpd: DHCPREQUEST for 172.16.16.30 from 00:0c:29:62:32:2e (CLmint) via ens33
Dec 19 09:41:45 dhcp dhcpd: DHCPACK on 172.16.16.30 to 00:0c:29:62:32:2e (CLmint) via ens33
Dec 19 09:41:45 dhcp dhcpd: Unable to add forward map from CLmint.testing.local to 172.16.16.30: tsig indicates errorLooks like my post is too long...latest?d=yIl2AUoC8zA latest?i=OhvkF0Hj8Ak:456hjhkvD_A:F7zBnMy latest?i=OhvkF0Hj8Ak:456hjhkvD_A:V_sGLiP latest?d=qj6IDK7rITs latest?i=OhvkF0Hj8Ak:456hjhkvD_A:gIN9vFw
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