[Samba] How does Samba find a domain controller?
Gerald (Jerry) Carter
jerry at samba.org
Fri May 5 12:52:55 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Gautier, B (Bob) wrote:
> During some recent testing of winbindd (3.0.22) in
> a multi-domain, multi-DC AD context, the AD expert I was
> working with was very interested in winbindd's choice
> of domain controller (it apparently was not choosing
> the one(s) AD-expert expected).
>
> I understand that Windows domain members have an algorithm based
> on DNS SRV records and IP address comparison, and I've seen
> some code posted in the last few days that suggests this
> is only 'under development' for Samba.
>
> Can someone spell out to me the way Samba looks up DCs
> and chooses amongst them? For extra points: is there a
> way we can influence the choice?
ok. Here goes. This applies to >= 3.0.14.
The process breaks down into 2 parts: finding a list of
domain controllers, and then choosing which one to contact.
Finding a DC is dependent on the 'name resolve order
parameter' value. NetBIOS lookups search for the
DOMAIN<0x1c>. DNS lookups query for _ldap._tcp.<domain>.
Samba 3.0.23 will query the correct _ldap._tcp.dc._msdcs.<domain>
name and includes affinity for a server once connected
so that for example winbindd will reconnect to the server
used during the domain join to avoid lags in replication
delays between DCs.
Once you have a list of IP addresses, winbindd will spray
all the DCs with a socket connect and select the first
one that replies.
cheers, jerry
=====================================================================
Samba ------- http://www.samba.org
Centeris ----------- http://www.centeris.com
"What man is a man who does not make the world better?" --Balian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFEW0qnIR7qMdg1EfYRAoOAAKCfDu9BZuDTPgdTEVVxI8MEeDwXDgCgkNkC
7xchFyDigXLW6hiCVQ+1d5E=
=kFzY
-----END PGP SIGNATURE-----
More information about the samba
mailing list