[Samba] name query returning all ip addresses for server instead of primary one

Antony Sargent antony at asargent.com
Fri Feb 9 18:49:47 GMT 2007


Our server is multihomed, and I've been finding that sometimes clients 
doing a NetBIOS Name Service (NBNS) query to our samba server sometimes 
end up getting and using one of the non-primary addresses. I used 
ethereal to look at the actual NBNS response from the server and notice 
that all of its ip addresses are listed, with the primary one first but 
all the others as well. I guess the client somehow picks randomly among 
them? Clients picking the wrong one seems to happen particularly often 
on vpn connections via the pptpd server running on the same machine.

I've perused the samba o'reilly book, online documentation, and the 
mailing list archives, and I had thought that the "interfaces" and "bind 
interfaces only" commands in smb.conf should restrict the samba server 
to only vending the ip address of the primary interface eth0, but that 
doesn't seem to work. Does anyone know how to get samba to only reply 
with one of its ip addresses to NBNS queries?

Thanks!
Antony


System info:
  CentOS 4, Linux 2.6.9-42.0.3.ELsmp

Samba rpm's installed:
  samba-common-3.0.10-1.4E.9
  samba-3.0.10-1.4E.9


Here is our smb.conf:

(I've changed the actual server name changed to "servername", and 
workgroup changed to "serverworkgroup")

[global]
   netbios name = servername
   server string =
   workgroup = serverworkgroup
   encrypt passwords = yes

   domain master = yes
   local master = yes
   preferred master = yes
   os level = 33

   security = user
   domain logons = yes

   # We set these to empty so that we don't use roaming profiles
   logon path =
   logon home =

   time server = yes

   admin users = root

   wins support = yes

   # only bind to the loopback and first ethernet interfaces
   interfaces = lo eth0
   bind interfaces only = yes

   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

[home]
   path = /home/
   veto files = /lost+found/
   writeable = yes
   browseable = yes
   guest ok = no




More information about the samba mailing list