[Samba] Samba 3.0/wins.dat - 'Old' IP being served

lists at mungewell.org lists at mungewell.org
Fri Dec 5 22:47:10 GMT 2003


Hi all,
We have a weird problem, Samba is providing an outdated IP address for a client (XP Pro) machine. This means that the client machine is not contactable by the other machines on the network.

The IP is that which was previously used when connecting via the company VPN, although the machine has/is now plugged onto the company network and had has new IP via DHCP.

This problem continues through restarting the Samba deamons and rebooting the client XP machine.

Removing the machine's entry from '/var/lib/samba/wins.dat' solves the symptoms, but presably the bug is still there.

I've traced the problem as far as I can and these are my observations, hopefully they may be usefull to someone in the know.

Machine - Debian Stable/Backports samba_3.0.0final-0

1). It appears that 'winsserver_init' is picking up the old IP from /var/lib/samba/wins.dat
---
[2003/12/05 14:46:24, 4] nmbd/nmbd_winsserver.c:initialise_wins(362)
initialise_wins: add name: F-LAPTOP-SJG#20 ttl = 161432 first IP 192.168.213.12 flags = 44
---
"F-LAPTOP-SJG#00" 1070797025 192.168.213.12 44R
"F-LAPTOP-SJG#20" 1070797016 192.168.213.12 44R
---

