LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   what protocol does Windows 10 use to discover network hosts? (https://www.linuxquestions.org/questions/linux-networking-3/what-protocol-does-windows-10-use-to-discover-network-hosts-4175663365/)

mfoley 10-29-2019 01:52 PM

what protocol does Windows 10 use to discover network hosts?
 
Not sure this is a Linux question, but I'll start here. Our newly installed Windows 10 computers have some issues listing hosts on the network. Only two of 4 Windows 7 computers show and only one of 6 Windows 10 computers show. No Linux or Mac computers are listed. When viewing network computers from the Windows 7 hosts, all computers, Windows 7, Windows 10, Linux and Mac, show up. This issue for Windows 10 is all over the Internet. In researching this issue, a suggested solution was to set Control Panel > Programs & Features > Turn Windows features on or off > SMB 1.0/CIFS Sharing Support, and checking SMB 1.0/CIFS Client and SMB 1.0/CIFS Server. After doing that, all Network hosts (Win7, Win10, Linux, Mac) show on the Windows 10 computer.

Supposedly, SMB 1.0 is obsolescent and insecure, but Windows 10 cannot see all network hosts without this setting, and why it can see the odd Win7 or Win10 computer or two is inexplicable.

The question here is, what would the Windows 10 machine be sending to the Linux host for the Linux host to reply back acknowledging its presence? Why would Linux be responsive to SMB 1.0 and not a more recent version of SMB? Can I determine what version of SMB is enabled on Linux? Can Linux be set to use SMB 2.0 or whatever?

Note that SMB in this case refers to Server Message Block, not Samba.

Rickkkk 10-29-2019 02:16 PM

Quote:

Originally Posted by mfoley (Post 6051968)
Not sure this is a Linux question, but I'll start here. Our newly installed Windows 10 computers have some issues listing hosts on the network. Only two of 4 Windows 7 computers show and only one of 6 Windows 10 computers show. No Linux or Mac computers are listed. When viewing network computers from the Windows 7 hosts, all computers, Windows 7, Windows 10, Linux and Mac, show up. This issue for Windows 10 is all over the Internet. In researching this issue, a suggested solution was to set Control Panel > Programs & Features > Turn Windows features on or off > SMB 1.0/CIFS Sharing Support, and checking SMB 1.0/CIFS Client and SMB 1.0/CIFS Server. After doing that, all Network hosts (Win7, Win10, Linux, Mac) show on the Windows 10 computer.

Supposedly, SMB 1.0 is obsolescent and insecure, but Windows 10 cannot see all network hosts without this setting, and why it can see the odd Win7 or Win10 computer or two is inexplicable.

The question here is, what would the Windows 10 machine be sending to the Linux host for the Linux host to reply back acknowledging its presence? Why would Linux be responsive to SMB 1.0 and not a more recent version of SMB? Can I determine what version of SMB is enabled on Linux? Can Linux be set to use SMB 2.0 or whatever?

Note that SMB in this case refers to Server Message Block, not Samba.

As you yourself have mentioned, this is a common issue. As different versions of both linux and Windows come out and as boxes running these OSes are updated at various times, clashes between the versions of SMB happen.

Samba is linux's implementation of SMB, by the way.

Yes you can specify which version of the SMB protocol you want linux boxes to use. A linux box can be a samba server, client or both. Configure the settings (including which version of the smb protocol to use) in /etc/samba/smb.conf. See the man page for details - it is very well documented.

Let us know how you make out.

273 10-29-2019 02:55 PM

I think thewre is some new extension so Zeroconf can do DNS also. Works with DHCvP also.

jefro 10-29-2019 05:15 PM

Workgroup?

Use lmhosts?

Assign master?

mfoley 10-29-2019 11:12 PM

Quote:

Originally Posted by Rickkkk (Post 6051978)
As you yourself have mentioned, this is a common issue. As different versions of both linux and Windows come out and as boxes running these OSes are updated at various times, clashes between the versions of SMB happen.

Samba is linux's implementation of SMB, by the way.

Yes you can specify which version of the SMB protocol you want linux boxes to use. A linux box can be a samba server, client or both. Configure the settings (including which version of the smb protocol to use) in /etc/samba/smb.conf. See the man page for details - it is very well documented.

Let us know how you make out.

With respect to the Linux host specifically, several of them are not running samba. How then do the Windows 7 host ever see them? Why would the Windows 10 hosts see them after I enable SMB 1.0 on the Windows 10 hosts? Related: I don't believe I even have Samba on the Mac computers, yet same phenomenon.

explique moi s'il te plait!

Rickkkk 10-30-2019 07:31 AM

Quote:

Originally Posted by mfoley (Post 6052105)
With respect to the Linux host specifically, several of them are not running samba. How then do the Windows 7 host ever see them? Why would the Windows 10 hosts see them after I enable SMB 1.0 on the Windows 10 hosts? Related: I don't believe I even have Samba on the Mac computers, yet same phenomenon.

explique moi s'il te plait!

Salut mfoley ... un résident de l'Ohio qui parle français :) Originalement du Québec, de la France, ailleurs en francophonie ? ...

So - continuing in English ... Interesting situation you are describing.

When you say that the Windows computers can "see" the linux computers without the use of Samba on the linux side, are you actually able to access file shares or just see that there is a computer on the network ?

Several newer technologies (zeronconf was mentioned earlier, WS-Discovery ...) exist and are part of recent versions of Windows. However, I believe proper file sharing, with a network-aware file system, between linux and Windows still requires smb / cifs (or nfs, the linux-based "equivalent" .. I have never personally set up nfs on a Windows box but I understand that it is possible ... ).

It *is* curious, however, that you must enable smb v1 on the W10 computers for them to "see" the linux boxes .. Intuitively this would imply that smb (samba) is configured on the linux side ...

Not 100% sure what is going on here ... Any other network-savvy members feel like chiming in ?

michaelk 10-30-2019 08:03 AM

In my limited understanding... Basic network browsing depends on SMB version 1. Basically netbios name service broadcasts the netbios name over the network at startup and a set interval. Other computers pick up the broadcasts and stores its name/ip address in a list.
https://www.samba.org/samba/docs/using_samba/ch07.html

Windows has a new protocol for browsing a network called WS-Discovery. Although my two Windows 10 computebrowsers I think are configured the same but do not see each other. As far as I know if samba is not running then Windows 7,10 should not be able to see the linux host although WS-Discovery scans other protocols to automatically pick up printers and other network devices.

I believe there is WS-Discovery support in work.

As a FYI my Mint 19 file browser is able to "see" my Windows 10 computer that is shared although it fails to connect. CentOS 7 file browser can not see any shares but can connect if entered manually.

It may also depend on how the Windows 10 computers networking is configured. Whether it is defined as a public or private,if network discovery is enabled and if all computers are in the same workgroup.

mfoley 10-30-2019 12:16 PM

Quote:

Originally Posted by Rickkkk (Post 6052204)
Salut mfoley ... un résident de l'Ohio qui parle français :) Originalement du Québec, de la France, ailleurs en francophonie ? ...

Une femme française
Quote:

So - continuing in English ... Interesting situation you are describing.

When you say that the Windows computers can "see" the linux computers without the use of Samba on the linux side, are you actually able to access file shares or just see that there is a computer on the network ?
Accessing files is not the issue, or a problem. For those Linux hosts having Samba mounts, the Windows 10 computers can "Map" them just fine. Likewise, Linux hosts can access "Shared" drives on the Windows 10 computer, but only if I mounted cifs ver=2.1. Now that I've enabled SMB 1.0/CIFS on the Windows 10 computers, I don't have to use the ver=2.1 mount option (although it still works using that).

However, my issue does not have to do with accessing files between Win10 and Linux. I'm talking about Linux computers which are not running Samba at all. The Windows 7 computers could "discover" these hosts as shown in Windows Explorer > Network. Windows 7 computers could see ALL computers on the network including Window 7, Windows 10, Linux and Mac. The Windows 10 computers could only see a couple of the Windows 7 and only one other Windows 10 host on the network before enabling SMB 1.0.
Quote:

It *is* curious, however, that you must enable smb v1 on the W10 computers for them to "see" the linux boxes .. Intuitively this would imply that smb (samba) is configured on the linux side ...
But it's not ... at least not consciously. the smb and nmb tasks are not configured to run at startup, nor do they show in 'ps', and the smb.conf file does not exist. You put your finger on the heart of the issue: what, on Linux (if not Samba), is responding to what kind of query from the Windows 10 hosts?
Quote:

Originally Posted by michaelk (Post 6052211)
In my limited understanding... Basic network browsing depends on SMB version 1. Basically netbios name service broadcasts the netbios name over the network at startup and a set interval. Other computers pick up the broadcasts and stores its name/ip address in a list.
https://www.samba.org/samba/docs/using_samba/ch07.html

Windows has a new protocol for browsing a network called WS-Discovery. Although my two Windows 10 computebrowsers I think are configured the same but do not see each other.

Yes, same here, although I could see one of the 6 Windows 10 computers from Windows 10. Inexplicable. They were all purchased and installed at the same time, so why is this one Windows 10 workstation visible and others not? (rhetorical)
Quote:

As far as I know if samba is not running then Windows 7,10 should not be able to see the linux host although WS-Discovery scans other protocols to automatically pick up printers and other network devices.
It seems to make no difference whether the Linux hosts are running Samba or not. I have 2 Linux Samba file servers. Checking their protocols I get:

client max protocol = default
client min protocol = CORE
server max protocol = SMB3
server min protocol = LANMAN1

Now, I have no idea what "CORE" or "default" are. I haven't been able to find documentation describing this. I may experiment by setting the min client protocol to SMB2, but as mentioned, sharing files is not my problem. Identifying computers on the network is. Why? because some programs, like Acronis, use a Windows Explorer-link waterfall list of drives and network hosts in order to let the user select a local (Drive) or network target for saving the backup file. If the target host is not visible, it's not a choice.
Quote:

I believe there is WS-Discovery support in work.

As a FYI my Mint 19 file browser is able to "see" my Windows 10 computer that is shared although it fails to connect. CentOS 7 file browser can not see any shares but can connect if entered manually.
Not sure what you mean by "see". Are you talking about a desktop GUI tool on Mint? Or simply 'ping'? By connect, do you mean mounting a Windows 10 share? I can mount the share using, mount //win10host/C /mnt/hd -o vers=2.1,username=joe,password=pw
Quote:

It may also depend on how the Windows 10 computers networking is configured. Whether it is defined as a public or private,if network discovery is enabled and if all computers are in the same workgroup.
Network discovery is turned on for everything: private, guest and domain. All Windows 7, all Windows 10, two Linux and three Mac computers are members of the same Active Directory Domain. Two Linux computers are NOT part of the Active Directory domain. None of this seems to matter.

So, in the end, do we or do we not know what mechanism Windows 10 is using to probe network computers for their presence? Clearly, successful discovery depends on the SMB version. What on Linux is responding to this "probe"? Can Linux's responding app be set to use SMB 2.0?

273 10-30-2019 02:00 PM

My understanding was that newer Windows clients provide their hostname to the DHCP server when they are given the lease but Linux clients do not, by default at least.

Rickkkk 10-30-2019 02:43 PM

Hey mfoley,

Quote:

It *is* curious, however, that you must enable smb v1 on the W10 computers for them to "see" the linux boxes .. Intuitively this would imply that smb (samba) is configured on the linux side ...
Quote:

But it's not ... at least not consciously. the smb and nmb tasks are not configured to run at startup, nor do they show in 'ps', and the smb.conf file does not exist. You put your finger on the heart of the issue: what, on Linux (if not Samba), is responding to what kind of query from the Windows 10 hosts?
.. honnêtement, je ne sais pas quoi te dire ... This has me stumped. I'd have to fool around with a similar setup at home before I even had the chance to come up with something intelligent to say :redface: ... The mismatched versions of smb I've had *tons* of experience with and know how to fix. This is another story ...

Quick question : can you access shares on a Windows 10 computer from one of the linux computers that *isn't* running smb ?

Other members here may still have some insight, but it would be interesting to hear what a similar Windows forum might come up with ...

Rickkkk 10-30-2019 04:18 PM

mfoley / all :

Came across this information (new to me ..) while researching this issue ...

From Wikipedia article:
Quote:

CIFSD is an open-source in-kernel CIFS/SMB server created by Namjae Jeon for the Linux kernel. Initially the goal is to provide improved file I/O performance, but the bigger goal is to have some new features which are much easier to develop and maintain inside the kernel and expose the layers fully.
Comments from anyone more familiar with this technology ? Could this possibly be an explanation ?

michaelk 10-30-2019 04:27 PM

Quote:

Quick question : can you access shares on a Windows 10 computer from one of the linux computers that *isn't* running smb ?
Yes, There are two parts to samba i.e the server and client. Most of the mainstream file browsers have a built in SMB client and you can connect directly using the URL smb://IP_address or smb://IP_address/share_name

If you install the samba client and samba utilities one can mount the share via the command line or use smbclient which one of its features is accessing the share like a ftp client.

mfoley 10-31-2019 07:13 AM

Quote:

Originally Posted by Rickkkk (Post 6052353)
Hey mfoley,
Quick question : can you access shares on a Windows 10 computer from one of the linux computers that *isn't* running smb ?

Other members here may still have some insight, but it would be interesting to hear what a similar Windows forum might come up with ...

Yes I can. Just tried it: mount //susan/C /mnt/hd -o vers=2.1,username=user,password=pw

Note that with SMB 1.0 enabled on the Windows 10 computers I don't actually need vers=2.1.
Quote:

Originally Posted by 273 (Post 6052340)
My understanding was that newer Windows clients provide their hostname to the DHCP server when they are given the lease but Linux clients do not, by default at least.

The DHCP server does have the names and IPs of Linux hosts (from the dhcp server):
Code:

> host webserver
webserver.hprs.local has address 192.168.0.3

I also find that to be true on my home network where an ASUS router is the DHCP server:
Code:

$ host watcher
watcher has address 192.168.0.10

But, that brings up an interesting point. Perhaps the Window 10 computers are querying the DHCP server and not polling the network a la nmap?

The question remains, how does Windows 10 query for computers on the network? The Windows forums seem to have no clue.

allend 10-31-2019 10:31 AM

2 Attachment(s)
This article gives good information.
A complicating factor can be the firewall rules implemented by Windows based on the networking profile in use.
Screenshots from my Windows 10 install are attached.

With Samba, I have found that Windows 10 refuses to connect to a Samba server unless I have these lines in smb.conf
Code:

client min protocol = SMB2
client max protocol = SMB3
server min protocol = SMB2
server max protocol = SMB3


mfoley 11-01-2019 03:59 PM

Quote:

Originally Posted by allend (Post 6052635)
This article gives good information.

allend, this link was totally AWESOME!!! It worked like a charm, and the explanation as to why no one on the Internet has a clue about why Windows 10 network discovery doesn't work is dead-on -- though a bit of a puzzle why Linux forums have the answer but Windows forums remain clueless. I'll post that link there for the benefit of Windows victims.

After making the recommended registry and service changes, all Windows 10 computers thus re-configured simply appeared on my Windows Explorer Network panel. After I added the wsdd.py script to my Linux hosts they too immediately appeared. This fellow, Stilez, deserves some kind of award for being the only person on Planet Earth to have figured this out and published a clear how-to.
Quote:

With Samba, I have found that Windows 10 refuses to connect to a Samba server unless I have these lines in smb.conf
Code:

client min protocol = SMB2
client max protocol = SMB3
server min protocol = SMB2
server max protocol = SMB3


Possibly, but even before Stilez's brilliant post I was able to connect to Samba shares with
Code:

client max protocol = default
client min protocol = CORE
server max protocol = SMB3
server min protocol = LANMAN1

Presumably because the min/max range includes SMB2


All times are GMT -5. The time now is 03:33 PM.