1

I thought there is a 1:n connection between IP and hostnames. However what I get is this

[me@neo ~]$ nslookup dozer
Server:         192.168.178.1
Address:        192.168.178.1#53

Name:   dozer.fritz.box
Address: 192.168.178.81
Name:   dozer.fritz.box
Address: 192.168.178.32

And here with getent

[me@neo ~]$ getent hosts dozer
192.168.178.81  dozer.fritz.box
192.168.178.32  dozer.fritz.box

That seems to be ok, however ping is not continuing with the correct IP

[me@neo]$ ping dozer
PING dozer (192.168.178.81) 56(84) bytes of data.
From neo.fritz.box (192.168.178.102) icmp_seq=1 Destination Host Unreachable
From neo.fritz.box (192.168.178.102) icmp_seq=2 Destination Host Unreachable
From neo.fritz.box (192.168.178.102) icmp_seq=3 Destination Host Unreachable
From neo.fritz.box (192.168.178.102) icmp_seq=4 Destination Host Unreachable
From neo.fritz.box (192.168.178.102) icmp_seq=5 Destination Host Unreachable
From neo.fritz.box (192.168.178.102) icmp_seq=6 Destination Host Unreachable
^C
--- dozer ping statistics ---
7 packets transmitted, 0 received, +6 errors, 100% packet loss, time 6220ms
pipe 4

UPDATE 1

I had a laptop (dozer)connect, first through ETHERNET (.81) then through WIFI (.32). Finally disconnected ETHERNET (.81).

For some reason my fritzbox (DNS) keeps the ETHERNET (.81).

I can reboot my fritzbox (DNS) and hope its gone. However I am wondering if this is ok state and thus a client issue or server (fritzbox) mistake?

UPDATE 2

If this is a client issue - How do I convince ping to take the second DNS entry?

8
  • but ping on hostname is blocking on the first non-existing IP
    – tswaehn
    Oct 22, 2019 at 12:22
  • If this is a site on your local network, then you may want to change some settings here. Are you in control of the network yourself?
    – TRiG
    Oct 22, 2019 at 12:25
  • @TRiG: just updated. please reconsider the "-1"
    – tswaehn
    Oct 22, 2019 at 12:30
  • Common practice, can be seen as the "poor man load-balancing". See Round-robin DNS
    – binarym
    Oct 22, 2019 at 12:34
  • 1
    yes, ok. but then ping should take just any working lookup. Instaed ping is sticking with the non-working lookup and does not continue to the next (at least in my case). I am wondering if there is some magic that needs to be enabled in my system.
    – tswaehn
    Oct 22, 2019 at 12:37

1 Answer 1

0

A site can be hosted on multiple servers. If DNS returns multiple A or AAAA records, a client is free to connect to any one of them. How this is managed is up to the site; ideally, all will return the same content.

This may be used to have multiple servers around the globe, so that clients connect to the one closest. It can also be done with anycast IP addresses, where there is just one IP address, but it routes to multiple different physical computers, depending on where you are in the world, but this is trickier to set up.

5
  • I am working in a local network. No balancing needed.
    – tswaehn
    Oct 22, 2019 at 12:40
  • If you're in control of the DNS, can you simply remove invalid entries?
    – TRiG
    Oct 22, 2019 at 13:06
  • sure, there is a manual way like reboot or deleting. still i have the feeling that something is wrong with the system or DNS.
    – tswaehn
    Oct 22, 2019 at 13:17
  • 1
    @tswaehen there is nothing really wrong, you just have a bad entry. If it was made by your dhcp server it will probably clear itself eventually but if your impatient you can probably clear it manually by rebooting the router
    – kicken
    Oct 22, 2019 at 14:37
  • 1
    looking at the answers it sounds like bad-luck :) however wouldnt that be cool if ping or any other program just takes the next valid lookup and gives me the correct answer?
    – tswaehn
    Oct 22, 2019 at 15:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .