DNS problem : ping doesn't recognize hostname

Login or Register for Dates, Times and to Reply

Thread Tools Search this Thread
# 1  
DNS problem : ping doesn't recognize hostname

I have vmware on my windows PC ( hostname : acer ).
vmware has RHEL 7 ( hostname : rhel7 ) installed recently.

RHEL IP configuration
IP :
Netmask :

ssh to rhel7 works from acer using putty

cat /etc/resolv.conf

host file of acer has the entry
Code: acer

ping to acer from rhel 7 does not work.
[root@rhel7 ~]# ping acer
ping: unknown host acer

Last edited by rbatte1; 10-26-2016 at 10:24 AM.. Reason: Added CODE tags for file content
# 2  
So is acer the DNS server? That's what resolv.conf is configured as.

Your ping failure indicates that either there's no route to the DNS server (, the DNS service is not running on that server, or the DNS service does not know about acer.

What happens if you


from RHEL?

Your entry in /etc/hosts on RHEL for acer should allow it to resolve the name acer within the RHEL OS without reference to the DNS server.

Last edited by hicksd8; 02-13-2016 at 01:19 PM..
# 3  
Originally Posted by hiten.r.chauhan
host file of acer has the entry acer
That should be the host file on rhel7 as a fallback in case the name service call fails.
# 4  

ping to from RHEL works

[root@rhel7 ~]# ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=64 time=0.588 ms
64 bytes from icmp_seq=2 ttl=64 time=0.566 ms
64 bytes from icmp_seq=3 ttl=64 time=0.829 ms
--- ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.566/0.661/0.829/0.119 ms
[root@rhel7 ~]#

The host PC ( windows - acer ) where VM is installed maintains the list of hostname and ips in its host file. As such it is not a "so called DNS server", but since it maintains the list in host file and is specified as name server then my understanding is that it should search in the host file of acer (

As per your recommendation I have added acer in the host file of RHEL.
RHEL host file now looks like.

[root@rhel7 ~]# cat /etc/hosts   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6     acer   rhel7
[root@rhel7 ~]#

Now the ping using hostname works fine

[root@rhel7 ~]# ping acer
PING acer ( 56(84) bytes of data.
64 bytes from acer ( icmp_seq=1 ttl=64 time=0.523 ms
64 bytes from acer ( icmp_seq=2 ttl=64 time=0.653 ms
64 bytes from acer ( icmp_seq=3 ttl=64 time=0.608 ms
--- acer ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 0.523/0.594/0.653/0.060 ms
[root@rhel7 ~]#

But I have one more entry of ubuntu in host file of acer ( ) . Host file of acer looks like
Code:      acer rhel7 ubuntu15

ping to ubuntu does not work from rhel7

[root@rhel7 ~]# ping ubuntu15
ping: unknown host ubuntu15
[root@rhel7 ~]#

Last edited by hiten.r.chauhan; 02-13-2016 at 09:47 AM..
# 5  
So - what would you infer from these facts?
# 6  
Thanks Rudi for the reply.

I think somehow rhel is not able to contact acer when name resolution is required.
Some how rhel is not able to findout which is the name server ?
Do you have any clue what can be the reason ?
# 7  
1) How did you manage to ping acer?
2) Sure acer is a name server?
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #630
Difficulty: Medium
According to Lifewire, as of November 1, 2018, a total of more than 3.2 billion iPhones had been sold.
True or False?

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Value of variable is NULL, but test doesn't seem to recognize

Hello, Unix-forums! My problem: read -p "Enter any number, please" number sleep 1 echo $number | tr -d 0-9 test -z $number && echo "Thank you" || echo "This is not a number"Test always displays "This is not a number". It doesn't matter if I entered a or 1. But if I order echo... (2 Replies)
Discussion started by: intelinside
2 Replies

2. Shell Programming and Scripting

Expect doesn't recognize a password prompt

Hi. Here is beginning of my script #!/usr/local/bin/expect -- set timeout 15 spawn /usr/local/account.sh -n modify expect "Password:" {send "mypassword\r"} But due to some terminal control sequences (or something else, dunno exactly) my password prompt is looking like this: and expect... (3 Replies)
Discussion started by: urello
3 Replies

3. UNIX for Advanced & Expert Users

ping by hostname not working

anyone ever seen this problem: I can ping the server by IP address but I can't by hostname. nslookup is working and dns query is ok. # nslookup mwxnsb24 Server: Address: Name: mwxnsb24 Address: # ping... (8 Replies)
Discussion started by: linuxgeek
8 Replies

4. AIX

Ping by hostname

Hello everyone I have a partition with a problem with ping. If I do a ping by ip for example ping I got no problem but If I ping by hostname for example ping partition1 take almost a minute to respond me. I have Aix 5.3 and I have another 19 partitions with no problem. The only... (5 Replies)
Discussion started by: lo-lp-kl
5 Replies

5. Solaris

Can't ping using hostname on Solaris 10

I recently installed Solaris 10 on my Sun workstation. I cannot ping using hostname from another computer on the same network. But I can ping using the IP address. Also I can ping other systems using their hostnames. Can anyone give some information regarding how to resolve this issue. (4 Replies)
Discussion started by: alpha123
4 Replies

6. Solaris

cannot ping by hostname

Hi All, My current setup is: 1x Windows Server (Windows 2000 server) 1x Unix Server 2x Windows machine 3x Unix Terminals (Hostnames = A, B and C) Problem The problem iam having is Unix terminal C cannot be ping across by Unix terminal A or B or Unix server by using the hostname. Unix... (1 Reply)
Discussion started by: tlee
1 Replies

7. HP-UX

HP-UX 11.11: X doesn't recognize mouse and keyboard

hi folks, i've got a blank hp visualize C3000 workstation and installed HP-UX 11.11. When I want to start X, I get the following error message: # X Fatal server error: Couldn't open X pointer device! Is one attached? I've connected an mouse and a keyboard with an usb/ps2 connector.... (5 Replies)
Discussion started by: grisu
5 Replies

8. HP-UX

UX 11iV2 - No ping by hostname

Hi. I just installed the HP-UX 11i V2. I have problems with CDE - it is inoperative (after logon there is a message box: messaging system failure - or something like that, it asks to check /etc/hosts and network settings). nslookup works by hostname and IP, hostname shown the correct... (7 Replies)
Discussion started by: netwalker
7 Replies

9. Shell Programming and Scripting

Doesn't recognize the mv command

I'm nearly finished my program i've got everything in place and than when i run it it comes back with the reply mv: command not found. This is the code that seems to be causing the problem. elif then echo "There are more than one '$1' files in the system." echo "Please... (2 Replies)
Discussion started by: zoolz
2 Replies

Featured Tech Videos