2). When the machine is plugged onto the network it introduces itself
---
[2003/12/05 14:47:30, 4] nmbd/nmbd_packets.c:process_dgram(1227)
process_dgram: datagram from F-LAPTOP-SJG<00> to FUSION<1d> IP 192.168.213.29 for \MAILSLOT\BROWSE of type 2 len=15
[2003/12/05 14:47:30, 8] lib/util.c:is_myname(1677)
is_myname("F-LAPTOP-SJG") returns 0
[2003/12/05 14:47:30, 4] nmbd/nmbd_packets.c:debug_browse_data(100)
debug_browse_data():
0 char ..F-LAPTOP-SJG.  hex 02 00 46 2d 4c 41 50 54 4f 50 2d 53 4a 47 00
[2003/12/05 14:47:30, 3] nmbd/nmbd_incomingdgrams.c:process_announce_request(784)
process_announce_request: Announce request from F-LAPTOP-SJG<00> IP 192.168.213.29 to FUSION<1d>.
[2003/12/05 14:47:30, 4] nmbd/nmbd_workgroupdb.c:find_workgroup_on_subnet(157)
find_workgroup_on_subnet: workgroup search for FUSION on subnet 192.168.213.9: found.
[2003/12/05 14:47:30, 4] nmbd/nmbd_workgroupdb.c:find_workgroup_on_subnet(157)
find_workgroup_on_subnet: workgroup search for FUSION on subnet 192.168.213.9: found.
[2003/12/05 14:47:30, 8] lib/util.c:is_myname(1677)
is_myname("SERVER") returns 1
[2003/12/05 14:47:30, 3] nmbd/nmbd_sendannounce.c:send_local_master_announcement(163)
send_local_master_announcement: type c9823 for name SERVER on subnet 192.168.213.9 for workgroup FUSION
[2003/12/05 14:47:30, 4] nmbd/nmbd_packets.c:send_mailslot(1870)
send_mailslot: Sending to mailslot \MAILSLOT\BROWSE from SERVER<00> IP 192.168.213.9 to FUSION<1e> IP 192.168.213.255
--
[2003/12/05 14:47:30, 4] nmbd/nmbd_packets.c:process_dgram(1227)
process_dgram: datagram from F-LAPTOP-SJG<20> to FUSION<1d> IP 192.168.213.29 for \MAILSLOT\BROWSE of type 1 len=63
[2003/12/05 14:47:30, 8] lib/util.c:is_myname(1677)
is_myname("F-LAPTOP-SJG") returns 0
[2003/12/05 14:47:30, 4] nmbd/nmbd_packets.c:debug_browse_data(100)
debug_browse_data():
0 char ......F-LAPTOP-S hex 01 00 80 fc 0a 00 46 2d 4c 41 50 54 4f 50 2d 53
10 char JG.wx.........U. hex 4a 47 00 77 78 83 05 01 03 10 01 00 0f 01 55 aa
20 char Stuart Griffin's hex 53 74 75 61 72 74 20 47 72 69 66 66 69 6e 27 73
30 char  Fusion Laptop.  hex 20 46 75 73 69 6f 6e 20 4c 61 70 74 6f 70 00
[2003/12/05 14:47:30, 3] nmbd/nmbd_incomingdgrams.c:process_host_announce(118)
process_host_announce: from F-LAPTOP-SJG<08> IP 192.168.213.29 to FUSION<1d> for server F-LAPTOP-SJG.
[2003/12/05 14:47:30, 5] nmbd/nmbd_incomingdgrams.c:process_host_announce(121)
process_host_announce: ttl=720 server type=00011003 comment=Stuart Griffin's Fusion Laptop
[2003/12/05 14:47:30, 4] nmbd/nmbd_workgroupdb.c:find_workgroup_on_subnet(157)
find_workgroup_on_subnet: workgroup search for FUSION on subnet 192.168.213.9: found.
[2003/12/05 14:47:30, 8] lib/util.c:is_myname(1677)
is_myname("F-LAPTOP-SJG") returns 0
[2003/12/05 14:47:30, 3] nmbd/nmbd_serverlistdb.c:create_server_on_workgroup(159)
create_server_on_workgroup: Created server entry F-LAPTOP-SJG of type 40011003 (Stuart Griffin's Fusion Laptop) on workgroup FUSI
ON.
[2003/12/05 14:47:30, 4] nmbd/nmbd_workgroupdb.c:find_workgroup_on_subnet(157)
find_workgroup_on_subnet: workgroup search for FUSION on subnet 192.168.213.9: found.
[2003/12/05 14:47:30, 10] nmbd/nmbd_sendannounce.c:announce_myself_to_domain_master_browser(379)
announce_myself_to_domain_master_browser: t (1070635650) - last(1070635607) < 900
[2003/12/05 14:47:30, 4] nmbd/nmbd_workgroupdb.c:find_workgroup_on_subnet(157)
find_workgroup_on_subnet: workgroup search for FUSION on subnet UNICAST_SUBNET: found.
[2003/12/05 14:47:30, 4] nmbd/nmbd_workgroupdb.c:find_workgroup_on_subnet(157)
find_workgroup_on_subnet: workgroup search for FUSION on subnet UNICAST_SUBNET: found.
[2003/12/05 14:47:30, 10] lib/util_sock.c:read_udp_socket(188)
read_udp_socket: lastip 192.168.213.9 lastport 138 read: 219
---

3) Unfortunately Samba doesn't seem to have taken notice of the 'new' IP.
---
F-LAPTOP-SJG<00>    TTL = Sun Dec  7 11:37:05 2003   192.168.213.12 44
F-LAPTOP-SJG<20>    TTL = Sun Dec  7 11:36:56 2003   192.168.213.12 44
---

4) 'nmblookup' works OK, but it does a broadcast
---
server:/home/swood# nmblookup f-laptop-sjg
querying f-laptop-sjg on 192.168.213.255
192.168.213.29 f-laptop-sjg<00>
---

5) 'ping f-laptop-sjg' from windows machine causes the wrong IP to be served over WINS
---
[2003/12/05 15:38:02, 3] nmbd/nmbd_winsserver.c:wins_process_name_query_request(1439)
wins_process_name_query: name query for name F-LAPTOP-SJG<00> from IP 192.168.213.126
[2003/12/05 15:38:02, 3] nmbd/nmbd_winsserver.c:wins_process_name_query_request(1491)
wins_process_name_query: name query for name F-LAPTOP-SJG<00> returning first IP 192.168.213.12.
[2003/12/05 15:38:02, 4] nmbd/nmbd_packets.c:reply_netbios_packet(929)
reply_netbios_packet: sending a reply of packet type: wins_query F-LAPTOP-SJG<00> to ip 192.168.213.126 for id 33098
---

Hope this of use,
Simon.



More information about the samba mailing list