Configuring Master Browser in peer to peer network

J

John Wunderlich

So an update.
I have had all the firewalls turned off all day and now I am
getting the 8021 error on computer1 (it was previously on
Computer2)

Somehow your computers do not communicate at times for this to
happen.

Do you have a Cisco VPN client installed? It has a firewall that's
active even when the client isn't. If so, uncheck it in the Options
menu.

Are your network cards powering down during idle times? Bring up
Device Manager (start->Run->devmgmt.msc), double-click on your
network card, Power Management Tab, Uncheck "Allow computer to turn
off this device..."

HTH,
John
 
J

Jill

So I continue to have problems.

I downloaded this little vbs script that should find the MB. It reports that
it can't find the MB on my network. I have tried it on all of the computers
without the firewall active. I also tried it on another peer to peer network
and it did correctly find the MB.

When I run the script on my network it creates a text file NetViewList which
does have all of the computers listed

Server Name Remark

-------------------------------------------------------------------------------
\\COMPUTER1 Computer1
\\COMPUTER2 Computer2
\\COMPUTER3 Computer3
\\COMPUTER4 Computer4
\\COMPUTER5 Computer5
The command completed successfully.


The NBTlist file on my network differs from the other network is does have
the names of the computers and the workgroup name, but does not have "
...__MSBROWSE__.<01> GROUP Registered"

also the MAC address of the working network has the MAC address of the
adapter, on my network it is all 0
MAC Address = 00-00-00-00-00-00

The VBS script is below. I commented out the 2 lines that will delete the
files mentioned above. You may want to delete them from your root directory
after the fact.



------------------- VBS SCRIPT ----------------------
Option Explicit
Dim WshShell, FileSystem, RegularExpression, PFound1, Dummy, TheNVFile,
TheLine, ThePattern1, ThePattern2
Dim Flag, SysName, NBTable, ThePattern3, PFound2, ThePattern4, WrkGrp,
TheText, ThePattern, Match
Dim Matches, TheMatch, NBCommand, TheNBTFile
Const ForReading = 1

Set WshShell = WScript.CreateObject("WScript.Shell")
Set FileSystem = CreateObject("Scripting.FileSystemObject")
Set RegularExpression = New RegExp

Dummy = WshShell.Popup ( "Finding Master Browser. Please Wait...",1,"Find
Master Browser Utility",64)

WshShell.Run "Cmd.exe /c Net View > C:\NetViewList.txt", 2,True
Set TheNVFile = FileSystem.OpenTextFile("C:\NetViewList.txt", ForReading,
True)

Do While TheNVFile.AtEndOfStream <> True
TheLine = TheNVFile.ReadLine
ThePattern1 = "\\"
PFound1 = FindPattern(TheLine, ThePattern1)
If PFound1 Then
ThePattern2 = "\\\\\w*"
Flag = "1"
SysName = GetPattern(TheLine, ThePattern2, Flag )
NBTable = GetNBTable(SysName)
ThePattern3 = "MSBROWSE"
PFound2 = FindPattern(NBTable, ThePattern3)
If PFound2 Then
ThePattern4 = "\w* \w* <1E>"
Flag = "2"
WrkGrp = GetPattern(NBTable, ThePattern4, Flag)
Exit Do
End If
End If
Loop

If PFound2 Then
Dummy = MsgBox("The computer acting as the Master Browser" & vbCrLf &_
" for the workgroup " & WrkGrp & vbCrLf &_
" is " & SysName, 4160, "Find Master Browser Utility")
Else
Dummy = MsgBox("No Master Browser found at this time. " & vbCrLf &_
"Chances are that an election is in progress.", 4144, "Find Master Browser
Utility")
End If

TheNVFile.Close
rem FileSystem.DeleteFile("c:\NetViewList.txt")

Wscript.Quit


Function FindPattern(TheText, ThePattern)
RegularExpression.Pattern = ThePattern
If RegularExpression.Test(TheText) Then
FindPattern = "True"
Else
FindPattern = "False"
End If
End Function

Function GetPattern(TheText, ThePattern, Flag)
RegularExpression.Pattern = ThePattern
Set Matches = RegularExpression.Execute(TheText)
For Each Match in Matches
TheMatch = Match.Value
If Flag = "1" Then TheMatch = Mid(TheMatch, 3)
If Flag = "2" Then TheMatch = Left(TheMatch, 15)
Next
GetPattern = TheMatch
End Function

Function GetNBTable(SysName)
NBCommand = "nbtstat -a " & SysName
WshShell.Run "Cmd.exe /c " & NBCommand &" > C:\NBTList.txt", 2,True
Set TheNBTFile = FileSystem.OpenTextFile("C:\NBTList.txt", ForReading,
True)
GetNBTable = TheNBTFile.ReadAll
TheNBTFile.Close
rem FileSystem.DeleteFile("C:\NBTList.txt")
End Function
--------------- END OF SCRIPT ------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top