Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ScoobyMcDoo

macrumors 65816
Original poster
Nov 26, 2007
1,188
37
Austin, TX
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:


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.
 
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:


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.

try this instead
ping mediasever.local
 
From OSX, I can find the linux box with nslookup:


Code:
$ nslookup [B][COLOR="Red"][SIZE="4"]mediaserver[/SIZE][/COLOR][/B]
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 [B][COLOR="red"][SIZE="4"]mediasever[/SIZE][/COLOR][/B]
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.
Corect speling is impotant.
 
Isn't the device name "mediaserver"?
Code:
ping mediasever.local

I hope that you are not using mediasever, but are using mediaserver.
(Spelling sux, eh?)

So
Code:
ping mediaserver.local
may work better?
 
Last edited:
LOL! Yep works much better when I spell it correctly. Sorry for the brain fart and thanks so much for the proof read!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.