ping failed but nslookup worked

Moderator: cah

Post Reply
cah
General of the Army / Fleet Admiral / General of the Air Force
General of the Army / Fleet Admiral / General of the Air Force
Posts: 1342
Joined: Sun Aug 17, 2008 5:05 am

ping failed but nslookup worked

Post by cah »

From one of our HP-UX servers (laxm1317), nslookup (both forward and reverse lookup) works fine but ping doesn't.

Code: Select all

laxm1317:/># nslookup 10.0.16.142
Using /etc/hosts on:  laxm1317

looking up FILES
Name:    laxstg2
Address:  10.0.16.142

laxm1317:/># ping laxstg2
ping: unknown host laxstg2
After some digging, I found out the following lines were commented out in /etc/services:

Code: Select all

domain        53/tcp  nameserver     # Domain Name Service                     
domain        53/udp  nameserver     # 


Once I removed the comment, it works now.

Code: Select all

laxm1317:/etc># ping laxstg2                           
PING laxstg2: 64 byte packets
64 bytes from 10.0.16.142: icmp_seq=0. time=0. ms
64 bytes from 10.0.16.142: icmp_seq=1. time=0. ms

----laxstg2 PING Statistics----
2 packets transmitted, 2 packets received, 0% packet loss
round-trip (ms)  min/avg/max = 0/0/0
CAH, The Great
Post Reply