Re: How to get server name from server IP???

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Well, that's pretty confusing... If you know that google.com maps to
64.233.187.99, which it does, sending that IP to gethostbyaddr() should get
you "google.com". However, the DNS server, which is located "out there" on
the Internet, and which does the mapping when you type www.google.com to
give the IP address, does *not* know about YOURNEARBYXPBOX or what its IP
address might me. Therefore you can't use the normal DNS system from the
Internet to find that out. If you have a DNS server on your local network
that *does* know about YOURNEARBYXPBOX and what it's IP address it,
gethostbyaddr() should be able to use it. In order for that to work, the CE
device has to have the IP of your *local* DNS server (or WINS server, if
that's what you use), configured into its network setup.

Paul T.


"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:ONh2uyjaGHA.608@xxxxxxxxxxxxxxxxxxxxxxx
It most-probably happens because CE is using RDNS and there's no RDNS
server that knows about the machines that don't work. You should be able
to use RDNS to get a host name if you know what the host name for, say,
www.google.com maps to, for example, but probably not for YOURNEARBYXPBOX,
unless you're running a DNS server on a local machine.

Paul T.

"XPEnew" <new@xxxxxxx> wrote in message
news:eG73OujaGHA.4236@xxxxxxxxxxxxxxxxxxxxxxx
Hello, I use gethostbyaddr(), but I can't get other windows 2K/XP host
name,
BUT if I put CE own IP address, I CAN get it's name.

I don't know if because CE can't get other computer name at all???






"XPEnew" <new@xxxxxxx> wrote in message
news:OoG0fyHaGHA.4936@xxxxxxxxxxxxxxxxxxxxxxx
Thank you very much, just our customer insist not to provide server
name,
just IP address.
We need to login and go to a shared folder to copy some files.


"Ulrich Eckhardt" <eckhardt@xxxxxxxxxxxxxx> wrote in message
news:qho1i3-62h.ln1@xxxxxxxxxxxxxxxxxxxxxxxxx
XPEnew wrote:
I need make a program login to a Win2K/XP server, and user just
enter
server IP address, user name and password, NO server name(because
they
don't know).

How can I get server name from it's IP?

Typically, I'd start searching at the reverse case, which is
gethostbyname(). This then quickly leads to gethostbyaddr() which is
probably what you want.
BUT: users usually want to use the symbolic hostname, not the IP
address.
If, e.g. because you have no nameserver, you can't resolve from the
symbolic name to the IP, then in most cases you also won't be able to
resolve from the IP to the hostname either, so what you want might be
impossible.

Just curious, why does the server have to be specified by its IP
address?
Also, what protocol is the login procedure in? Maybe that supplies a
hostname as banner by itself when you contact the host.

Uli









.



Relevant Pages

  • Re: Restrict Dynamic Updates
    ... outlined in the article "HOW TO Configure DNS for Internet Access in ... Windows Server 2003", realizing that that was not the initial intent ... internal DNS server host external public data. ... internal DNS server that hosts your internal AD infrastructure access from ...
    (microsoft.public.windows.server.dns)
  • [UNIX] Hardening the BIND DNS Server
    ... Hardening the BIND DNS Server ... Your Domain Name Service is the road sign to your systems on the Internet. ...
    (Securiteam)
  • Re: Can Internet Computers see my private address DNS server?
    ... To let your DNS server resolve these external names I typically just ... I would recommend using your 2003 server to perform your DHCP. ... and there are 6 clients. ... In the DNS server dialog box, I have entered my Internet Service ...
    (microsoft.public.windows.server.dns)
  • Re: Problem with ICW
    ... 825763 How to configure Internet access in Windows Small Business Server ... This newsgroup only focuses on SBS technical issues. ... On the DNS Server, create the DNS Forwarder to forward the external ...
    (microsoft.public.windows.server.sbs)
  • Re: Setting Up Home Network
    ... High Speed internet connection ... Network Printer which is already connected to the Wireless Router ... Wireless Router which connects, My Server, Printer and Wirless Laptop. ... The Internal DNS server will usually Forward ...
    (microsoft.public.windows.server.active_directory)