GetHostbyAddress problem --?

  • Thread starter Thread starter Jerome Lavalley, MCSE
  • Start date Start date
J

Jerome Lavalley, MCSE

I have an application that does a reverse lookup using
System.net.dns.gethostbyaddress, however I am encountering some problems.

If the application resolves the address of another machine it works fine,
but when resolving its own address, I get incorrect results.

SERVERA has 2 IP addresses (IPA1, IPA2). Each IP address has one DNS entry
(HOSTA1, HOSTA2)
SERVERB has 2 IP addresses (IPB1, IPB2). Each IP address has one DNS entry
(HOSTB1, HOSTB2)

If my application runs on SERVERA:

IPB1 resolves to HOSTB1
IPB2 resolves to HOSTB2

but...

IPA1 resolves to HOSTA1
IPA2 resolves to HOSTA1

If my application runs on SERVERB:

IPA1 resolves to HOSTA1
IPA2 resolves to HOSTA2

but...

IPB1 resolves to HOSTB1
IPB2 resolves to HOSTB1

Am I crazy?
 
No. I am only given one IP address and want the DNS entry that corresponds
with it.
 
Is no one else using this method?

I thought this method was using DNS, but clearly its not. Its doing
something different for the local machine. Any clue how I can force it to
use DNS??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top