Determine IP address of an alias not in HOSTS file?

1

We have an application that references the database connection via a common alias, let's say datatier, and futher that alias is generally stored in the HOSTS file. However, it's not in the HOSTS file on this server I'm working with.

Two questions:

  1. Where else could the alias be stored?
  2. Is there a way I can determine the IP anyway?

P.S. -- I've tried running an nslookup datatier to determine the IP address but that didn't work.

Thanks all!

Mike Perrenoud

Posted 2012-11-28T11:11:44.460

Reputation: 241

Answers

1

You can't use nslookup for things like hosts file entries. However, first idea coming to my mind is starting a simple ping: ping datatier

Even if the host doesn't answer or you cancel using Ctrl+C, it should print the IP address of the host as it's been resolved/determined by whatever means.

Mario

Posted 2012-11-28T11:11:44.460

Reputation: 3 685

OK, so that got me the IP address ... where else could that alias be stored? – Mike Perrenoud – 2012-11-28T11:18:03.730

It might be cached by Windows and possibly be returned by a non-standard DNS (i.e. not the ones set as the default DNS in your TCP/IP configuration). By default nslookup will only query the standard DNS servers. You could try clearing the cache using ipconfig /flushdns, then try pinging again. – Mario – 2012-11-28T11:21:18.847

OK, well I'll go down that road and see what I find -- however, you got me exactly what I needed, the IP address, thanks for your help Mario! – Mike Perrenoud – 2012-11-28T11:24:18.490

1

If nslookup isn't providing the answer, and it isn't in the hosts file, then netbios is the most likely resolution protocol being used given it is Windows.

Try nbtstat -a datatier

Paul

Posted 2012-11-28T11:11:44.460

Reputation: 52 173