[Samba] Samba3 on multiple networks, how to make it hand out the correct IP?
Harry Jede
walk2sun at arcor.de
Wed Sep 24 02:05:03 MDT 2014
On 09:15:11 wrote Bram Matthys:
> 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: 192.168.1.1 & 10.0.0.2.
>
> 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 192.168.1.1 address, and the clients on 10.* only get
> 10.0.0.2.
>
> How can I do this?
I dont know how to do this on the dns server, but you may do it on the
clients:
i.e. modifiy your dns resolver settings
a working setup on my home networks:
## client PC
# cat /etc/resolv.conf
domain home.lan
nameserver 192.168.231.254
search home.lan ad.schule.lan
sortlist 192.168.231.0/255.255.255.0
Important is the sortlist statement. It points to clients local network.
The Samba/DNS Server has 4 adresses. The nameserver 192.168.231.254 is a
slave bind server for my ad domain.
## client PC
# host dc0
dc0.ad.schule.lan has address 192.168.200.254
dc0.ad.schule.lan has address 192.168.230.228
dc0.ad.schule.lan has address 192.168.231.228
dc0.ad.schule.lan has address 192.168.232.228
# ping -c1 dc0
PING dc0.ad.schule.lan (192.168.231.228) 56(84) bytes of data.
64 bytes from 192.168.231.228: icmp_req=1 ttl=64 time=0.491 ms
Network clients like ping always uses the local name server address.
>
> Thanks,
>
> Bram.
--
Regards
Harry Jede
More information about the samba
mailing list