[Samba] netbios name resolution stops working after device change

Rudy Ghani rudy at streamyx.com
Thu Nov 9 10:13:24 GMT 2006


Hi there.

This is with regards to samba-3.0.23c, on FreeBSD 6.0-RELEASE-p12

Previously I had Samba up and running without any problems. Then I
decided to do a tiny upgrade by simply switching to a new motherboard,
while keeping all other hardware and software aspects the same.

However, after the upgrade, netbios name resolution seems to have
stopped working somehow. \\servername lookups no longer work from other
workgroup clients. \\serverip works fine though.

The configuration was not changed at all during the migration. The only
changes were some of the mount entries and the network device change
from rl0 to sk0, with corresponding changes in /etc/rc.conf. After that
I tried using another card on xl0, but with the same results.

My Samba config is such that the network only relies on broadcast to
learn the names of other workstations. No WINS server, or listing
hostnames in /etc/hosts or lmhosts.

Here's an nmbd logfile snippet. The Samba server here is MARIO, and
workgroup WORKGROUP:

[snip start]
[2006/11/07 22:11:50, 0] nmbd/nmbd.c:main(699)
   Netbios nameserver version 3.0.23c started.
   Copyright Andrew Tridgell and the Samba Team 1992-2006
[2006/11/07 22:11:50, 2] nmbd/nmbd.c:main(723)
   Becoming a daemon.
[2006/11/07 22:11:50, 2] lib/tallocmsg.c:register_msg_pool_usage(61)
   Registered MSG_REQ_POOL_USAGE
[2006/11/07 22:11:50, 2] lib/dmallocmsg.c:register_dmalloc_msgs(71)
   Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
[2006/11/07 22:11:50, 2] lib/interface.c:add_interface(81)
   added interface ip=10.11.12.3 bcast=10.11.12.255 nmask=255.255.255.0
[2006/11/07 22:11:50, 2] nmbd/nmbd_subnetdb.c:make_subnet(144)
   making subnet name:10.11.12.3 Broadcast address:10.11.12.255 Subnet
mask:255.255.255.0
[2006/11/07 22:11:50, 2] nmbd/nmbd_subnetdb.c:make_subnet(144)
   making subnet name:UNICAST_SUBNET Broadcast address:0.0.0.0 Subnet
mask:0.0.0.0
[2006/11/07 22:11:50, 2] nmbd/nmbd_subnetdb.c:make_subnet(144)
   making subnet name:REMOTE_BROADCAST_SUBNET Broadcast address:0.0.0.0
Subnet mask:0.0.0.0
[2006/11/07 22:11:50, 2] nmbd/nmbd_lmhosts.c:load_lmhosts_file(41)
   load_lmhosts_file: Can't open lmhosts file /usr/local/etc/lmhosts.
Error was No such file or directory
[2006/11/07 22:12:06, 2] nmbd/nmbd_elections.c:send_election_dgram(41)
   send_election_dgram: Sending election packet for workgroup WORKGROUP
on subnet 10.11.12.3
[2006/11/07 22:12:08, 2] nmbd/nmbd_elections.c:send_election_dgram(41)
   send_election_dgram: Sending election packet for workgroup WORKGROUP
on subnet 10.11.12.3
[2006/11/07 22:12:10, 2] nmbd/nmbd_elections.c:send_election_dgram(41)
   send_election_dgram: Sending election packet for workgroup WORKGROUP
on subnet 10.11.12.3
[2006/11/07 22:12:12, 2] nmbd/nmbd_elections.c:send_election_dgram(41)
   send_election_dgram: Sending election packet for workgroup WORKGROUP
on subnet 10.11.12.3
[2006/11/07 22:12:14, 2] nmbd/nmbd_elections.c:send_election_dgram(41)
   send_election_dgram: Sending election packet for workgroup WORKGROUP
on subnet 10.11.12.3
[2006/11/07 22:12:14, 2] nmbd/nmbd_elections.c:run_elections(204)
   run_elections: >>> Won election for workgroup WORKGROUP on subnet
10.11.12.3 <<<
[2006/11/07 22:12:14, 2]
nmbd/nmbd_become_lmb.c:become_local_master_browser(537)
   become_local_master_browser: Starting to become a master browser for
workgroup WORKGROUP on subnet 10.11.12.3
[2006/11/07 22:12:24, 0]
nmbd/nmbd_become_lmb.c:become_local_master_stage2(396)
   *****

   Samba name server MARIO is now a local master browser for workgroup
