NetBIOS and visibility in Windows' Network menu

Status
Not open for further replies.

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
I've been having an intermittent issue (don't you love those?):

Most of the time, when opening Windows 7's or WHS2011/Windows Server 2008 R2's Networking menu, my FreeNAS server is not listed anywhere. However, manually entering \\FREENAS\ immediately places me on the shares list for said server.

Maximum SMB version is set to auto (which should mean Windows 7's version).

Other computers are listed normally, so I'm assuming it's a FreeNAS issue for the moment.

The odd part is that even the FreeNAS server behaves as expected within a short period following a reboot of the server.

I can reproduce this issue both on my Windows 7 Desktop and on my Windows Home Server 2011/Server 2008 R2 server and said period seems to be rather short.

Now, network setup:

Nothing fancy at all. No link aggregation, no vlans, no subnets...

Routing and related tasks are handled by a pfSense rig.

FreeNAS as detailed in my signature, connected to a dumb GbE switch.
WHS2011 server connected to the same switch (Intel GbE, if anyone's wondering).
Windows 7 Desktop connected via WiFi to Asus RT-AC68U in access point mode, which is connected to the same switch.

Any recommendations of what to investigate would be most welcome.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Many thanks for the suggestion!

After doing some reading and confirming that pfSense's DNS forwarder was configured correctly, I added the pfSense rig as Nameserver 1 in FreeNAS. Preliminary conclusion is that the problem is solved, but this will require confirmation over a period of time.

Nope, back to square one it seems.
 
Last edited:

strophy

Dabbler
Joined
May 6, 2014
Messages
19
Hi there, I have the same problem, did you find a solution?

My setup is FreeNAS 9.2.1.7 on a wired network with a DD-WRT router. DNS and DHCP are enabled in DD-WRT, and I have configured a local domain called dyg.lan. I can ping the NAS both by IP address and 'ping freenas' or 'ping freenas.dyg.lan'. I can access all network shares immediately by typing \\freenas in Explorer, but it never appears when simply browsing the network. I have configured SMB as local master on a workgroup called WORKGROUP, and all other computers are visible. Just not Freenas...

Thanks for any ideas...

EDIT: I have checked a number of forum posts and log files. One recommended that I use a tool from scottiestech.info to try and identify which computer is the local master browser on my network. This works at my office network, but when connecting on the home network, I get the following message:

A remote API error occurred.
More help is available by typing NET HELPMSG 2127.


This error seems to suggest there is a problem getting domain browsing working. Looking at FreeNAS logs, I can see winbindd repeatedly hitting these errors:

STATUS=daemon 'winbindd' finished starting up and ready to serve connectionsidmap range not specified for domain FREENAS
[2014/09/02 23:00:28.465214, 0] ../source3/winbindd/winbindd.c:234(winbindd_sig_term_handler)
Got sig[15] terminate (is_parent=0)
STATUS=daemon 'winbindd' finished starting up and ready to serve connectionsidmap range not specified for domain FREENAS
[2014/09/02 23:25:09.222557, 0] ../source3/winbindd/winbindd.c:234(winbindd_sig_term_handler)
Got sig[15] terminate (is_parent=0)
STATUS=daemon 'winbindd' finished starting up and ready to serve connectionsidmap range not specified for domain FREENAS
[2014/09/03 00:05:04.290564, 0] ../source3/winbindd/winbindd.c:234(winbindd_sig_term_handler)
Got sig[15] terminate (is_parent=0)


Similarly, nmbd is going crazy with these log entries every second:

[2014/09/03 00:33:15.902135, 3] ../source3/nmbd/nmbd_incomingrequests.c:459(process_name_query_request)
process_name_query_request: Name query from 192.168.1.169 on subnet 192.168.1.151 for name ISATAP<00>
[2014/09/03 00:33:16.646135, 3] ../source3/nmbd/nmbd_incomingrequests.c:459(process_name_query_request)
process_name_query_request: Name query from 192.168.1.169 on subnet 192.168.1.151 for name ISATAP<00>
[2014/09/03 00:33:17.395390, 3] ../source3/nmbd/nmbd_incomingrequests.c:459(process_name_query_request)
process_name_query_request: Name query from 192.168.1.169 on subnet 192.168.1.151 for name ISATAP<00>


I have seen a lot of conflicting advice, some suggesting that a WINS server will solve all of this, others suggesting that WINS died in a fire 10 years ago and should not be used. I'm not even sure if WINS is implemented in FreeNAS or DD-WRT. Could AD be a good solution to this, would it still be possible to use the same laptop to connect to AD-managed networks at home and work? If WINS is not used and local browsing is so broken, what possible replacement is there?

Thanks in advance for any help!
Leon
 
Last edited:

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Assuming you're not using AD, then it sounds like you're having some sort of misconfiguration at workgroup/master browser/netbios level. Have you tried running "nbtstat -RR" on your workstation?

My experience with samba/netbios is that name resolution and network browsing is most reliable if you have samba set up as master browser. On your FreeNAS server run "net domain" to print the list of domains with their master browsers on your network. Assuming that your FreeNAS server is configured as the master browser you should see something like:
Code:
        Domain name          Server name of Browse Master
        -------------        ----------------------------
        WORKGROUP            FreeNAS


If you see two workgroups listed, then you need to make sure they're on the same workgroup. You can also use nbtstat on a Windows workstation to view the NetBIOS name table of your FreeNAS computer.
Code:
C:\>nbtstat -A 192.168.0.42

Local Area Connection:
Node IpAddress: [192.168.0.204] Scope Id: []

           NetBIOS Remote Machine Name Table

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

The "..__MSBROWSE__.<01>" line indicates that my FreeNAS server is the master browser for the workgroup.

Overall, nbtstat is a useful tool for diagnosing netbios browsing issues. See the following articles for more information about netbios, samba, etc.
https://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/NetworkBrowsing.html
http://technet.microsoft.com/en-us/library/cc940106.aspx
http://support.microsoft.com/kb/188001

Reviewing /var/log/samba/log.nmbd can provide some clues about what might be going wrong.

Of course, all of this goes through the window if you're having problems connecting across subnets or through a VPN.
 

strophy

Dabbler
Joined
May 6, 2014
Messages
19
Thanks for your reply anodos! Please see my edit above, we were typing at the same time ;)

"net domain" on FreeNAS gives the following output:

Enumerating domains:

Domain name Server name of Browse Master
------------- ----------------------------
WORKGROUP FREENAS


All looks good there. Output of the command "nbtstat -a freenas":

Node IpAddress: [192.168.1.160] Scope Id: []

NetBIOS Remote Machine Name Table

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

MAC Address = 00-00-00-00-00-00


tail /var/log/samba4/log.nmbd output:

[2014/09/03 00:46:12.861000, 3] ../source3/nmbd/nmbd_incomingrequests.c:459(process_name_query_request)
process_name_query_request: Name query from 192.168.1.169 on subnet 192.168.1.151 for name ISATAP<00>
[2014/09/03 00:46:13.618636, 3] ../source3/nmbd/nmbd_incomingrequests.c:459(process_name_query_request)
process_name_query_request: Name query from 192.168.1.169 on subnet 192.168.1.151 for name ISATAP<00>
[2014/09/03 00:46:27.684829, 3] ../source3/nmbd/nmbd_incomingrequests.c:459(process_name_query_request)
process_name_query_request: Name query from 192.168.1.169 on subnet 192.168.1.151 for name ISATAP<00>
[2014/09/03 00:46:28.430956, 3] ../source3/nmbd/nmbd_incomingrequests.c:459(process_name_query_request)
process_name_query_request: Name query from 192.168.1.169 on subnet 192.168.1.151 for name ISATAP<00>
[2014/09/03 00:46:29.181876, 3] ../source3/nmbd/nmbd_incomingrequests.c:459(process_name_query_request)
process_name_query_request: Name query from 192.168.1.169 on subnet 192.168.1.151 for name ISATAP<00>


I can't see anything too seriously wrong with this, can you? Still, my network browser shows this:
upload_2014-9-3_0-48-29.png

Freenas never appears here unless I type \\freenas in manually.

Thanks for the quick response!
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Try running "nbtstat -RR" on your workstation to refresh the NetBIOS names registered by your workstation. Then run "net view" from your workstation to see if your FreeNAS server appears. You may also try disabling any firewall software for testing purposes.

Please note that browser list changes propagate slowly. It can take 11-15 minutes for a new computer to appear in your network browser.
 
Last edited:

strophy

Dabbler
Joined
May 6, 2014
Messages
19
Refreshed the NetBIOS names and then:

C:\>net view
A remote API error occurred.

More help is available by typing NET HELPMSG 2127.

C:\>lanscan

LANscanner v1.55 - ScottiesTech.Info

Scanning LAN...
A remote API error occurred.

More help is available by typing NET HELPMSG 2127.


Powering OFF the Freenas box immediately results in this:

C:\>net view
Server Name Remark

-------------------------------------------------------------------------------
\\BJ-NB-LEON
\\VALIS-PC
The command completed successfully.


C:\>lanscan

LANscanner v1.55 - ScottiesTech.Info

Scanning LAN...

Scanning workgroup: WORKGROUP...

BJ-NB-LEON 192.168.1.160 74-e5-0b-6b-05-ca WORKGROUP MASTER
VALIS-PC 192.168.1.173 00-1e-64-32-34-7a WORKGROUP

Press any key to exit...


As you can see, the very handy lanscan tool is working again as well. Powering Freenas on again results in the box being visible for around 2-3 minutes, then the same errors return. I can reproduce this error on 3 different Windows 7 computers on the network, although they can all see each other, none of them can see the Freenas box unless typing its name in directly.

My Freenas is basically a stock setup, I have changed very few settings. Any other ideas what might be wrong? It seems to be the same error as Ericloewe encountered, but I don't want to jump to conclusions here.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Refreshed the NetBIOS names and then:

C:\>net view
A remote API error occurred.

More help is available by typing NET HELPMSG 2127.

C:\>lanscan

LANscanner v1.55 - ScottiesTech.Info

Scanning LAN...
A remote API error occurred.

More help is available by typing NET HELPMSG 2127.


Powering OFF the Freenas box immediately results in this:

C:\>net view
Server Name Remark

-------------------------------------------------------------------------------
\\BJ-NB-LEON
\\VALIS-PC
The command completed successfully.


C:\>lanscan

LANscanner v1.55 - ScottiesTech.Info

Scanning LAN...

Scanning workgroup: WORKGROUP...

BJ-NB-LEON 192.168.1.160 74-e5-0b-6b-05-ca WORKGROUP MASTER
VALIS-PC 192.168.1.173 00-1e-64-32-34-7a WORKGROUP

Press any key to exit...


As you can see, the very handy lanscan tool is working again as well. Powering Freenas on again results in the box being visible for around 2-3 minutes, then the same errors return. I can reproduce this error on 3 different Windows 7 computers on the network, although they can all see each other, none of them can see the Freenas box unless typing its name in directly.

My Freenas is basically a stock setup, I have changed very few settings. Any other ideas what might be wrong? It seems to be the same error as Ericloewe encountered, but I don't want to jump to conclusions here.

Your error sounds just like mine, but I've reproduced the issue on Windows 8.1 x64, besides 7/WHS 2011. I'll try anodos' suggestions and see what comes out.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Here's something unusual: my desktop is acting as the master browser:

Code:
Enumerating domains:

        Domain name          Server name of Browse Master
        -------------        ----------------------------
        WORKGROUP            ERIC-DESKTOP
 

strophy

Dabbler
Joined
May 6, 2014
Messages
19
Hi Ericloewe, I think there is nothing wrong with your desktop acting as master browser - maybe you recently rebooted and there simply wasn't enough time for a master browser election to take place yet. This was also the case with my network, you can see in post #8 that my laptop is also the browse master. Could it be that the moment the NAS becomes invisible is the moment that it takes over master browser duties? This would also explain the remote API 2127 error only occurring after a few minutes wait following FreeNAS power on - the other computers on the network are asking FreeNAS for a list of computers on the network, and receiving an invalid response. Is there some other mechanism that can explain away the fact that the other non-FreeNAS clients are still browseable? Is a working master browser a prerequisite for being able to find the machine by simply typing //freenas, or can this function over other systems like NetBIOS and DNS alone?

Experts, do you think this could be the cause? I am at work just now but will try disabling the master browser checkbox when I get home to see if that helps. If anyone has any other suggestions, I have a long weekend coming up and could install Wireshark for some more advanced debugging.

Leon
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Hi Ericloewe, I think there is nothing wrong with your desktop acting as master browser - maybe you recently rebooted and there simply wasn't enough time for a master browser election to take place yet. This was also the case with my network, you can see in post #8 that my laptop is also the browse master. Could it be that the moment the NAS becomes invisible is the moment that it takes over master browser duties? This would also explain the remote API 2127 error only occurring after a few minutes wait following FreeNAS power on - the other computers on the network are asking FreeNAS for a list of computers on the network, and receiving an invalid response. Is there some other mechanism that can explain away the fact that the other non-FreeNAS clients are still browseable? Is a working master browser a prerequisite for being able to find the machine by simply typing //freenas, or can this function over other systems like NetBIOS and DNS alone?

Experts, do you think this could be the cause? I am at work just now but will try disabling the master browser checkbox when I get home to see if that helps. If anyone has any other suggestions, I have a long weekend coming up and could install Wireshark for some more advanced debugging.

Leon

To clarify: I can perfectly access my FreeNAS box by typing \\FREENAS or \\192.168.1.16 - it's just not listed.
 

strophy

Dabbler
Joined
May 6, 2014
Messages
19
Yes, that is the exact problem I am having as well. To clarify, my theory is that if you switch off the FreeNAS, wait 10 minutes so another master browser election can occur, then switch it on again, listing will work normally for a few minutes until a second election occurs, at which point the FreeNAS becomes master browser again and listing then fails again. Can you test this?

Using the lanscan.exe tool from scottiestech.info is a great way to quickly see which computer on the network is currently master browser. However, if my theory is correct, it should fail with API error 2127 after the second election occurs.
 

Mynorx

Explorer
Joined
Aug 26, 2014
Messages
62
Guys It seems like Im having this issue as well, I came in to work this morning and I could not view the freenas server. I restarted it via the web interface, it all seemed well for a little while. I went to the secretaries computer and mapped the network drives and stated syncing the information from my old to new nas. Later on I tried mapping the drives on my computer and I could not view the freenas server on the network.

I checked my configurations in the documentation, and a few searches later I end up here. I am able to view the shares If I type \\freenas on the address bar. The secretaries computer seems to have the same Issue but we can still access the shares because I mapped the drives.

I also went to services\cifs\ changed workgroup to AWPC, which is the name of my offices workgroup. Still same issue. Under network settings the only configurations I've got set are; Host name , freenas and Domain, local. I guess its not a big deal unless it turns into something where I cant access the mapped drives.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
As this appears to be affecting several users and there does not seem to be an obvious misconfiguration, it may be a good idea to file a bug report.
 

Mynorx

Explorer
Joined
Aug 26, 2014
Messages
62
Now that I think about it, Everything was working fine last week. I had configured my volume, cif shares, scheduled smart test and scrubs everything seemed normal. I did install the crash plan plugin on Sunday and today I started migrating all of my data.
 

strophy

Dabbler
Joined
May 6, 2014
Messages
19
I'm ready to file this as a bug as well, I'm pretty sure I've fixed my previous network problems which were IP/DHCP related rather than CIFS related. Anodos, is there a guide to filing a useful bug report? Otherwise I'll just go for it and see what happens
 
Last edited:

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I'm ready to file this as a bug as well, I'm pretty sure I've fixed my previous network problems which were IP/DHCP related rather than CIFS related. Anodos, is there a guide to filing a useful bug report? Otherwise I'll just go for it and see what happens
Give a concise and accurate description of the problem you are having (include server and guest operating system details and any relevant details of you network setup). Upload your smb4.conf file and possibly /var/log/samba/log.nmbd if it contains any interesting entries.
 

Mynorx

Explorer
Joined
Aug 26, 2014
Messages
62
Mine seems to be working now. I think its just intermittent with my setup.
 
Status
Not open for further replies.
Top