[jcifs] name resolving

Eric Glass eric.glass at gmail.com
Fri Sep 3 14:35:55 GMT 2004


There's a document which describes this scenario at:

http://www.microsoft.com/windows2000/techinfo/reskit/en-us/cnet/cnbc_imp_wcug.asp


It states:


1. If one of the IP addresses in the name query response list is on
the same logical subnet as the local computer, that address is
selected. If more than one of the addresses meets the criteria, one is
picked at random from those that match.

2. If one of the IP addresses in the list is on the same logical
subnet as any binding of NetBT on the local computer, then that
address is selected. If multiple addresses meet this criteria, one is
picked at random.

3. If none of the IP addresses in the list is on the same subnet as
any binding of NetBT on the local computer, then an address is
selected at random from the list.

4. If none of the IP addresses in the list is on the same subnet as
any binding of NetBT on the local computer, an address is selected at
random from the list.


(note that 3 and 4 are the same except for the word "then", so there
are really 3 scenarios).  I don't know jCIFS uses the same logic or
not; you could try setting some of the "jcifs.netbios.*" properties to
see what it comes up with.


Eric



On Fri, 3 Sep 2004 16:03:14 +0300, Alexander Buloichik
<alexander_buloichik at epam.com> wrote:
> Hi, All !
> 
> I see one interesting problem with my program which uses jcifs.
> 
> Wins server returns two IP addresses for one name:
> 
> alex at epmw082t1:/tmp$ nmblookup epmw025
> querying epmw025 on 10.6.15.255
> 10.6.2.70 epmw025<00>
> 147.204.20.105 epmw025<00>
> 
> When I tried to connect to epmw025 host, then jcifs tried to connect to
> 147.204.20.105(second IP). All WIndows computers are tring to connecto to
> 10.6.2.70 address(first IP).
> Is it problem of jcifs ? What host should be connected in this case ?
> How can I setup jcifs for connect to first entry ?
> 
> WBR, Alex.
>


More information about the jcifs mailing list