WORKGROUP on subnet 10.11.12.3

   *****
[snip end]

There doesn't seem to be any response from the other workstations during
the election. In fact, another workstation, PHOENIX, has already assumed
the role of local master browser, but didn't relieve it's role when
MARIO appears:

[snip start]
C:\>nbtstat -a phoenix

Wireless Network Connection 4:
Node IpAddress: [10.11.12.2] Scope Id: []

            NetBIOS Remote Machine Name Table

        Name               Type         Status
     ---------------------------------------------
     PHOENIX        <00>  UNIQUE      Registered
     PHOENIX        <20>  UNIQUE      Registered
     WORKGROUP      <00>  GROUP       Registered
     WORKGROUP      <1E>  GROUP       Registered
     WORKGROUP      <1D>  UNIQUE      Registered
     ..__MSBROWSE__.<01>  GROUP       Registered

     MAC Address = 00-16-B6-56-8E-40
[snip end]

Some other command responses that may be helpful:-

[from MARIO start]

> nmblookup mario
added interface ip=10.11.12.3 bcast=10.11.12.255 nmask=255.255.255.0
querying mario on 10.11.12.255
name_query failed to find name mario
> nmblookup workgroup
added interface ip=10.11.12.3 bcast=10.11.12.255 nmask=255.255.255.0
querying workgroup on 10.11.12.255
Got a positive name query response from 10.11.12.2 ( 10.11.12.2 )
10.11.12.2 workgroup<00>
> nmblookup -m workgroup
added interface ip=10.11.12.3 bcast=10.11.12.255 nmask=255.255.255.0
querying workgroup on 10.11.12.255
Got a positive name query response from 10.11.12.2 ( 10.11.12.2 )
10.11.12.2 workgroup<00>
> nmblookup phoenix
added interface ip=10.11.12.3 bcast=10.11.12.255 nmask=255.255.255.0
querying phoenix on 10.11.12.255
Got a positive name query response from 10.11.12.2 ( 10.11.12.2 )
10.11.12.2 phoenix<00>
> ifconfig
sk0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
         ether 00:0e:a6:8a:88:10
         media: Ethernet autoselect (none)
         status: no carrier
xl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
         options=9<RXCSUM,VLAN_MTU>
         inet6 fe80::250:daff:fe23:4e56%xl0 prefixlen 64 scopeid 0x2
         inet 10.11.12.3 netmask 0xffffff00 broadcast 10.11.12.255
         ether 00:50:da:23:4e:56
         media: Ethernet autoselect (100baseTX <full-duplex>)
         status: active
plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
         inet6 ::1 prefixlen 128
         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
         inet 127.0.0.1 netmask 0xff000000
bridge0: flags=8041<UP,RUNNING,MULTICAST> mtu 1500
         ether ac:de:48:b9:82:45
         priority 32768 hellotime 2 fwddelay 15 maxage 20
         member: tap0 flags=3<LEARNING,DISCOVER>
         member: xl0 flags=3<LEARNING,DISCOVER>
tap0: flags=8942<BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
         ether 00:bd:34:5d:00:00
         Opened by PID 688
>

[from MARIO end]


[from PHOENIX start]

C:\>net view
Server Name            Remark

---------------------------------------------------
\\PHOENIX
The command completed successfully.

[from PHOENIX end]

And finally smb.conf:

[global]
    workgroup = WORKGROUP
    netbios name = MARIO
    server string = Samba Server
    hosts deny =  ALL
    hosts allow = 10.11.12.3/24 127.
    load printers = yes
    log level = 2
    max log size = 50
    security = user
    socket options = TCP_NODELAY
    preferred master = yes
    dns proxy = no
[homes]
    comment = Home Directories
    browseable = no
    writeable = yes
[printers]
    comment = All Printers
    path = /var/spool/samba
    browseable = no
    guest ok = no
    writeable = no
    printable = yes
[archives]
     comment = Archives
     path = /mnt/archives
     valid users = myuu ayin
     public = yes
     writeable = yes
     printable = no
[archives2]
     comment = Archives 2
     path = /mnt/archives/archives2
     valid users = myuu ayin
     public = yes
     writeable = yes
     printable = no

Hope anyone can give some insight on this. Thanks and regards. :)

PS: After drafting this msg I tried recompiling the kernel to no avail.



More information about the samba mailing list