[jcifs] name resolving
eric.glass at gmail.com
Fri Sep 3 14:35:55 GMT 2004
There's a document which describes this scenario at:
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.
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>
> 126.96.36.199 epmw025<00>
> When I tried to connect to epmw025 host, then jcifs tried to connect to
> 188.8.131.52(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