[jcifs] multiple DC via DNS

Michael B Allen mba2000 at ioplex.com
Fri Apr 22 07:39:24 GMT 2005


On Fri, 22 Apr 2005 09:08:49 +0200
"Frode E. Moe" <frode at CoreTrek.no> wrote:

> On Fri, Apr 22, 2005 at 08:50:48 +0200, Dirk Becker wrote:
> > Hi,
> > 
> > i tried to get a list of DC's via DNS rather than using WINS. I have a
> > DNS entry like this:
> > 
> > dcs.example.com.   10008   IN      A       10.11.11.41
> > dcs.example.com.   10008   IN      A       10.11.0.44
> > 
> > I set the jcifs loglevel to 10. Only the first DC (that is returned by
> > InetAddress.getByName()) was used, so my question is: Is fetching a
> > DC-list that way supported? 
> 
> Sun's Java in general has a pretty aggressive DNS cache built-in, which
> keeps resolved hosts around forever. You can try to disable the cache,
> see for example: 
> http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html#nct
> and the "InetAddress Caching" paragraph here:
> http://java.sun.com/j2se/1.4.2/docs/api/java/net/InetAddress.html

And make sure you make DNS first in jcifs.resolveOrder:

http://jcifs.samba.org/src/docs/resolver.html

Mike

-- 
IRC - where men are men, women are men, and the boys are FBI agents.


More information about the jcifs mailing list