Here’s a little problem that drove me crazy: How do you determine the Master Browser in a Windows Workgroup?
First of all, lemme explain a bit about how a workgroup works. When you have a LAN set up running Windows machines, each machine can see all the others in Network Neighborhood (or just “Network” in Vista). If you want to see the files on another machine, you just go to Network Neighborhood, click, et voila!
The other method you can use is to open Windows Explorer (keyboard shortcut: Win-E) and in the location/address bar, type:
\\COMPUTER-NAME
So, if you want to go to the computer called BALTHAZAR, you’d type:
\\BALTHAZAR
And hit enter. This is handy to know if Network Neighborhood is not working. And a grumpy Network Neighborhood is exactly the reason why sometimes, you need to find out which computer is the Master Browser.
On a local area network (LAN), each computer “talks” to the others. Each computer has an IP address, like 192.168.0.27, and also a name. The name is what you call your computer so you and your friends don’t have to remember the IP address. In our example above, the computer name is BALTHAZAR, but the IP address might be 192.168.0.27. Fabulous.
[ad name=”square-r”] So, what happens is that each computer on the LAN must talk to the others. Since we’re only dealing with a workgroup, and there is no domain server, there is no computer to keep track of what machines are active on the network. This is where the Master Browser schtick comes into play.
What happens is that all the computers on your LAN hold an “election”. This election depends on a number of factors, but for the purposes of this discussion, we just have to know that all the computers get together and vote on who will be the Master Browser on the LAN. Once a computer is elected, it will keep track of what machines are connected to the LAN by more or less sending messages to say, “Yo! You still there?”
Of course, you may ask: What happens when the computer that is the Master Browser gets shut down when, say, I go to bed? In that case, you will find that your Network Neighborhood may not work so well. At that point, all the computers on the LAN get together again and they hold another election. As I understand it, there are one or more “Backup Master Browsers” waiting in the wings, but we’ll ignore that for now.
Now, what happens when you have Network Neighborhood turning up blank on you sporadically, or possibly missing several of the computers on your LAN from time to time? Well, in that case, you need to determine who is the Master Browser so that you can narrow down the problem to one computer and see if maybe you need an updated ethernet driver, or there are firewall problems, or whatever.
The “fun” way of doing this is with DOS commands. Here’s how you’d do it:
- Open up a command prompt
- Type
net view
and hit enter - Look at the list of computer names. These are the computers on your LAN. Note that the format is
\\COMPUTER-NAME
like I talked about above. - For each name in the list, type the following command:
nbtstat -a COMPUTER-NAME
One of the results from the nbtstat
commands will show a row with “_MSBROWSE_” in it. That means that this computer is the Master Browser.
Wasn’t that fun?
No, it wasn’t.
So, I wrote a little script in Ruby to do this for you. I needed to in order to troubleshoot a networking problem on one machine on my LAN, and I didn’t want to type 10-20 commands every time. But as long as I was writing it, I figured I would jack it up a bit. Here’s what it does:
net view
net view /domain
to determine the list of workgroup namesnet view /domain:[WORKGROUP]
to determine the list of puter names for each [WORKGROUP]- extracts the individual computer names and sticks them in an array
- iterates through the array and calls
ping -n 1 -4 COMPUTER-NAME
on each computer name (we only want to display IPv4 addresses, hence the “-4” switch) - iterates through the array of IP addresses and calls
nbtstat -A IP-ADDRESS
(the “-A” means “I’m giving you an IP address instead of a computer name”. This is a more reliable way of doing things.) - After each call to
nbtstat
, it not only checks for the _MSBROWSE_ string, but it also records the MAC address of the network adapter in the remote computer. - iterates through all the data and displays a nicely formatted table, like so:
Scanning LAN...
BERT 192.168.0.102 00-18-C0-42-A3-B2 CHEESE
BIGBUBBALOU 192.168.0.103 00-26-32-1F-72-ED WORKGROUP
RHINOX 192.168.0.101 00-00-00-00-00-00 WORKGROUP MASTER
Q 192.168.0.100 00-28-F6-68-F5-48 WORKGROUP
RADDAR 192.168.0.105 00-02-0D-74-FC-33 CHEESE
ANGELINA 192.168.0.106 00-B0-7E-C3-F7-A4 CHEESE
MOP 192.168.0.104 00-1B-8C-56-01-52 CHEESE MASTER
AI 192.168.0.107 00-6A-83-6B-A0-83 WORKGROUP
Press any key to exit...
I wrote this little script in Ruby because it was fast and easy. But I didn’t want to have to call it from a command prompt with ruby all the time, and I wanted others to be able to use it without having to install Ruby on their own computers. So, I compiled it into a self-contained executable using RubyScript2Exe, and I added a pretty icon with Resource Hacker. Now my nifty little 2kB script is a lovely 1.5MB executable. Well, ya know… You can’t have everything. It may be bloated, but at least it works!
You can run it from the command line, or from Windows. It’s best to put the file in your Windows directory. It won’t run properly unless it’s on your boot drive (usually C:). From version 1.6, it will run just fine even from a USB stick. If plopped into the Windows directory itself, it will be executable from any drive or directory on your computer. Anyway, if you run it from Windows, it will just open up a command prompt window and pause before closing it so you can see the results. On my machine, it’s nice and speedy.
Oh, and one last note: it might take 30 seconds or so to scan your LAN. The more machines you have, the more work it was to do.
So, now you have a lovely tool to determine the IP address, MAC address, name, and Master Browser status of all the computers on your LAN.
UPDATE (8 June 2009): My little LANscanner program has been updated to version 1.1. It now supports the x64 flavor of Windows XP, Vista, and 7. Be sure to read the included .TXT file for install instructions!
UPDATE (27 February 2010): LANscanner has been updated to version 1.2. New in this release is the display of the workgroup for each computer, as well as formatting improvements that should make the output easier to read even with long computer/workgroup names.
UPDATE (20 March 2010): LANscanner has been updated to version 1.3. This release is mostly a bug fix for 1.2. In the older version, the only workgroup reported was the one your puter was on. Oops! That didn’t make the feature very useful. Now LANscanner will first scan for all available workgroups, and accurately report all machines on all workgroups, including which puter is the Master Browser for each workgroup. I also optimized some code here and there for good measure.
UPDATE (23 December 2012): Thanks to some adventures by frank in bahia, there is one thing you will want to check if you have problems with LANscanner. As he wrote in his comment below:
Second only to “is the PC turned on” in the obvious fix category is “is Client for Microsoft Networks installed”.
What I’ll never understand is how those things UNinstall themselves!
To make sure Client for Microsoft Networks is installed:
- Open Network and Sharing Center
- Click “Change adapter settings”
- Right-click your ethernet adapter and choose Properties
- If “Client for Microsoft Networks” does not appear in the list of items, click the “Install…” button
- Choose “Client” for network feature you want to add, and then click the “Add…” button
- Find Microsoft’s “Client for Microsoft Networks” in the list, and click OK to install it
That should be about it. Of course, the procedure above varies a little depending on whether you’re using XP, Vista, Win 7, or Win 8, but that’s the gist of it. Thanks, frank!
UPDATE (27 January 2013): Thanks to dennis, it seems the System Error 53 is caused by workgroup and/or puter names with spaces in them. This has been fixed in v1.4. Also, LANscanner is now built using Ocra 1.3.0 and Ruby 1.9.3, since RubyScript2Exe is now rather outdated and nonfunctional. The executable is now 26% smaller.
UPDATE (04 May 2013): Version 1.5 of LANscanner is now available. Changes to this version:
- LANscanner now speaks Swedish, French, and English. If you’d like the program to work in your language, please e-mail me the output of the command: nbststat -A IPADDY, for any IPADDY on your LAN
- If MAC address is detected as 00-00-00-00-00-00, we now use “arp -a IPADDY” to overcome Samba problems and retrieve a valid MAC address
- All character encodings are now supported (at the expense of increased EXE file size, but oh well).
- To sort the output by IP addy instead of by puter name, pass any argument to LANScanner, like so: lanscan.exe ip
- Improved formatting for shorter IP addresses
Thanks to Mikael G for the “arp -a” tip!
UPDATE (07 May 2013): Version 1.51 is out. Added support for German and Polish Windows.
UPDATE (25 May 2013): Version 1.52 is out. Added support for the following command-line switches:
- -ip = sort output by IP address. Note that this has changed from the previous version!
- -w WORKGROUP = Scan only the workgroup called WORKGROUP
- -e WORKGROUP = Scan all workgroups except WORKGROUP
UPDATE (24 August 2013): Version 1.53 is out. Fixed -ip option so that IPs are properly numerically sorted.
UPDATE (11 November 2013): Version 1.54 is out. Added support for Spanish Windows.
UPDATE (27 April 2014): Version 1.55 is out. Added support for Norwegian Windows, plus the following command-line switches:
- -n = suppress the “Press any key to exit…” message at the end
- -m = Only display MASTER browsers found
UPDATE (22 October 2014): Version 1.56 is out. Added support for Portuguese, and changed to Ruby v2.0.0 + Ocra 1.3.3. Script is now bigger, but with Ruby 2 goodness!
UPDATE (17 December 2014): Version 1.57 is out. Added support for Japanese.
UPDATE (09 May 2015): Version 1.6 is out. Added support for running on any drive, not just the Windows installation drive. Will also run off a USB stick or any other drive – as long as Windows is installed on the puter.
UPDATE (27 November 2015): Windows 10 November Update (1511) breaks LANscanner! You’re probably getting: System Error 1231 has occurred. Microsoft is aware of the problem, and will hopefully release a fix soon. SIGH…
UPDATE (25 January 2016): Version 1.61 is out. Added support for Dutch. In Windows 10, supposedly an update that should be released in March will fix the System Error 1231 issue.
UPDATE (02 Feb 2016): Version 1.62 is out. Added support for Czech.
UPDATE (18 Feb 2016): Version 1.63 is out. Fixed detection of Windows drive.
UPDATE (2 Mar 2016): AT LAST! Latest 1 March updates for Windows 10 seem to have fixed the Samba issues that busted LANscanner. So, it finally works again!
UPDATE (1 May 2016): Version 1.64 is out. Fix for puters with multiple network adapters resulting in multiple/incorrect MAC addresses and Master Browser in output
UPDATE (22 May 2016): Version 1.64 has been rebuilt with Ocra 1.3.5. When built using the Ocra 1.3.6 gem, the resulting EXE was detected as malware by a number of antivirus solutions. Should be all better now!
UPDATE (21 Aug 2016): Version 1.65 is out. Fix for Win 10 where nbtstat no longer works to get local WORKGROUP, MSBROWSE status, or MAC addy; Getting IP from PuterName is more reliable and no longer results in entries with IP but no MAC or WORKGROUP after a puter is turned off
UPDATE (24 Aug 2016): Version 1.66 is out. Rebuilt in Ruby 2.0.0 to make it work on 32-bit Windows again, fixed bug introduced in 1.65 related to new “Get IP” function on XP
UPDATE (27 Aug 2016): Version 1.67 is out. Removed fancy IP detection since it broke things… Oops!
UPDATE (28 Oct 2016): Version 1.68 is out. Added option “-nodeip www.xxx.yyy.zzz” for specifying the IPv4 of the network adapter you want to scan from/for in the case of puters with multiple network adapters. Note that VirtualBox adds its own virtual network adapter, which counts as a 2nd adapter. If you have multiple network adapters and you do not use the -nodeip option, your results may be wonky!
UPDATE (30 Jan 2018): ** LAN Scanner no longer works on Windows 10 1709 and above. **
See here for more info:
Time to switch to a HomeGroup on Windows 10
UPDATE (27 Dec 2018): LAN Scanner works again on Windows 10. See here for version 2.0!
Looking to expand your network? Then check out TP-LINK’s networking equipment!
Going the long way round (individual dos commands) I ascertained that my master browser is on a machine that regularly goes to sleep. But I’m only seeing a few machines. Thus I thought I’d try your ‘all workgroup, samba aware’ (I have linux boxes too) command only to have it come up with
LANscanner v1.62 – ScottiesTech.Info
Scanning LAN…
d:/Users/BLAH/AppData/Local/Temp/ocr596E.tmp/src/lanscan.rb:82:in “
‘: No such file or directory – d:\Windows\system32\net view /domain
(Errno::ENOENT) from /Users/BLAH/AppData/Local/Temp/ocr596E.tmp/src/lanscan.rb:82:in ‘
The error seems pretty obvious – I have a D: drive for my users stuff and somehow or other (I can’t imagine how) this leads the prog to believe that my windows folder is there too. (My environment variables certainly believe correctly that ‘windir’ is at C:\Windows, where the net command lives, if that’s any help.
I can’t fix this can I? Or could I alter a d to a c directly in your exe’s string table? 🙂
Oh dang… I just fixed the WINDIR detection. Should work now. Download the newer version 1.63 with the download button above!
Wow. I comment here, and somebody far away responds with a fix almost immediately. Isn’t the net fab?
Unfortunately – all I got was:
LANscanner v1.63 – ScottiesTech.Info
Scanning LAN…
System error 6118 has occurred.
The list of servers for this workgroup is not currently available
Press any key to exit…
I must have a really weird network problem. A straight NET VIEW /DOMAIN on its own is giving me that 6118, so I guess you’re OK and the problem’s mine. Bugger! 🙂
Probably due to my making an ubuntu box into the master browser (since all my windows wstations are prone to sleepiness and aren’t the best candidates for master browserage).
Hmm, that’s a common error when “something” on the network is screwed up. Kinda difficult to figure out what, though. A few times, it turned out to be a NAS box. Another time it was the router being used on the network. Sometimes they do all kinds of wonky things.
If you’re using a linux box as MB, you might try checking the following settings:
[global]
workgroup = WORKGROUP
server string = WHATEVER
netbios name = WHATEVER
local master = yes
preferred master = yes
domain master = yes
os level = 255
hosts allow = localhost 192.168.0. [or whatever your LAN is]
Note that the “announce version” setting was removed in Samba v4.
That’s pretty much all I needed to make it work. The linux box is always master browser, regardless of the OS on networked machines.
Yup. Ta for that. Certainly got the workgroup=, netbios name=, server string=, with local & preferred master all yessed up. Just tried adding wins support = yes and currently rebooting.
No joy. That ..__MSBROWSE__.entry in the nbtstat output continues to be absent. I just noticed a [global] dns proxy = no. Is that the culprit? I dunno. Samba’s too complicated. So many twiddly add-on special case options.
I wouldn’t mind so much if only I could change the workgroup in my broadband BTHUB3 (which DOES have that ..__MSBROWSE__. entry, but for its own idiosyncratic, out in a world of its own workgroup called HOME, of use to nobody and nobody knows how to change it)!
Thanks anyway! 🙂
Nope, I’ve also got dns proxy = no.
🙁
Well, if you unplug the network from the router and it works, at least you’ll know what the problem is!
This used to work for me. With version 1.62 and 1.63 I get nothing. Literally I get the Scanning Lan message and the Press any key message.
If I run the netview command in a command window the response is “There are no entries in the list.” I don’t remember which version last worked. I am not very network smart, no clue even where to begin.
Things that I can think of that changed — I changed one Win 7 PC to Win 10 and added another NAS. The Win 10 box is currently off, the two NAS are always on.
Do you have a version that scans the domain instead of the workgroups? I’m on a domain but the program seems to be scanning each individual workgroup. (40 different computers = 40 different workgroups).
Nope. That’s a different animal!
I get
The list of servers for this workgroup is not currently available
But that is somewhat beside the point. How can any machine be the master browser if one does not exist? If it terminates then the function should pass to the next machine.
Should I be seeing the Samba server on the LAN?
BORON is not shown
KIRSTI 10.0.0.4 14-da-e9-52-12-12 HOLTAIN LTD.
NEON 10.0.0.27 2c-d0-5a-1f-eb-c3 HOLTAIN LTD.
OFFICE 10.0.0.6 00-25-22-cc-3e-c6 HOLTAIN LTD. MASTER
PEGGY 10.0.0.23 00-22-15-f3-37-13 HOLTAIN LTD.
SODIUM 10.0.0.22 70-54-d2-c0-89-92 HOLTAIN LTD.
TIRNANOG 10.0.0.1 54-04-a6-12-98-98 HOLTAIN LTD.
Normally, yes. If it’s set as Master, it should definitely show up. You can see the settings I use here.
What does error 53 from lanscan mean? I get this when my network is transitioned into its problematic state. That is after shutting down one machine, none of the remaining windows machines can see each other. Blinky-xp is identified as the master browser. I turn off Twinky-xp and then Blinky-xp, Pinky(W7) and Stinky(W8.1) can no longer see each other, or each others’ shares, and LanScan gives an error 53. Typing their static IP addresses is a solution most of the time.
It’s a Windows error, and it usually means that name resolution for a machine failed.
@Scottie
Is ihe value of workgroup = case sensitive in smb.conf?
I always use ALLCAPS for workgroup names. I’m pretty sure I read somewhere that you don’t have to, but certain (now older) flavors of OSes don’t play well otherwise.
@Scottie
Makes no ddifference, SMB shares still don’t show.
Could this be relevant-
http://www.tenforums.com/network-sharing/31136-samba-shares-dont-show-up-windows-10-network-post478094.html?s=d47441be13ea4165702e129d8319a998#post478094
It was a problem – until the March 1st Windows 10 update that rolled out. That seems to have fixed the Samba issues on all the machines I’ve tested, anyway.
@Scottie
Not seeing the Samba shares from either W 10 or W7 here.
I am not getting very far with this utility….System error 58 has occurred. The specified server cannot perform the requested operation. Press any key to exit…
I get this as soon as I execute the Lanscan.exe.
Any ideas? I am running Windows 7 as an administrator.
This is The Mystery Error. It usually means that there is some kind of conflict on your network. It seems it can even be a router, NAS, or other device that has Samba built in. Usually the thing I do is unplug devices one at a time, wait a few minutes, and try again. When things start working, I know which device/puter is causing the problem. Then I debug!
Ok, thanks.
I got lanscan to assist in diagnosing a problem with WDTV and Windows Shares. Most of the time I’ve run lanscan I’ve seen the computers I was expecting but none of them is marked as “Master”. The only time the WDTV worked was when there was a master listed (my router). Any idea of what is happening or not happening?
Yeah, I’ve got a WDTVLive… I think it wants somebody else on the network to be the Master, and if there isn’t one, sharing doesn’t work. Prolly the Samba implementation in the WDTV is kinda goofy. I fixed all sharing problems (almost) by having a linux box act as the Master, all the time, no matter what. Pretty funny that linux was required to make a bunch of Windows and Windows-friendly gizmos work properly! 😀
Hi Scottie
One little thing I’ve noticed. My box has two connections to the LAN, one ethernet, one wireless. Lanscanner reports there are two master browsers on the network and even says they have the same MAC address, but each entry refers to a different Hostname and IP address, which are correct – the only thing incorrect is that one of them is definitely not an MB, and the MAC address is wrong on one of them.
If you’d like a snapshot I’ll post one.
Thanks for a great app.
Hmm, looks like a bug… What’s the output if you do:
nbtstat -A IP_ADDY_1
nbtstat -A IP_ADDY_2
?
And then, if the MAC address of either of the above outputs 00-00-00-00-00-00, then I’d also need the output of:
arp -a IP_ADDY_X
That should be enough to figure out what’s going wrong, I think…
Thanks.
Both nbtstat commands output the MAC address with 00-00-00-00-00-00, but I’ve had to remote in to get the output and just realised that the Wireless is now off – outside of business hours (in case that makes a difference).
The arp -a output does retrieve the correct individual MAC addresses.
Did you need the actual output (some bits I’ll have to remove to keep things private).
Sorry, forgot to mention that the nbtstat -A command correctly identifies that there is only one Master Browser.
Yeah, I need to see the full output. Can you send it to me via the Contact link up top? Thanks!
I am using v1.63 on Win7 Pro machines. I cannot get the program to run. I have tried 4 machines running Win7 Pro x64, wired and wireless. I get the following:
Scanning LAN…
System error 1326 has occurred.
Logon failure: unknown user name or bad password.
I downloaded v1.64 and ran it in a Command.exe box and from my desktop but do not get any output.
The DOS box just goes back to the prompt.
Running from my desktop shows a DOS box that then goes away very quickly.
What am I missing?
Thanks for any help you can provide.
Hmm. I dunno! It should work anywhere now. Does it work if you stick in your Windows dir?
@Scottie
I placed the program in the Windows directory. Ran it with and without admin privileges. Same 1326 error.
Hi Scottie,
I just downloaded and ran in DOS box from C:\ on Windows 10
Grapped by Windows Defender claiming it contains malware … 🙁
Hope this helps pin-point the issue
PS. claimed to be a Trojan:Win32/Pocyx.C!cl
Not sure what’s going on here… I have the exact same version (just downloaded and ran it!) and scanning with Windows Defender and MalwareBytes results in “No threats detected.”
I think the problem is that malware from somewhere else already on your puter infected the executable… Either that, or this is the same false positive detection that McAfee finds, but like I said, my Defender detects nothing.
I do not think it is my PC that is infected. It is the lanscan.exe program that is detected every time. Also I checked on 2 different PCs with same result.
My PC is Windows 10 in Danish not that I see how language has a say!!??
Defender update 1.219.2355.00 ..??
Okay, lessee… I just updated my Defender to the same version. Then I downloaded LANscanner v1.64 from my own site. Decompressed, and ran from desktop. Nothing detected. So then I ran a Malwarebytes Antimalware scan on it (which finds LOTS more baddies than Defender), and it says 0 threats detected.
So, I’m not sure what’s going on. It isn’t my hosting company either, because I run the server!
Perplexed…
Hi, I just updated an older version of Lanscan (I`m on XP, worked fine) to the newest (from 2016/05/01). But it does not work any more. ruby.exe tells that the program was interrupted with STRG+C (STRG is german for CTRL).
I uploaded Lanscan Version 1.64 to https://www.virustotal.com
10 of 56 virus scanners discovered an infection.
Re-download 1.64. I remembered that I switched to Ocra 1.3.6 to build LANscanner 1.64, so I reverted back to Ocra 1.3.5.
When I scanned the new 1.64 version made using Ocra 1.3.5, only 1/56 scanners detect it (Qihoo-360, which I’ve never even heard of).
So, it seems to have been related to that somehow. But, unless the Ocra gem has malware in it, I’m still guessing it’s a false positive. But at least now with the new 1.64, other scanners will ignore it as they should.
I got Lanscanner v.1.54 back from a backup of my XP-VM. The result is a bit different from 1.64 running on Win 10. 1.54 only found one master browser “A” on my 1st LAN (192.168.0.20). Then there is another machine “B” sitting in my 2nd LAN, connected with Logmein Hamachi. 1.54 recognized it as 192.168.178.40 – no master browser. 1.64 recognized it as “25.103.XX.XXX”, which is a Hamachi-IP and called it master browser. So I assume 1.64 may be right. Are 2 master browser a problem? Should I inactivate the browsing service on “B”? Thanks!
1.64 includes a fix that was pretty big, so 1.64’s results should be more accurate. But, you CAN have multiple Master Browsers – if you have 2 different WORKGROUPs on the network(s).
@Scottie
Scottie, both parts of the LAN, connected with Hamachi, have the same name for the workgroup. I think, the problem is that a master browser should not be multi-homed:
https://support.microsoft.com/en-us/kb/188305
“Also, all master browsers must be single-homed.”
The results of Lanscanner vary, depending on which IP (local or Hamachi) of the master browser is answering. That`s why I switched off now the computer browser service on every computer which is multihomed (local + Hamachi), leaving only an old Linux-NAS and a XP-PostgreSQL-Server on my network as suitable as master browsers. But at least the network neighbourhood shows all machines again. Thanks for your software, it`s really helpful.
@Michael Logies
Is there a chance to get compatibility back for Windows XP? I just run the new v. 1.64 on another XP and got something like procedure entry “_gmtime64_s” was not found in DLL “msvcrt.dll”.
Oopsy… Somehow I missed this comment. Try v1.66. Should work again!
Hi Scottie
Downloaded new 1.64 version
Now Windows Defender does not complain anymore 🙂
I just downloaded the last version and get on German XP a fatal error:
_gmtime64s_ not found in msvcrt.dll.
Same as mentioned above by Michael.
@Freddie
I just released v1.66 which fixes this. Also fixes a bug with the better IP addy detection introduced in 1.65 (only seemed to be a problem in XP).
Scottie, We have troubles in our domain. At some time intervalls a few computers loose lan-connection and after a reboot the problem is temporarily solved. Your tool shows there are 2 masters in our LAN. One master is a domain-joined server and the other master is in a workgroup so not domain-joined. Should I Kill the master in the workgroup to solve this issue? There is only one master allowed in a lan. Correct?
Hmm, I’m never actually had to deal with domains. I would try exactly what you suggest, though I’m not sure how to do it!
Thnx fot your quick reply! Well, just disable the computer browser on de workgroup pc, i guess. I was wondering if the workgroup master could disturb the domain master. The’re both in the same subnet. I think that’s not good.
For killing a master browser: Inactivate the service “computer browser”. Whether you should have one or more master browser, depends on the number of subnets. For more, see https://en.wikipedia.org/wiki/Browser_service
I had to inactivate the service on several machines with two or more network interfaces (e. g. hosts for virtual machines).
Hi Scottie,
This is my second attempt at posting a comment here, as I tried a few days ago but that comment did not appear.
LANscanner 1.67 has a bug which manifests itself if the Windows 10 user has a VirtualBox Host-Only Network Adapter. In such as case, LANscanner does not report the node of the machine on which I run it, and it incorrectly reports another machine on the LAN as being a Master Browser. You can see the effect in the output pasted below (I hope the layout is preserved).
C:\WINDOWS\system32>nbtstat -n
VirtualBox Host-Only Network 2:
Node IpAddress: [192.168.56.1] Scope Id: []
NetBIOS Local Name Table
Name Type Status
———————————————
THUTMOSEIII UNIQUE Registered
THUTMOSEIII UNIQUE Registered
GREENGABLES GROUP Registered
GREENGABLES GROUP Registered
GREENGABLES UNIQUE Registered
☺☻__MSBROWSE__☻ GROUP Registered
Ethernet:
Node IpAddress: [192.168.1.74] Scope Id: []
NetBIOS Local Name Table
Name Type Status
———————————————
THUTMOSEIII UNIQUE Registered
THUTMOSEIII UNIQUE Registered
GREENGABLES GROUP Registered
GREENGABLES GROUP Registered
GREENGABLES UNIQUE Registered
☺☻__MSBROWSE__☻ GROUP Registered
WiFi:
Node IpAddress: [0.0.0.0] Scope Id: []
No names in cache
Local Area Connection* 11:
Node IpAddress: [0.0.0.0] Scope Id: []
No names in cache
C:\WINDOWS\system32>nbtstat -A 192.168.1.79
VirtualBox Host-Only Network 2:
Node IpAddress: [192.168.56.1] Scope Id: []
Host not found.
Ethernet:
Node IpAddress: [192.168.1.74] Scope Id: []
NetBIOS Remote Machine Name Table
Name Type Status
———————————————
TUTANKHAMUN UNIQUE Registered
TUTANKHAMUN UNIQUE Registered
TUTANKHAMUN UNIQUE Registered
GREENGABLES GROUP Registered
GREENGABLES GROUP Registered
MAC Address = 00-00-00-00-00-00
WiFi:
Node IpAddress: [0.0.0.0] Scope Id: []
Host not found.
Local Area Connection* 11:
Node IpAddress: [0.0.0.0] Scope Id: []
Host not found.
C:\WINDOWS\system32>lanscan
LANscanner v1.67 – ScottiesTech.Info
Scanning LAN…
Scanning workgroup: HOME…
Scanning workgroup: GREENGABLES…
BTHUB5 192.168.1.254 11-11-11-11-11-11 HOME MASTER
THUTMOSEIII 192.168.56.1 22-22-22-22-22-22 GREENGABLES MASTER
TUTANKHAMUN 192.168.1.79 33-33-33-33-33-33 GREENGABLES MASTER
SMENKHKARE 192.168.1.90 aa-bb-cc-dd-ee-ff GREENGABLES
AKHANATEN 192.168.1.70 55-55-55-55-55-55 GREENGABLES
Press any key to exit…
This is fixed in version 1.68.
Basically, the VirtualBox Host Only Network adapter appears as another IP. Also, when you have a machine with multiple network adapters, there is no way for LANscanner to know from which adapter you are scanning, and therefore the results are all wonky.
So, starting with v1.68, you must specify the -nodeip option. Like so:
lanscan.exe -nodeip 192.168.1.127
…where (for example) 192.168.1.127 is the IP of your ethernet adapter. This will make LANscanner ignore the VirtualBox adapter, your WiFi adapter, etc. when it looks for the MSBROWSE and MAC addies. This is annoying if your network adapter changes IP frequently, but alas, there is no way I can see to fix this other than manually telling LANscanner what it’s supposed to pay attention to.
It also ignores the MAC addy on Win 10 for the Vbox Virtual Host-Only adapter, which appears to be 0a:00:27:00:00:0d. If somebody has VirtualBox and theirs uses a different MAC addy, I can add it easily to the “MAC ignore list”.
Hi Scottie,
Thanks for updating LANscanner to Version 1.68. (By the way, there is a typo in lanscan_help.txt; you have written the release date as 28 Oct 2017.)
ipconfig /all now reports the MAC address of the VirtualBox Host-Only Network Ethernet Adapter on my machine running Windows 10 (Anniversary Update) as 0A-00-27-00-00-08, so the MAC address is not always 0a:00:27:00:00:0d.
I tried Version 1.68 of LANscanner with the new option, but it still does not produce the expected results (see below). However, it does report the correct MAC address for the primary node, but against the wrong IP address.
C:\WINDOWS\system32>nbtstat -n
VirtualBox Host-Only Network:
Node IpAddress: [192.168.56.1] Scope Id: []
NetBIOS Local Name Table
Name Type Status
———————————————
THUTMOSEIII UNIQUE Registered
THUTMOSEIII UNIQUE Registered
GREENGABLES GROUP Registered
GREENGABLES GROUP Registered
GREENGABLES UNIQUE Registered
☺☻__MSBROWSE__☻ GROUP Registered
Ethernet:
Node IpAddress: [192.168.1.74] Scope Id: []
NetBIOS Local Name Table
Name Type Status
———————————————
THUTMOSEIII UNIQUE Registered
THUTMOSEIII UNIQUE Registered
GREENGABLES GROUP Registered
GREENGABLES GROUP Registered
GREENGABLES UNIQUE Registered
☺☻__MSBROWSE__☻ GROUP Registered
WiFi:
Node IpAddress: [0.0.0.0] Scope Id: []
No names in cache
Local Area Connection* 2:
Node IpAddress: [0.0.0.0] Scope Id: []
No names in cache
C:\WINDOWS\system32>nbtstat -a TUTANKHAMUN
VirtualBox Host-Only Network:
Node IpAddress: [192.168.56.1] Scope Id: []
Host not found.
Ethernet:
Node IpAddress: [192.168.1.74] Scope Id: []
NetBIOS Remote Machine Name Table
Name Type Status
———————————————
TUTANKHAMUN UNIQUE Registered
TUTANKHAMUN UNIQUE Registered
TUTANKHAMUN UNIQUE Registered
GREENGABLES GROUP Registered
GREENGABLES GROUP Registered
MAC Address = 00-00-00-00-00-00
WiFi:
Node IpAddress: [0.0.0.0] Scope Id: []
Host not found.
Local Area Connection* 2:
Node IpAddress: [0.0.0.0] Scope Id: []
Host not found.
C:\WINDOWS\system32>lanscan -nodeip 192.168.1.74
LANscanner v1.68 – ScottiesTech.Info
Scanning LAN…
Options:
– Using primary node IP: 192.168.1.74
Scanning workgroup: HOME…
Scanning workgroup: GREENGABLES…
BTHUB5 192.168.1.254 11-11-11-11-11-11 HOME MASTER
THUTMOSEIII 192.168.56.1 22-22-22-22-22-22 GREENGABLES MASTER
TUTANKHAMUN 192.168.1.79 33-33-33-33-33-33 GREENGABLES MASTER
AKHANATEN 192.168.1.10 44-44-44-44-44-44 GREENGABLES
Press any key to exit…
Do you know which device/adapter has this 192.168.1.79 IP?
Yes, it is one of my laptops. It definitely was not a Master Browser.
@Fitzcarraldo
I should have time to look into this later, but not at the moment… In the shorter term, have you ever tried just disabling the Vbox Virtual Adapter? I always disable it, and everything works fine. Actually, everything works better, because for some reason the virtual adapter screws up my Windows network shares and such. Disabling the Vbox adapter also doesn’t seem to break anything – at least not anything I use or do in VirtualBox.
Not to worry, Scottie. It is not a problem for me personally because the Samba command ‘nmblookup -M — -‘ on any Linux machine on the LAN correctly finds all the Master Browsers in this situation. I was more pointing out the current problem with LANscanner in case some of your readers use Windows machines only. Keep up the good work.
Ah yes, the linux tool works better with Windows networking than Windows does. Why am I not surprised? I actually use samba on a linux box as the master browser in order to make my Windows workgroup work properly. SIGH… I don’t dare to use a Homegroup, because I doubt that’s much better.
The Microsoft networking tools are poor, to say the least. Quite a few people on the Web are complaining that the Windows Anniversary Update breaks networking, but currently I don’t have trouble with Windows networking. My LAN is a mixture of machines running Linux, Windows and Android. The only machine running 24/7 is a Linux server. The only issue I have is minor and surmountable: non-Windows machines are unable to copy files into the default subfolders in C:\Users\Public on the Windows machines, although it’s not a big deal as they can copy files into manually-created subfolders in C:\Users\Public and into the C:\Users\Public folder itself. I have configured Samba on each Linux machine to allow all Linux and Windows machines to participate in Master Browser elections, which works fine. Sometimes a Windows desktop or laptop becomes the Master Browser; sometimes a Linux laptop or the server becomes the Master Browser. As I have a mixed-OS network I don’t use a Windows HomeGroup (Samba will not work in a HomeGroup, as far as I am aware). And HomeGroups are one more layer of complexity I can do without.
Trying to run on 2k12r2 and getting a error 50?
C:\tools>lanscan.exe
LANscanner v1.68 – ScottiesTech.Info
Scanning LAN…
System error 50 has occurred.
The request is not supported.
Press any key to exit…
I’m pretty sure LANscanner won’t work on Windows Server – at least not very well. The Server versions do networking commands and stuff differently – in a nutshell – and I don’t have any version of Windows Server to test it on.
Windows Server uses DNS for name resolution in conjunction with DNS registration. When a Windows system boots whether it has a static IP or a dynamic IP it attempts to register it’s hostname into the DNS server. On a windows domain, the domain controller runs the DNS server and that server is modified to collect the names and pass them to any domain clients that send browse requests to the domain controller. This greatly reduces broadcast traffic which is desirable on a large network (typically where a windows domain is used)
It is still possible to have workgroup-style master browsers on such a network, any machine that isn’t joined to the domain can act as a master browser.
How can I run this against another sub-net? It works fine running it from each individual sub-net but doesn’t seem to cross sub-nets in a Server 2012 R2 domain.
You cannot run this on another subnet. The Master Browsing workgroup-styled function is based on broadcast traffic. Broadcast traffic by default is not passed through TCP/IP routers (if it was the entire Internet would melt down)
“A remote API error occurred.” “More help is available by typing NET HELPMSG 2127.”
Getting this error again with the latest LANScan.
Have discovered that my Seagate NAS has once again grabbed the Master Browser function. I will have to power it down to allow another PC to take over that function. One of these days I will remember this problem. Sigh
Nice work Scottie.
I have one problem using it with with Windows 10×64.
The lanscan window closes immediately after the scan before I can read the text.
Both 1.64 & 1.68 do it, regardless of whether run from a CMD window or Windows Explorer.
Can the output be piped to a file, or the Windows be forced to stay open?
Thanks,
Greg
Hmm, that’s a bit odd, and might indicate some kind of wonky error for one reason or another.
There is a “pause” at the end of the script, which should work whether you fire it up via cmd or a shortcut, which works fine in both cases for me on the same version of Win 10.
You can pipe the output to a text file like so:
lanscan.exe > result.txt
Interesting tool, this mimics what the old browstat.exe tool used to do for Windows XP. Printing the workgroup name and master browser status makes it Really Useful.
Please consider adding the IPv6 IP addresses of hosts. Regular “master browsing” is used in conjunction with Link-Local Multicast Name Resolution (LLMNR) on workgroup-style (and homegroup) networks to find machine names on the network. LLMNR is documented in this article:
https://technet.microsoft.com/library/bb878128
As you mentioned in your post the browser service is used to obtain a list of names and IPv4 of machines to display in Explorer, and net view, etc. But, Windows also uses LLMNR to send out a multicast request for names available on IPv6 and caches those as well. You could for example setup a Windows machine, disable IPv4, share out via IPv6 only, and connect to it from other Windows Machines by name.
Unfortunately there is no way to dump the contents of the DNS cache on Windows 7, that capability was added into the operating system with Windows 8. The ipconfig /displaydns command on Windows 7 only reports IP addresses looked up from a DNS server that are in the cache. On Windows 8 and later you can run the PowerShell command Get-DnsClientCache command and get everything
When a machine attempts to connect to a fileshare on another machine, if the second machine has both IPv4 and IPv6 available for it’s name, it will make that filesharing connection via IPv6. So, you could have a number of strange situations. For example a machine could be failing a Homegroup connection even though it’s name is present in the Master Browser generated list (and in your tool’s output) because the owner had disabled IPv6 on it (for some reason Microsoft forces Homegroup connections to use IPv6 exclusively)
System error 6118 has occurred. The list of servers for this workgroup is not currently available.
Trying to use this tool to track down odd behavior in a Windows 10 workgroup configuration. I am obviously missing something very basic…when I run the utility it returns “The service has not been started” and then exits. No details on what service it is referring to, just the generic message.
Windows 10 Pro new install.
Please let me know what I am missing.
Thanks.
I think this means the “Computer Browser” service in Services is not running.
After Windows 10 Creatores Update 1703 the Computer Browser service has been brooken.
Today I installed the latest 2017-6 Cumulative Update KB4022716 the problem has gone! I am able to browse the shares on my network and all the workgroups are visible!
For offline update:
http://www.catalog.update.microsoft.com/Search.aspx?q=KB4022716
Aha! Thanks for this. Interestingly enough, I have Win 10 Pro, and Computer Browser was not broken by 1703… But maybe I’m just lucky!
I assumed the same thing and I checked it before posting. It was set to manual and then I started it. Ran the utility and still received the same error.
Ah, in that case, it’s the “god I love Windows networking…” problem. 😉
At the moment, I have 2 puters: both are seen just fine by LANscanner, and each other. Can browser shared + public folders, etc.
But one puter’s Windows Media Player cannot see the content on the other, but the other direction works fine.
SIGH…
All Windows 10 computers can see all Windows 7 computers. Windows 10 computers can not see any other windows 10 computers except for the Absurd Master browser which can see everything on the network.
I feel like I’m dealing with Windows for workgroup again, this is pathetic.
What service other than computer browser would be required for the utility to run?
As far as I know, that should be it. Trouble is, Windows networking sucks. If you turn on and join a Homegroup, that still doesn’t fix everything in my experience.
Microsoft is not a solution … Microsoft is a problem … for which there is no solution!