By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,534 Members | 950 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,534 IT Pros & Developers. It's quick & easy.

GetHostbyAddress problem --?

P: n/a
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?
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
can u do one ip at a times until ip resolved.
Jerome Lavalley, MCSE wrote:
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?


Nov 21 '05 #2

P: n/a
No. I am only given one IP address and want the DNS entry that corresponds
with it.
Nov 21 '05 #3

P: n/a
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??
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.