Bug #13877
openSMB server should enable IPv6 by default
0%
Description
I have an OmniOS 151038 host that is doing ZFS-based sharesmb. Yesterday I configured IPv6 for it. The windows 10 hosts had no problem continuing to mount SMB/CIFS shares but the CentOS boxes weren't happy about it:
CIFS: VFS: Error connecting to socket. Aborting operation.
CIFS: VFS: cifs_mount failed w/return code = -2
Removing the server's IPv6 address from DNS has them working again. However, that's not a good long-term solution to this problem.
Related issues
Updated by Lee Damon 11 months ago
This was also submitted to Red Hat, since that's more likely to be where the problem exists.
https://bugzilla.redhat.com/show_bug.cgi?id=1972912
nomad
Updated by Lee Damon 4 months ago
It looks like this problem is in the IPv6 part of Illumos, not Red Hat.
I configured a test server that has both IPv4 and IPv6 to have SMB and was able to access a test share from it on windows.
I then removed the A record for that host from DNS and tried to access the same share from a different host (so it wouldn't have DNS cached or any existing mounts) and got
"Windows cannot access \\hvfs1\foo
Check the spelling of the name. Otherwise, there might be a problem with your network. ..."
The test server, like all my file servers, is running OmniOS 151038.
SunOS hvfs1 5.11 omnios-r151038-91d640aafa i86pc i386 i86pc
Here's a redacted snoop run on the server host:
; sudo snoop -d aggr0 port 445
Using device aggr0 (promiscuous mode)
[CLIENT - REDACTED] -> [SERVER - REDACTED] SMB C port=64719
[SERVER - REDACTED] -> [CLIENT - REDACTED] SMB R port=64719
[CLIENT - REDACTED] -> [SERVER - REDACTED] SMB C port=64719
[SERVER - REDACTED] -> [CLIENT - REDACTED] SMB R port=64719
[CLIENT - REDACTED] -> [SERVER - REDACTED] SMB C port=64719
[SERVER - REDACTED] -> [CLIENT - REDACTED] SMB R port=64719
[CLIENT - REDACTED] -> [SERVER - REDACTED] SMB C port=64719
[SERVER - REDACTED] -> [CLIENT - REDACTED] SMB R port=64719
[CLIENT - REDACTED] -> [SERVER - REDACTED] SMB C port=64719
[SERVER - REDACTED] -> [CLIENT - REDACTED] SMB R port=64719
nomad
Updated by Jason King 4 months ago
Try sharectl set -p ipv6_enable=true smb
then svcadm restart smb/server
Updated by Lee Damon 4 months ago
Jason King wrote in #note-3:
Try
sharectl set -p ipv6_enable=true smb
thensvcadm restart smb/server
That seems to have resolved the problem. I'll update our internal documentation but that makes me ask if it's documented anywhere? It's been so long since I set up SMB on these servers I honestly don't remember what documentation I used (but I'm pretty sure this wasn't part of it).
thanks for the tip.
Updated by Jason King 4 months ago
The description of the option is in the smb(4) man page (man -s 4 smb
).
My understanding is that it's largely a compatibility issue. Older versions of SMB don't support IPv6, and enabling it will prevent them from connecting. However it's also very likely that the default should probably be revisited. I believe all supported versions of Windows these days (as well as other platforms) should all support SMB versions that can handle IPv6.
Updated by Gordon Ross 4 months ago
Let's just re-use this ticket. Perhaps update the synopsis? (SMB server should enable IPv6 by default)
Updated by Gordon Ross 4 months ago
- Subject changed from SMB + IPv6 + CentOS 8 Stream = CIFS: VFS: Error connecting to socket. Aborting operation. to SMB server should enable IPv6 by default
- Status changed from Feedback to In Progress
- Assignee set to Gordon Ross
See SMB service manifest
Updated by Gordon Ross 4 months ago
- Related to Feature #14097: time to disable SMB1 by default added