Post by g***@aol.comPost by PaulPost by g***@aol.comI have a network with several PCs connected (hardwired) along with 3
TVs, 3 DVRs, VoIP that get to the net OK. It seems I always seem to
have some PCs that will not report. A might see B but B can't see A.
Sometimes A can't even see itself but the other machines do. Usually
they all get to the internet from the main router OK, even when they
can't see each other.
If you run around rebooting everything (router, switches and clients),
they usually all show up but there has to be a better way.
W/7 on all, "Home" network and all sharing options are enabled set to
"everyone".
I tried to get a script running, to give info on the "Browse Master",
which is the nameserver for file sharing machines. But you may have
noticed that some of the more advanced OSes, no longer "show themselves"
in the Network Neighbourhood, and this is making the script to
show the status of the network look pretty silly (info missing).
I can't share a script with you, because it doesn't work!
When you cascade routers, that does not make all the machines "equal"
for file sharing purposes. It makes them equal in terms of achieving
Internet access. But if a machine on router #2 wants to file share with
a machine on router #3, that does not necessarily work. Whereas switches
are "flat", and switches are preferred for fanout. After all,
the router itself uses a switch chip (or equivalent) to run the
four Ethernet ports on the back. You can get 4 port or 8 port unmanaged
switches for the home LAN, at a reasonable price.
You may want to use routers specifically for some isolation reasons.
But if the only purpose of your usage of routers, is to "get more
switch ports on the back", you should be using a switch box instead.
I have a small network here, and only one switch box. A Netgear GS605
which is five ports GbE, and since the ports have MDI/MDIX, none
of the ports needs to be "painted yellow" or anything. All the ports
have the same wiring plan, and are equal when wiring it up as a four
port switch. If can be a five port switch, if there is no plan to
wire the LAN to the Internet.
You can leave the WAN port disconnected on a router, and then the
four switch ports on the back, work as switch ports.
But, honestly, we all know the WIndows software is responsible for
90% of your trouble :-) The trick, is to acquire good debugging tools,
to work on it.
Wireshark can record attempts to connect to a machine. When I did that,
and I used the Wireshark "dissector" for file sharing, it showed me
a "bitmap status word" for the failure, but, the dissector did not descend any deeper,
to print out what was going on. When I looked up the status word,
the documentation said "when this bit is set, it means..."
Need More Information
In other words, the server I was connecting to, would not authenticate,
and some information is not correct. It's the "nerd equivalent" of
"something happened" :-/ Bastards.
Paul
This is all on the back end of one router and about 5 switches.
The script just doesn't seem to be ready for the virtualized mess of W10/W11.
My ipconfig has at least five sections to it (I have VirtualBox, VMWare Workstation,
and WSL2/WSLg installed.)
The first problem with home-made scripts, is the execution policy in Powershell.
You use Get-ExecutionPolicy, in order to record
what state you want to return it to, when finished.
powershell
Get-ExecutionPolicy (returns Restricted)
Set-ExecutionPolicy Unrestricted (RemoteSigned, AllSigned, Restricted)
D:\filesha1.ps1 somefile.bin (Full path for .ps1 files, .\filesha1.ps1 if working dir is correct for it.)
...
Set-ExecutionPolicy Restricted (if returning things like they were)
In the case of the following script, it can be run in an unelevated Powershell window.
So while the previous chunk shows an example all done in an Administrator Powershell
window, the following does not have to be elevated.
*************************** Get-BrowseMaster.ps1 ******************************
# Modified by CoPilot
# Original: https://www.computerperformance.co.uk/powershell/function-browsemaster/.
function Get-BrowseMaster {
# Check if local machine is the Windows Browse Master. Might not work in W10/W11 (self-query).
$Discovery = NBTStat -a $Env:ComputerName | Out-String -Stream | Select-String "MSBrowse"
if ($Discovery -match "MSBrowse") {
"$Env:ComputerName is the Browse master"
}
else {
# Get a list of all machines on the network
$ComputerNames = NET.EXE VIEW | ForEach-Object {
if ($_ -match "^\\\\\\s*(?<Name>\S+)\s+") {
$matches.Name
}
}
# Test each machine with NBTStat to find the browse master
foreach ($Computer in $ComputerNames) {
$Discovery = NBTStat -a $Computer | Out-String -Stream | Select-String "MSBrowse"
if ($Discovery -match "MSBrowse") {
"$Computer is the Browse master"
break
}
}
}
}
# Execute the function
Get-BrowseMaster
*************************** End of Get-BrowseMaster.ps1 ******************************
You can use the commands individually, to see what they do
PS S:\> nbtstat -a GREGORE # Check some remote machine
PS S:\> net view # Query the BrowseMaster ?
nbtstat -a WALLACE # Use GREGORE machine to probe WALLACE W11 (dailydriver)
Ethernet:
NetBIOS Remote Machine Name Table
Name Type Status
---------------------------------------------
WALLACE <00> UNIQUE Registered
WORKGROUP <00> GROUP Registered
WALLACE <20> UNIQUE Registered
WORKGROUP <1E> GROUP Registered
WORKGROUP <1D> UNIQUE Registered
☺☻__MSBROWSE__☻<01> GROUP Registered <=== WALLACE just might be the BrowseMaster.
Probability high, because address is 192.168.2.101 (correct)
*******
To run the script, you CD to the directory you saved it in, and do
this while in a Powershell shell.
.\Get-BrowseMaster.ps1
The MSBROWSE line has some hex bytes around the string, like this
0x01 0x02 __MSBROWSE__ 0x01
which makes it appear a bit weird in the Terminal you are using.
I wanted to write a summary of the symptoms, but it's just getting
too complicated. It's not a surprise that the File Explorer itself
has the wrong info, when I can't even spot a pattern.
In the 80's, our computing project at work (our own OS), we did
a nameserver. It was pretty ordinary and unexceptional. It just worked.
It registered (at least) print servers and file servers. I don't
remember the other node types now.
That's why the Windows behavior is such a puzzle to me, based on
my experience. Yes, it has elections to see who will be BrowseMaster.
But that part of it, appears to work. Then why the fuck is the
basic nameserving function so broken ??? Can't... grok... this.
I don't care how many dialects and flavors there are, there's no excuse.
And if you spend the time to verify that the seven services are
running in Windows 7, you hardly find that situation busted. That's
why I don't waste a lot of time treading on that territory. It is
hardly ever productive, after you've checked after a fresh install.
There are two services that begin with the word Function, and one
of those should be able to talk to a WinXP machine OK.
Paul