0

I have two linux servers and i'm trying to access them remotely. I know the ip of the first server but i forgot the ip of the other one.

I'm trying to use nslookup, I did

nslookup server2

and the output was:

Server:         192.168.2.1
Address:        192.168.2.1#53

Non-authoritative answer:
Name:   server2
Address: 90.222.143.15

and then i tried to use it again but with server1 and I got the same output...

Anyway, why is the output the same for both server? is nslookup the better option to find out the ip of the other linux server that i have? What other option can I use?

6
  • What protocol are you using to access the remote server..all common protocols allow both hostname and IP addresses to access them..also server1, server2 are not FQDN and the response is coming from 192.168.2.1..use nslookup server2.whatever.com 8.8.8.8 to check from Google's DNS, replace whatever.com with the actual domain name..
    – heemayl
    Aug 14, 2015 at 18:32
  • how can i know what the domain name is? Aug 14, 2015 at 18:59
  • does server1 and server2 have the same doman name ? if so use nslookup IP_of_server1 8.8.8.8 and you should get the domain name if it has one entered..
    – heemayl
    Aug 14, 2015 at 19:05
  • i only got this output Server: 8.8.8.8 Address: 8.8.8.8#53 ** server can't find 69.30.1.10.in-addr.arpa: NXDOMAIN Aug 14, 2015 at 19:22
  • that means it is not configured in the zone file..by the way it seems you have run nslookup 69.30.1.10 8.8.8.8 that means the IP of server1 is 69.30.1.10 and hence the IP of server2 should be 90.222.143.15 ..right ?
    – heemayl
    Aug 14, 2015 at 19:25

1 Answer 1

1

Try using ping instead:

$ ping server2

nslookup and ping use different techniques for name resolution.

An in-depth explanation for this can be found here: http://cbfive.com/ping-vs-nslookup/

1
  • i also tried that but its taking too long to ping Aug 14, 2015 at 18:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .