SMB, bindip and Time Machine issues with two nic's

barbierimc

Dabbler
Joined
Jun 25, 2016
Messages
22
I've recently upgraded to FreeNAS-11.3-U2 from 11.2-U7

After a week without issues, I was alerted to the fact that Time Machine backups had not been occuring since the upgrade.

dns-sd -B _smb._tcp on my MacBook did not show any broadcasts
dns-sd -B _smb._tcp on the FreeNAS server did show broadcasts, but I suspected it was on the wrong interface

I have two nics, only one of which is accessible by my network, the other is a storage network on ESXi (yes, FreeNAS is running in a vm)

I did have interface bindings set in the SMB parameters.

After a bit of reverse engineering on how this all hangs together, I found that the following:

In smb.conf
interfaces = 127.0.0.1 172.19.8.160 10.55.1.2

midclt call smb.config
"bindip": [
"172.19.8.160",
"10.55.1.2"
],

All as expected, but here's where the fun started. I decided to remove the SMB binding on the storage nic to test my theory.

When I went to the SMB services config in the GUI, only the 10.55 address was listed in the bind choices. When I disabled it, I lost both bindings in smb.conf and and smb.config. When I enabled it again I was now left without a binding to the 172.19 adapter. Oh dear!!

Checking github, I found this recent change and hacked it into smb.py. https://github.com/freenas/freenas/pull/4423

That problem solved!

But, still no Time Machine.

Now I could disable the 10.55 address and instantly Time Machine was back. Enabling the binding on 10.55 caused Time Machine advertising to vanish once more.

Code:
23:05:10.474  Add        2   2 local.               _smb._tcp.           zfs
23:05:28.426  Rmv        0   2 local.               _smb._tcp.           zfs
23:05:28.716  Add        3   1 local.               _smb._tcp.           zfs
23:05:28.716  Add        2   2 local.               _smb._tcp.           zfs
23:05:38.816  Rmv        1   1 local.               _smb._tcp.           zfs
23:05:38.816  Rmv        0   2 local.               _smb._tcp.           zfs
23:05:39.016  Add        2   2 local.               _smb._tcp.           zfs


For now, I've resolved this by removing all the bindings, but I suspect there is a bug in the way interfaces are being defined if multiple interfaces exist and more than one binding is specified. In this case, it does not appear to be advertising on all interfaces.

Not sure if anyone can verify this before I raise it as an issue in Jira?

I believe this can be reproduced with
  • 2 NIC's
  • SMB Bindings specified for both NIC's
  • Only one NIC will advertise Time Machine (not sure which one), but both are expected
This may be the cause of other random Time Machine issues being reported in 11.3

Thanks
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
What happens if you don't have any binding specified? If none are specified, then it (samba) will be bound to all NICs, and mDNSresponder should bind to all available interfaces [kDNSServiceInterfaceIndexAny].
 
Last edited:

barbierimc

Dabbler
Joined
Jun 25, 2016
Messages
22
What happens if you don't have any binding specified? If none are specified, then it (samba) will be bound to all NICs, and mDNSresponder should bind to all available interfaces [kDNSServiceInterfaceIndexAny].

Yes, that solves it
For now, I've resolved this by removing all the bindings,

But it should work both ways
 

barbierimc

Dabbler
Joined
Jun 25, 2016
Messages
22
Right. Well, now I have a place to start an investigation. It was working both ways for me before when I wrote the code, but mDNS can be a little finicky in FBSD 11.3.
Great, thanks for looking at this. Let me know if you need any testing done or more information
 
Top