DNS FQDN | Cannot ping hostnames but can ping hostnames + fqdn

  • 19 December 2017
  • 2 replies

Userlevel 3
Badge +16
From this beautiful copy & paste, you can see that I can ping my laptop "ford" by pinging the fqdn.

nutanix@NTNX-J10AMX4-A-CVM:$ ping ford.domain.localPING ford.domain.local ( 56(84) bytes of data.64 bytes from icmp_seq=1 ttl=128 time=3.05 ms64 bytes from icmp_seq=2 ttl=128 time=2.76 ms^C--- ford.domain.local ping statistics ---2 packets transmitted, 2 received, 0% packet loss, time 1661msrtt min/avg/max/mdev = 2.767/2.910/3.054/0.153 msnutanix@NTNX-J10AMX4-A-CVM:$ ping fordping: unknown host fordnutanix@NTNX-J10AMX4-A-CVM:$
Name Servers are set through the GUI
nutanix@NTNX-J10AMX4-A-CVM:$ cat -v /etc/resolv.conf# Auto generated by DnsConfig on Mon Dec 18 17:52:54 2017nameserver$
Cluster name is only pingable through fqdn
nutanix@NTNX-J10AMX4-A-CVM:$ ping nutanixping: unknown host nutanixnutanix@NTNX-J10AMX4-A-CVM:$ ping nutanix.domain.localPING nutanix.domain.local ( 56(84) bytes of data.64 bytes from icmp_seq=1 ttl=64 time=0.051 ms64 bytes from icmp_seq=2 ttl=64 time=3.10 ms^C--- nutanix.domain.local ping statistics ---2 packets transmitted, 2 received, 0% packet loss, time 1186msrtt min/avg/max/mdev = 0.051/1.577/3.103/1.526 msnutanix@NTNX-J10AMX4-A-CVM:$
nutanix@NTNX-J10AMX4-A-CVM:$ nslookup google.comServer: answer:Name: google.comAddress:$

Best answer by Chandru 19 December 2017, 20:59

View original

This topic has been closed for comments

2 replies

Userlevel 3
Badge +13
srslol That is normal. The CVM's don't have a domain so only FQDN will work. Normally pinging just the hostname works when you the computer is part of a domain or has domain search suffix configured. When you ping a hostname, at the backend dns resolver will automatically add the domain part to the hostname to make it as an FQDN and will ping the FQDN.
This will be clearly evident when you ping using the hostname from a PC joined to a domain. For example you can see the following ping by hostname,
PS C:UsersAdministrator> ping afsPinging afs.sol.local [10.xx.xx.xx] with 32 bytes of data:Though i pinged the hostname you can see the first line of the ping results say pinging fqdn, since the PC is part of the domain sol.local.

Since CVM is not part of any domain and has no dns search suffix configured it will not be able to ping using hostname. Excerpt from man page of resolv.conf

Userlevel 3
Badge +16
Ah, that does make sense. Thanks!