I have a strange host lookup issue that I was wondering if anyone can explain and maybe even offer a fix. The computer I am doing this on is an MBP running OSX 10.8.5. On the network I also have a linux box with the hostname mediaserver. The router is a cisco wireless router at 192.168.1.1.
From OSX, I can find the linux box with nslookup:
However if I try to ping or ssh to the box, it says it cannot it:
The box is indeed alive:
I don't understand why if nslookup can find mediserver, nothing else will. By the way, I can also ssh into the linux box successfully using the IP address rather than the hostname.
From OSX, I can find the linux box with nslookup:
Code:
$ nslookup mediaserver
Server: 192.168.1.1
Address: 192.168.1.1#53
Name: mediaserver
Address: 192.168.1.113
However if I try to ping or ssh to the box, it says it cannot it:
Code:
$ ping mediasever
ping: cannot resolve mediasever: Unknown host
The box is indeed alive:
Code:
$ ping -c 1 192.168.1.113
PING 192.168.1.113 (192.168.1.113): 56 data bytes
64 bytes from 192.168.1.113: icmp_seq=0 ttl=64 time=3.420 ms
--- 192.168.1.113 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 3.420/3.420/3.420/0.000 ms
I don't understand why if nslookup can find mediserver, nothing else will. By the way, I can also ssh into the linux box successfully using the IP address rather than the hostname.