[Samba] WINS not caching second Samba Server

Chris lead2gold at gmail.com
Tue Feb 8 06:17:15 MST 2011


  Background:
I have 2 SMB Servers; one is configured to be the Preferred Master 
(fserver), the other (upstairs) is configured to just share some files.  
I want it to connect and update the WINS configuration on the Preferred 
Master. Configuration files for both servers are attached.

Also worth mentioning that both the 'fserver' and 'upstairs' reside on 
the same network.

Some basic system information probably worth mentioning:
<snip id=fserver>
## SELinux not Enforcing
[root at fserver ~]# getenforce
Permissive
## Processes running
[root at fserver ~]# ps aux | egrep mbd | egrep -v egrep
root     26588  0.0  0.0 135364  2304 ?        Ss   15:16   0:00 smbd -D
root     26591  0.0  0.0 135364  1180 ?        S    15:16   0:00 smbd -D
root     26592  0.0  0.0 109848  1540 ?        Ss   15:16   0:00 nmbd -D
## Services listening
[root at fserver ~]# netstat -pnat | egrep mb
tcp        0      0 127.0.0.1:139               
0.0.0.0:*                   LISTEN      20394/smbd
tcp        0      0 192.168.0.1:139             
0.0.0.0:*                   LISTEN      20394/smbd
tcp        0      0 127.0.0.1:445               
0.0.0.0:*                   LISTEN      20394/smbd
tcp        0      0 192.168.0.1:445             
0.0.0.0:*                   LISTEN      20394/smbd
</snip>

<snip id=upstairs>
## SELinux not Enforcing
[root at upstairs ~]# getenforce
Permissive
## Processes running
[root at upstairs ~]# ps aux | egrep mbd | egrep -v egrep
root     11308  0.0  0.2 203548  2960 ?        Ss   15:09   0:00 smbd -D
root     11310  0.0  0.1 203548  1448 ?        S    15:09   0:00 smbd -D
## Services listening
[root at upstairs ~]# netstat -pnat | egrep mb
tcp        0      0 127.0.0.1:445               
0.0.0.0:*                   LISTEN      11308/smbd
tcp        0      0 192.168.0.62:445            
0.0.0.0:*                   LISTEN      11308/smbd
tcp        0      0 127.0.0.1:139               
0.0.0.0:*                   LISTEN      11308/smbd
tcp        0      0 192.168.0.62:139            
0.0.0.0:*                   LISTEN      11308/smbd
</snip>

on 'fserver' (the main samba server) and 'upstairs' I see the following 
output:
<snip id='fserver,upstairs'>
[root at fserver ~]# smbtree -N
WORKGROUP
     \\HL-3070CW
cli_start_connection: failed to connect to HL-3070CW<20> (0.0.0.0). 
Error NT_STATUS_BAD_NETWORK_NAME
     \\FSERVER                Samba Server
         \\FSERVER\IPC$               IPC Service (Samba Server)
         \\FSERVER\general            General
         \\FSERVER\photos             Photos
         \\FSERVER\video              Video
         \\FSERVER\music              Music


This is 'mostly' correct... I want to see entries like : \\UPSTAIRS\...

[root at fserver ~]# nmblookup fserver
querying fserver on 127.255.255.255
192.168.0.1 fserver<00>

[root at upstairs ~]# nmblookup fserver
querying fserver on 127.255.255.255
querying fserver on 192.168.0.255
192.168.0.1 fserver<00>
</snip>

Neither server can resolve the Netbios name 'upstairs', but i can easily 
access it via IP. What configuration snip am i missing so windows hosts 
can browse this? It almost seems like the 'fserver' (Also the WINS 
Server) is not caching 'upstairs' when it broadcasts.
<snip id=fserver>
[root at fserver ~]# nmblookup upstairs
querying upstairs on 127.255.255.255
querying upstairs on 192.168.0.255
name_query failed to find name upstairs
</snip>

On the fserver I see the requests some in and go back out (so it's not a 
firewall issue)
<snip id=fserver>
[root at fserver ~]# tcpdump -i eth1 -l -n | grep 137
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes
15:38:27.354500 IP 192.168.0.62.44866 > 192.168.0.255.netbios-ns: NBT 
UDP PACKET(137): QUERY; REQUEST; BROADCAST
15:38:27.354805 IP 192.168.0.1.netbios-ns > 192.168.0.62.44866: NBT UDP 
PACKET(137): QUERY; POSITIVE; RESPONSE; UNICAST
15:38:27.625262 IP 192.168.0.62.44866 > 192.168.0.255.netbios-ns: NBT 
UDP PACKET(137): QUERY; REQUEST; BROADCAST
15:38:27.625453 IP 192.168.0.1.netbios-ns > 192.168.0.62.44866: NBT UDP 
PACKET(137): QUERY; POSITIVE; RESPONSE; UNICAST
15:38:27.895986 IP 192.168.0.62.44866 > 192.168.0.255.netbios-ns: NBT 
UDP PACKET(137): QUERY; REQUEST; BROADCAST
15:38:27.896056 IP 192.168.0.1.netbios-ns > 192.168.0.62.44866: NBT UDP 
PACKET(137): QUERY; POSITIVE; RESPONSE; UNICAST
</snip>

I also see broadcasts made by the upstairs machine every so often in the 
tcp dump too (192.168.0.62 = upstairs)
<snip id=fserver>
08:01:01.369299 IP 192.168.0.62.54458 > 192.168.0.255.netbios-ns: NBT 
UDP PACKET(137): QUERY; REQUEST; BROADCAST
08:01:01.639895 IP 192.168.0.62.54458 > 192.168.0.255.netbios-ns: NBT 
UDP PACKET(137): QUERY; REQUEST; BROADCAST
08:01:01.910509 IP 192.168.0.62.54458 > 192.168.0.255.netbios-ns: NBT 
UDP PACKET(137): QUERY; REQUEST; BROADCAST
</snip>

In a nutshell... my problem (again):
Why doesn't 'upstairs' (standard SMB server) associate it's Netbios name 
with the Master SMB (also configured to use WINS)?

I have no problem mounting these drives by ip address or host name.  But 
to please the 'windows' users, I just want the 'fserver' to cache the 
'upstairs' Netbios name.

## on fserver
wins support = yes
domain master = yes
local master = yes
preferred master = yes

## on upstairs
domain master = no
local master = yes
preferred master = no
wins support = no
## Same results if i use hostname/ip addr
wins server = fserver.lead2gold.local
## Also tried this without success (i know it's meant more for sub-domains)
remote announce = 192.168.0.255


I hope one of you Samba guru's can help me out! :)

Chris
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: smb.fserver.conf
URL: <http://lists.samba.org/pipermail/samba/attachments/20110208/274cad41/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: smb.upstairs.conf
URL: <http://lists.samba.org/pipermail/samba/attachments/20110208/274cad41/attachment-0001.ksh>


More information about the samba mailing list