Forum Moderators: coopster

Message Too Old, No Replies

An IP which resolve into several remote_hosts...

... trough the gethostbyaddr() function.

         

Marino

1:01 pm on Apr 20, 2005 (gmt 0)

10+ Year Member



Hello,

Using the gethostbyaddr() function several times on the same IP, I've seen that it resolves in any of the sites that are hosted on the server. Peculiar...

I'd have thought that a gethostbyaddr() would have returned the name of the server -which I need. Is it some faking the admin has set, or what?

ergophobe

8:14 pm on Apr 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




Returns the host name of the Internet host specified by ip_address or a string containing the unmodified ip_address on failure

All you can get is the host name, not the server name, from a DNS lookup, which is what you're doing AFAIK.

Marino

6:57 am on Apr 25, 2005 (gmt 0)

10+ Year Member



Sorry, I was a little tired. I did mean hte host name, not the server name.

However, I still wonder how an IP can resolve into several host names.

Example : 216.113.2.*** will resolve into
lcmmtlcnai03-139.as.***.**
lcmmtlcnai03-139.***.**

Another : 217.238.91.*** will resolve into
pD9EE5***.dip.t-dialin.net
pD9EE5**.dip0.t-ipconnect.de

A last one : 61.16.218.*** will resolve into
hotwire-83-218-***-ind.hotwireindia.com
ptil-83-218-***-ind.primus-india.net

-mod : feel free to replace more letter by "*" if needed.

killroy

7:46 am on Apr 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's called multi-homing.

SN

KingMacro

8:45 am on Apr 25, 2005 (gmt 0)

10+ Year Member



if you use some tool to look at the results of the DNS lookup on the hostname you'll find that there are multiple records for it - it effectively resolves to multiple IP Addresses, its a very basic form of load ballancing used by many sites

for example...

[dnsstuff.com...]

Marino

8:51 am on Apr 25, 2005 (gmt 0)

10+ Year Member



Ok... Thanks a lot.