The IP model will change in NT 5 (more Unix like) but the name issue will
continue to pose a problem.

Back when there was no names, each machine managed it's OWN name to ip
conversion: (aka /etc/hosts)

name servers came into play and we now have /etc/resolv.conf for unix
machines (although the history has 'yp' written all over it, change due to
the trademark or somthing, I didn't follow it back then).

SMB (NetBios) just convolutes the name model more..

What name? Netbios name, host name or DNS name?

The simple solution is to use the same name in all three cases -- Windows NT
kind of assumes you will do that as WINS resolution will give you problems
if you do not).

The order for normal IP name resolution on NT appears to be .../etc/hosts ->
WINS -> DNS.

If you make a NetBios name to IP resolution call, it goes to WINS (or who
ever is the local browse master, if no WINS server) ONLY. You can enable on
most Microsoft NBT (NetBios over TCP/IP) clients to include DNS as an
alternate method for resolution when the normal resolution fails, but this
is not enabled by default (it's labled enable DNS for WINS/Windows
Resolution). You can also manage your own WINS host list (i.e. Netbios name
to IP address resolution). The name of the file is LMHOST (which came from
the old IBM Lan Manager). The file on Win 3.x/9x is (windowsdir)\LMHOSTS.
The file on NT is not specified and you MUST point to it through the IP
setup screens. The normal location for it is
(winntdir)\system32\drivers\etc\lmhosts (which is where the other Unix like
files are also, hosts




-----Original Message-----
From: Christopher Hinds [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 13, 1998 10:02 AM
To: Mark Hofmann
Cc: java-linux
Subject: Re: Retrieving a fully qualified hostname under NT


Try using a reverse DNS lookup with that host's IP address , you should
get
a fully qualified host name from that. This obviously means you will
have to use the DNS protocol on an open socket. The problem with NT is
it is using
WINS ( NT DNS) to resolve the name and that name returned is a host name
known to the NT Promary Domain controller and the WINS Service.
Mark Hofmann wrote:

> Hi all,
>
> I've posted that question a few days ago to java.lang.programmer
> but got no response :-(
> But, since this problem is really bugging me, and there might be some
> people in this list that run there progs under NT and Linux, just as
> me,
> I hope to find a solution here.
> Anyway, here is the problem, easy and simple ....
>
> when I use
>         String
> localhostname=(InetAddress.getLocalHost()).getHostName();
> under Linux I get the fully qualified hostname, under NT just the
> local
> hostname, eg. host instead of host.my.domain.com
>
> Our admin says that its an NT feature/problem (you never know) because
> it
> stores both names separately and returns usually only the local
> hostname.
>
> Is there a workaround for that, so I can get the fully qualyfied
> hostname or
> do I just have to live with that? Or even better is our system
> misconfigured
> and I can tell our admin that he's wrong (which is always fun ;-) )
>
> Thanks in advance
>
>  Mark
>
> --
> M a r k  H o f m a n n
> Department of Computer Science
> University of Stellenbosch / South Africa
> phone: +27-82-7449880

Reply via email to