Dual IP host running samba 3.0/3.2 (olemx, 192.168.0.33/19 192.168.0.44/19) is able to register both IP addresses to a wins server running samba3 (192.168.0.137) but is not able to do this with samba4 (samba4wins-1.0.6 - 192.168.148.11). root@olemx:~# egrep "interfaces|netbios" /etc/samba/smb.conf netbios name = OleMX interfaces = 192.168.0.33/19 192.168.0.44/19 Registered to samba3 wins server: root@olemx:~# nmblookup -U 192.168.0.137 -R 'olemx' querying olemx on 192.168.0.137 192.168.0.33 olemx<00> 192.168.0.44 olemx<00> Registered to samba4 wins server: root@olemx:~# nmblookup -U 192.168.148.11 -R 'olemx' querying olemx on 192.168.148.11 192.168.0.44 olemx<00> Log from winshook: Oct 19 16:06:33 xdns1 winshook[90764]: delete OLEMX 20 1224943525 Oct 19 16:06:33 xdns1 winshook[90768]: add OLEMX 20 1224684393 192.168.0.33 Oct 19 16:06:33 xdns1 winshook[90772]: delete OLEMX 03 1224943525 Oct 19 16:06:33 xdns1 winshook[90776]: add OLEMX 03 1224684393 192.168.0.33 Oct 19 16:06:33 xdns1 winshook[90780]: delete OLEMX 00 1224943524 Oct 19 16:06:33 xdns1 winshook[90784]: add OLEMX 00 1224684393 192.168.0.33 Oct 19 16:06:37 xdns1 winshook[90801]: delete OLEMX 20 1224684393 192.168.0.33 Oct 19 16:06:37 xdns1 winshook[90805]: add OLEMX 20 1224684397 192.168.0.44 Oct 19 16:06:37 xdns1 winshook[90809]: delete OLEMX 03 1224684393 192.168.0.33 Oct 19 16:06:37 xdns1 winshook[90813]: add OLEMX 03 1224684397 192.168.0.44 Oct 19 16:06:37 xdns1 winshook[90817]: delete OLEMX 00 1224684393 192.168.0.33 Oct 19 16:06:37 xdns1 winshook[90821]: add OLEMX 00 1224684397 192.168.0.44 ---- /usr/local/sbin/winshook: begin --- #!/bin/sh echo $* | logger -t "winshook" -i ---- /usr/local/sbin/winshook: end --- # grep hook /usr/local/etc/samba4wins.conf wins hook = /usr/local/sbin/winshook It seems that samba4 first registers 192.168.0.33 but then removes this IP address and registers 192.168.0.44. There are 4 samba4wins servers: 192.168.148.11, 192.168.148.12, 192.168.148.13, 192.168.148.14 working as wreplPartners but the problem exists even when I disable communication between wreplPartners.
Metze is responsible for this.
Should be fixed with commit a5b3975cf71f0bf114832c958ba855646c69832c in master
It's also fixed in samba4wins-1.0.7
Unfortunately, it is not fixed in samba4wins-1.0.7. # /usr/local/sbin/smbd4wins --version Version 1.0.7-SerNet-Debian-2 The bug is still here and the mentioned commit looks bogus as it fixed rather totally different problem: commit a5b3975cf71f0bf114832c958ba855646c69832c Author: Stefan Metzmacher <me...@sernet.de> Date: Wed Jan 16 13:57:50 2008 +0100 nbt_server: redirect incoming response packets to the correct interface We may send requests packets (WACK challenges or similar things) via a different udp socket than the socket we receive the matching response. We need to setup an unexpected handler on the nbt sockets and redirect responses to the correct nbt_socket. (By redirect I mean we use the correct nbt_socket structure, we're *not* resending the packet with sendto() via the kernel...) metze (from samba4wins tree 7ce8e705e5a9aabb787d17fbec7a078d9d6780dc)
Can you please provide the wins hook output that a samba3 wins server generates and also a network capture that shows the multi-homed registration and the nmblookup which shows the result (both against samba3 and samba4). The above commit fixes multi-homed registrations from windows hosts. The problems was that the WACK challenge timeout because the response arrived on the wrong socket.
samba4wins: Apr 1 20:30:39 xdns1 winshook[44489]: delete OLEMX 20 1239129033 Apr 1 20:30:39 xdns1 winshook[44493]: add OLEMX 20 1238869839 192.168.0.33 Apr 1 20:30:39 xdns1 winshook[44497]: delete OLEMX 03 1239129032 Apr 1 20:30:39 xdns1 winshook[44501]: add OLEMX 03 1238869839 192.168.0.33 Apr 1 20:30:39 xdns1 winshook[44505]: delete OLEMX 00 1239129032 Apr 1 20:30:39 xdns1 winshook[44509]: add OLEMX 00 1238869839 192.168.0.33 Apr 1 20:30:43 xdns1 winshook[44521]: delete OLEMX 20 1238869839 192.168.0.33 Apr 1 20:30:43 xdns1 winshook[44525]: add OLEMX 20 1238869843 192.168.0.44 Apr 1 20:30:43 xdns1 winshook[44529]: delete OLEMX 03 1238869839 192.168.0.33 Apr 1 20:30:43 xdns1 winshook[44533]: add OLEMX 03 1238869843 192.168.0.44 Apr 1 20:30:43 xdns1 winshook[44537]: delete OLEMX 00 1238869839 192.168.0.33 Apr 1 20:30:44 xdns1 winshook[44541]: add OLEMX 00 1238869843 192.168.0.44 samba3: Apr 1 20:33:33 dsrv winshook[16391]: add OLEMX 20 259200 192.168.0.33 Apr 1 20:33:33 dsrv winshook[16394]: add OLEMX 03 259200 192.168.0.33 Apr 1 20:33:33 dsrv winshook[16397]: add OLEMX 00 259200 192.168.0.33 Apr 1 20:33:33 dsrv winshook[16406]: add OLEMX 20 259200 192.168.0.33 192.168.0.44 Apr 1 20:33:33 dsrv winshook[16409]: add OLEMX 03 259200 192.168.0.33 192.168.0.44 Apr 1 20:33:33 dsrv winshook[16412]: add OLEMX 00 259200 192.168.0.33 192.168.0.44
samba4wins: # nmblookup -U 192.168.148.11 -R 'olemx' querying olemx on 192.168.148.11 192.168.0.44 olemx<00> samba3: # nmblookup -U 192.168.0.137 -R 'olemx' querying olemx on 192.168.0.137 192.168.0.33 olemx<00> 192.168.0.44 olemx<00>
Created attachment 4043 [details] network capture: samba3 multi-homed registration
Created attachment 4044 [details] network capture: samba4wins multi-homed registration
Done, please let me know if you need more information. BTW: thank you for looking at this problem. ;)
I don't see the name requests from the server to the client which should be followed after the WACK response. Please make sure they get captured too. With this name requests the server checks if all addresses of a multi-homed server really belong to the same machine. Note: It could be that the server uses a different source ip address to contact the client, depnding on the server configuration. Maybe you filtered too much.
Yep, it was indeed a filtering issue. Sorry for wasting your time and thank you for the help.