Project

General

Profile

Actions

Bug #13877

open

SMB server should enable IPv6 by default

Added by Lee Damon about 1 year ago. Updated 5 months ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
cifs - CIFS server and client
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

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

Related to illumos gate - Feature #14097: time to disable SMB1 by defaultIn ProgressGordon Ross

Actions
Actions #1

Updated by Lee Damon about 1 year 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

Actions #2

Updated by Lee Damon 5 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

Actions #3

Updated by Jason King 5 months ago

Try sharectl set -p ipv6_enable=true smb then svcadm restart smb/server

Actions #4

Updated by Gordon Ross 5 months ago

  • Status changed from New to Feedback
Actions #5

Updated by Lee Damon 5 months ago

Jason King wrote in #note-3:

Try sharectl set -p ipv6_enable=true smb then svcadm 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.

Actions #6

Updated by Lee Damon 5 months ago

Also makes me ask why special enable is required in the first place...

Actions #7

Updated by Jason King 5 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.

Actions #8

Updated by Gordon Ross 5 months ago

Yes, that default should change, along with disabling SMB1 by default (#14097) and updating the man page (#14309).

Actions #9

Updated by Lee Damon 5 months ago

Gordon Ross wrote in #note-8:

Yes, that default should change, along with disabling SMB1 by default (#14097) and updating the man page (#14309).

Is this ticket sufficient as a request for that change or should I open one with a more direct topic?

Actions #10

Updated by Gordon Ross 5 months ago

Let's just re-use this ticket. Perhaps update the synopsis? (SMB server should enable IPv6 by default)

Actions #11

Updated by Lee Damon 5 months ago

Gordon Ross wrote in #note-10:

Let's just re-use this ticket. Perhaps update the synopsis? (SMB server should enable IPv6 by default)

I don't appear to have the permissions/ability to make any changes in that part of the ticket. Not surprising, really.

Actions #12

Updated by Gordon Ross 5 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

Actions #13

Updated by Gordon Ross 5 months ago

Actions

Also available in: Atom PDF