LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-29-2019, 01:52 PM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,561

Rep: Reputation: 177Reputation: 177
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.
 
Old 10-29-2019, 02:16 PM   #2
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by mfoley View Post
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.
 
Old 10-29-2019, 02:55 PM   #3
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
I think thewre is some new extension so Zeroconf can do DNS also. Works with DHCvP also.
 
Old 10-29-2019, 05:15 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,987

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
Workgroup?

Use lmhosts?

Assign master?
 
Old 10-29-2019, 11:12 PM   #5
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,561

Original Poster
Rep: Reputation: 177Reputation: 177
Quote:
Originally Posted by Rickkkk View Post
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!
 
Old 10-30-2019, 07:31 AM   #6
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by mfoley View Post
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 ?
 
Old 10-30-2019, 08:03 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,719

Rep: Reputation: 5913Reputation: 5913Reputation: 5913Reputation: 5913Reputation: 5913Reputation: 5913Reputation: 5913Reputation: 5913Reputation: 5913Reputation: 5913Reputation: 5913
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.
 
Old 10-30-2019, 12:16 PM   #8
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,561

Original Poster
Rep: Reputation: 177Reputation: 177
Quote:
Originally Posted by Rickkkk View Post
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 View Post
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?

Last edited by mfoley; 10-30-2019 at 12:23 PM.
 
Old 10-30-2019, 02:00 PM   #9
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
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.
 
Old 10-30-2019, 02:43 PM   #10
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
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 ... 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 ...
 
Old 10-30-2019, 04:18 PM   #11
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
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 ?
 
Old 10-30-2019, 04:27 PM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,719

Rep: Reputation: 5913Reputation: 5913Reputation: 5913Reputation: 5913Reputation: 5913Reputation: 5913Reputation: 5913Reputation: 5913Reputation: 5913Reputation: 5913Reputation: 5913
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.
 
1 members found this post helpful.
Old 10-31-2019, 07:13 AM   #13
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,561

Original Poster
Rep: Reputation: 177Reputation: 177
Quote:
Originally Posted by Rickkkk View Post
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 View Post
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.
 
Old 10-31-2019, 10:31 AM   #14
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,372

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
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
Attached Thumbnails
Click image for larger version

Name:	W10_Inbound.png
Views:	41
Size:	110.7 KB
ID:	31729   Click image for larger version

Name:	W10_Outbound.png
Views:	28
Size:	112.7 KB
ID:	31730  
 
1 members found this post helpful.
Old 11-01-2019, 03:59 PM   #15
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,561

Original Poster
Rep: Reputation: 177Reputation: 177
Quote:
Originally Posted by allend View Post
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

Last edited by mfoley; 11-01-2019 at 04:00 PM.
 
  


Reply

Tags
netwoking, smb



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] hosts.deny not blocking hosts to use NFS JohnGomez84 Linux - Security 4 04-29-2017 02:24 AM
LXer: TCP/IP Protocol: Network Time Protocol (NTP) LXer Syndicated Linux News 0 11-21-2013 12:00 AM
nagios does not discover hosts properly, Error: Host Status Information Not Found! parthipan Linux - Server 2 05-31-2012 01:14 AM
discover all hosts in ipv6 subnet and their addresses ineya Linux - Networking 5 12-13-2008 05:21 AM
does the /etc/hosts file work same as the M$ hosts file? Lleb_KCir Linux - Software 6 04-03-2004 04:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration