Bug 5951 - Samba incorrectly remembers defunct IP addresses when running as a WINS server
Samba incorrectly remembers defunct IP addresses when running as a WINS server
Status: NEW
Product: Samba 3.2
Classification: Unclassified
Component: File services
3.2.5
Other Linux
: P3 normal
: ---
Assigned To: Jeremy Allison
Samba QA Contact
http://bugs.debian.org/426700
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-07 13:08 UTC by Debian samba package maintainers (PUBLIC MAILING LIST)
Modified: 2011-07-21 14:55 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Debian samba package maintainers (PUBLIC MAILING LIST) 2008-12-07 13:08:27 UTC
As reported by our user:

When a samba server is running as a wins server, the wins server
remembers IP addresses of the server, which have since been deleted.

Restarting samba, and using "net cache flush" does not cure the problem.
Clients intermittently recieve stale data, and fail to contact the
server.

To reproduce:

1. Create a samba server with multiple IP addresses on a local subnet
.e.g.

192.168.0.1, 192.168.1.1

2. Start samba server with 'wins support = yes'

3. net lookup <server-name>

4. net cache list

 - both IP addresses should be listed

5. /etc/init.d/samba stop

6. ip addr del 192.168.1.1/24 dev eth0

7. /etc/init.d/samba start

8. net lookup <server-name>

9. net cache list

 - both IP addresses are still listed (Incorrectly)


I reproduced this:

root@mykerinos:/var/tmp/test> ifconfig weth_i
weth_i    Link encap:Ethernet  HWaddr 00:12:f0:aa:6a:8b
          inet adr:192.168.1.3  Bcast:192.168.1.255  Masque:255.255.255.0
          adr inet6: fe80::212:f0ff:feaa:6a8b/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:711312 errors:0 dropped:0 overruns:0 frame:0
          TX packets:430433 errors:0 dropped:0 overruns:0 carrier:1
          collisions:0 lg file transmission:1000
          RX bytes:618309852 (589.6 MiB)  TX bytes:71118951 (67.8 MiB)
          Interruption:17 Adresse de base:0xe000 Mémoire:dfcff000-dfcfffff

root@mykerinos:/var/tmp/test> ip addr add 192.168.1.30/24 dev weth_i
root@mykerinos:/var/tmp/test> net lookup mykerinos
192.168.1.3
root@mykerinos:/var/tmp/test> net cache list
Key: NBT/MYKERINOS#20    Timeout: 20:15:54       Value: 192.168.1.3:0,192.168.1.30:0
root@mykerinos:/var/tmp/test> /etc/init.d/samba stop
 * Stopping Samba daemons                                                                                  [ ok ]
root@mykerinos:/var/tmp/test> ip addr del 192.168.1.30/24 dev weth_i
root@mykerinos:/var/tmp/test> /etc/init.d/samba start
 * Starting Samba daemons                                                                                  [ ok ]
root@mykerinos:/var/tmp/test> net lookup mykerinos
192.168.1.3
root@mykerinos:/var/tmp/test> net cache list
Key: NBT/MYKERINOS#20    Timeout: 20:15:54       Value: 192.168.1.3:0,192.168.1.30:0
Comment 1 mtd 2011-07-21 14:55:08 UTC
I came over similar problem - samba BDC was unable to contact samba PDC, because it tried to contact nonexistent ip address.

Resolution was following: first, add ip of PDC to /etc/samba/lmhosts as DOMAINNAME#1B on BDC. Then disable bcast name resolution in both smb.conf and flush caches on DCs with net cache flush.

The reason for disabling bcast resolution is that windows workstations do caching also. So the data cannot expire for real, they are just moved around forever.