1

I built a new rPi3 with Stretch on it; its name is rpi3ohv2.

I set it up as 192.168.1.4 and later (Dec 28) changed it to .5 When I ping, dig and nslookup it, it comes up as .4

 nslookup rpi3ohv2.argylecourt.org Server: 192.168.1.7 Address: 192.168.1.7#53 Name: rPi3OHv2.argylecourt.org Address: 192.168.1.4 

I have a local DHCP server running on .7; neither its lease file (/var/lib/dhcp/dhcpd.leases) nor its config (/etc/dhcp/dhcpd.conf) does contain an entry for .4. However, the new machine rpi3ohv2 has a fixed/reserved entry:

 host node5 { # RaspberryPi Automation v2 -> rPi3OHv2 hardware ethernet B8:27:EB:71:48:B3; fixed-address 192.168.1.5; } 

Doing a local nslookup by IP on .5 says:

 nslookup 192.168.1.5 Server: 192.168.1.7 Address: 192.168.1.7#53 5.1.168.192.in-addr.arpa name = rpiautomation.argylecourt.org. 

... which is the name of the old machine (which I replaced with the new one, called rpi3ohv2).

The longer I think about this, this seems to be a DNS problem, not DHCP.

The TTLs are defined as follows:

 ;$ORIGIN . $TTL 86400 ; 1 day ;rpiserver.argylecourt.org. IN SOA rpiserver.argylecourt.org. hostmaster.argylecourt.org. ( @ IN SOA rpiserver.argylecourt.org. hostmaster.argylecourt.org. ( 2018020402 ; serial 8H ; refresh 4H ; retry 4W ; expire 1D ; minimum ) argylecourt.org. IN NS rpiserver.argylecourt.org. argylecourt.org. IN MX 10 rpiserver.argylecourt.org. ;$ORIGIN argylecourt.org. rpiserver IN A 192.168.1.7 www IN CNAME argylecourt.org 

[update] I have since updated the serial number to 2019020201 and the expire value to 2W, and ran the following commands on .5:

 # [2019-02-03 08:28] maxg@rpi3ohv2 ~ $ sudo systemd-resolve --flush-caches # [2019-02-03 08:29] maxg@rpi3ohv2 ~ $ nslookup rpi3ohv2 Server: 192.168.1.7 Address: 192.168.1.7#53 Name: rPi3OHv2.argylecourt.org Address: 192.168.1.4 # [2019-02-03 08:29] maxg@rpi3ohv2 ~ $ hostname rpi3ohv2 # [2019-02-03 08:29] maxg@rpi3ohv2 ~ $ hostname -i 192.168.1.5 # [2019-02-03 08:29] maxg@rpi3ohv2 ~ $ hostname -I 192.168.1.5 # [2019-02-03 08:29] maxg@rpi3ohv2 ~ $ nslookup 192.168.1.5 Server: 192.168.1.7 Address: 192.168.1.7#53 5.1.168.192.in-addr.arpa name = rpiautomation.argylecourt.org. 

... same outcome; as in, .5 still resolves to rPiAutmation (old machine), and rPi3OHv2 (new machine) resolves to .4

 # [2019-02-03 08:42] maxg@rpi3ohv2 ~ $ dig rpiautomation.argylecourt.org ; > DiG 9.10.3-P4-Raspbian > rpiautomation.argylecourt.org ;rpiautomation.argylecourt.org. IN A ; AUTHORITY SECTION: argylecourt.org. 86400 IN SOA rpiserver.argylecourt.org. hostmaster.argylecourt.org. 2017061536 28800 14400 604800 86400 ; SERVER: 192.168.1.7#53(192.168.1.7) ; WHEN: Sun Feb 03 08:43:11 AEST 2019 # [2019-02-03 08:43] maxg@rpi3ohv2 ~ $ dig rpi3ohv2.argylecourt.org ; > DiG 9.10.3-P4-Raspbian > rpi3ohv2.argylecourt.org ;rpi3ohv2.argylecourt.org. IN A ; ANSWER SECTION: rPi3OHv2.argylecourt.org. 3600 IN A 192.168.1.4 ; AUTHORITY SECTION: argylecourt.org. 86400 IN NS rpiserver.argylecourt.org. ; ADDITIONAL SECTION: rpiserver.argylecourt.org. 86400 IN A 192.168.1.7 

This is a DNS problem... is there a hidden cache file of sort?

I have now rebooted the "network services" machine .7 (hosting DNS and BIND9), and noticed that zone files with the old serial number have been loaded; yet they have been updated, and confirmed that with cat.

 # [2019-02-03 08:58] maxg@rpiserver ~ $ sudo service bind9 status ● bind9.service - BIND Domain Name Server Loaded: loaded (/lib/systemd/system/bind9.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2019-02-03 08:55:17 AEST; 6min ago Docs: man:named(8) Main PID: 494 (named) CGroup: /system.slice/bind9.service └─494 /usr/sbin/named -f -u bind Feb 03 08:55:20 rpiserver named[494]: managed-keys-zone: journal file is out of date: removing journal file Feb 03 08:55:20 rpiserver named[494]: managed-keys-zone: loaded serial 641 Feb 03 08:55:20 rpiserver named[494]: zone 0.in-addr.arpa/IN: loaded serial 1 Feb 03 08:55:20 rpiserver named[494]: zone localhost/IN: loaded serial 2 Feb 03 08:55:20 rpiserver named[494]: zone 127.in-addr.arpa/IN: loaded serial 1 Feb 03 08:55:20 rpiserver named[494]: zone 255.in-addr.arpa/IN: loaded serial 1 Feb 03 08:55:20 rpiserver named[494]: zone 1.168.192.in-addr.arpa/IN: loaded serial 2017061507 Feb 03 08:55:20 rpiserver named[494]: zone argylecourt.org/IN: loaded serial 2017061536 Feb 03 08:55:20 rpiserver named[494]: all zones loaded Feb 03 08:55:20 rpiserver named[494]: running # [2019-02-03 09:01] maxg@rpiserver ~ $ cd /etc/bind/zones/ # [2019-02-03 09:02] maxg@rpiserver /etc/bind/zones $ la total 16 drwxr-sr-x 2 root bind 4096 Feb 3 08:54 . drwxr-sr-x 3 root bind 4096 Feb 3 07:07 .. -rw-r--r-- 1 root bind 1202 Feb 3 08:28 argylecourt.org.db -rw-r--r-- 1 root bind 609 Feb 3 08:38 rev.1.168.192.in-addr.arpa 

Where do I need to look to fix this problem?

10
  • So, you are using a DHCP server, but you want to set a specific IP address for your machine? Commented Feb 2, 2019 at 20:30
  • yes; it has a server function, and needs a fixed IP. Commented Feb 2, 2019 at 20:36
  • Does the server's DHCP server know your machine's MAC address and does it associate that with a particular IP address in its configuration (that's how the DHCP servers I know work)? If not, then it may just hand out any address in the free pool. Commented Feb 2, 2019 at 20:40
  • Is the MAC address in the DHCP server's configuration correct and has the DHCP server been restarted or forced to reload it configuration since the configuration was updated with your static address? Also, how is the name server configured? Should it automatically be updated from the DHCP server somehow? Commented Feb 2, 2019 at 20:45
  • I have restarted both bind9 and dhcp. I have not made any config changes to the server providing these services on .7 other than editing /etc/dhcp/dhcpd.conf and changing the MAC address to the new machine. Commented Feb 2, 2019 at 20:50

1 Answer 1

1

I started digging further when I realised the old serial number. I looked up cat /etc/bind/named.conf.local, which pointed to [file "/var/lib/bind/argylecourt.org.db";] ... while I was updating /etc/bind/zones/argylecourt.org.db

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.