I have two computers running OpenSUSE, one named linux5 with Leap 42.3, the other named linux6. I just installed Leap 15.3 on linux6 and it received a new IPv4 address from my Fritzbox.
When I now do
>ping linux6
on linux5, I get “Destination Host Unreachable” and it uses the old IP address (192.168.178.44 is used, correct is 192.168.178.35).
>ping6 linux6
works as expected, and so does
>ping 192.168.178.35
ncsd is running on linux5 and I found two hints on how to empty the cache, but one involved a file that doesn’t exist on my computer and the other involved an ‘invalidate’ option of nscd that doesn’t exist in my version.
Both “dig linux5” and “dig linux6” tell me the same thing in the authority section. Something interesting happened when I ran “dig linux6” again after switching on linux6 (the computer was off when I tried it the first time):
;; ANSWER SECTION:
linux6. 9 IN A 192.168.178.44
linux6. 9 IN A 192.168.178.35
;; AUTHORITY SECTION:
linux6. 9 IN NS fritz.box.
The first address in the answer section is the old, incorrect address, the second one is the new, correct one.
“ping linux6” still doesn’t work, however. Here is the output:
PING linux6.fritz.box (192.168.178.44) 56(84) bytes of data.
From linux5.fritz.box (192.168.178.20) icmp_seq=1 Destination Host Unreachable
I tried that, but there was only one entry with the correct new address. I just tried
ping linux6
again, with linux6 switched off. I know that can’t succeed, but it showed me the address it uses - still the wrong one.
I then logged into the Fritzbox (linux6 was switched off). I removed the unused connection for linux6 (even though it had the right address). I then switched on linux6 and it received the same address again.
I pinged linux6 again and it worked.
(I originally wrote that ping used IPv6 when I pinged linux6. I had logged into linux6 using ssh and pinged linux6 from linux6 when that happened.)
ping tries to contact destination. Try nslookup as an alternative, see below.
I then logged into the Fritzbox (linux6 was switched off). I removed the unused connection for linux6 (even though it had the right address). I then switched on linux6 and it received the same address again.I pinged linux6 again and it worked.
FRITZ!Boxes work best with static host names and DHCP:
**i3-4130:~ #** hostnamectl
** Static hostname: i3-4130 **
Icon name: computer-desktop
Chassis: desktop
Machine ID: b650d066970b487eaffea649babf596a
Boot ID: 326bc295784c4a2a8384ad30ec38e305
Operating System: openSUSE Tumbleweed
CPE OS Name: cpe:/o:opensuse:tumbleweed:20210825
Kernel: Linux 5.13.12-2-default
Architecture: x86-64
Hardware Vendor: To Be Filled By O.E.M.
Hardware Model: To Be Filled By O.E.M.
**i3-4130:~ #**
On boot host i3-4130 advertises its name and asks the FRITZ!Box for an address.