[Samba] Samba3 on multiple networks, how to make it hand out the correct IP?

Gaiseric Vandal gaiseric.vandal at gmail.com
Tue Sep 23 13:25:36 MDT 2014

I think if you have two A (HOST) records the clients will do a DNS 
lookup for the hosts, get all host entries list (but the order might 
change), and use the  first one in the list.  At least this is how it 
works for things like looking up web sites.  I am not sure if Windows 
clients apply more thought to locating the nearest windows server 
(unless it is tracking the number of hops.)

I think in larger environments, you would have separate DC's for each 
site or network segment.

How is DHCP handled?    Could you have a separate DNS server allocated 
for the wifi clients, and add the 10.* DNS entries. then the Samba 
server could be configured as a DNS server for the wired connections only.

Maybe don't use Samba 4 as its the  DNS server at all.  I think if you 
use BIND you can configure split DNS.

On 09/23/14 13:54, Bram Matthys wrote:
> Hi,
> My Samba 4.1.x server is connected to two networks, one in the 192.168.*
> range (wired) and one in the 10.* range (wifi). The clients on either
> network normally cannot reach each other.
> I noticed Samba hands out (eg: for dcname.company.net) it's IP's from both
> ranges to clients on both sides. So the 192.168.* clients get two A records:
> &
> I noticed that, because of this current behavior, domain logins (well, time
> between login & until the user sees a desktop) have an extra delay of more
> than 60 seconds because the client tries to connect to the wrong IP.
> Eventually it works, but the penalty is huge.
> Given that Samba knows which network the client is on I would have expected
> it to actually be a little bit smarter with regards to that.
> Anyway, I'd like to see this changed so that any clients on 192.168.* only
> get the address, and the clients on 10.* only get
> How can I do this?
> Thanks,
> Bram.

More information about the samba mailing list