Andyroo

Turn IPv6 off in April 2019 Stretch

Wed Jun 19, 2019 10:09 pm

I have a Pi zero W thats having network issues in that it occasionally drops off the network, can be slow when using SSH and reports the odd ping drop or two.

It's tucked away about as far from the main AP as possible without going outside and is relying on a mains extender to get in and out :oops: (and before anyone says - no cash available for a wired Pi or new AP etc).

I have found it more stable with IPv6 turned off so I have left ipv6.disable=1 in cmdline.txt

Do I need to make any other changes? For example, I have found that dhcpcd.conf has in it

Code: Select all

# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private
but I am unsure if I leave this or not...
I also found a post saying that /etc/sysctl.conf should have

Code: Select all

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
and /etc/ssh/sshd_config should have

Code: Select all

AddressFamily inet
BUT: To be honest its working heaps better as is and given my networking skills / knowledge are poor I'm unsure about Googling more as this box does minimal networking - a bit of ssh to it (no GUI), MQTT pub/sub, a simple Python 3 web scrape program and the odd software update.

Ernst
Posts: 1378
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Turn IPv6 off in April 2019 Stretch

Thu Jun 20, 2019 6:07 am

Andyroo wrote:
Wed Jun 19, 2019 10:09 pm
It's tucked away about as far from the main AP as possible without going outside and is relying on a mains extender to get in and out :oops: (and before anyone says - no cash available for a wired Pi or new AP etc).
Off-topic: I just installed a low cost TP-Link TL-MR3020 AP for my "work" area, this unit can be found for under €25.

On-topic: I am very interested in the answers because I have disabled IPV6 on every Pi.
The road to insanity is paved with static ip addresses

Andyroo

Re: Turn IPv6 off in April 2019 Stretch

Thu Jun 20, 2019 12:25 pm

Thanks - I'll bookmark that box and put a watch on eBay (budget is £0 though birthday is October)

Andyroo

Re: Turn IPv6 off in April 2019 Stretch

Sat Jul 06, 2019 7:30 pm

Well I have found one issue in Samba.
The log gives:
[2019/07/06 19:37:57.237383, 0] ../source3/smbd/server.c:1086(smbd_open_one_socket)
smbd_open_one_socket: open_socket_in: Address family not supported by protocol
from a config of

Code: Select all

[global]
    netbios name = zero-usb
    server string = zero-usb
    workgroup = local
    log file = /var/log/samba/log
    max log size = 1000
    syslog = 0
    server role = standalone server
# Mac extensions
    min protocol = SMB2 
    ea support = yes
    vfs objects = catia fruit streams_xattr  
    fruit:aapl = yes
    readdir_attr:aapl_rsize = yes
    readdir_attr:aapl_finder_info = yes
    readdir_attr:aapl_max_access = yes
    fruit:nfs_aces = yes
    fruit:copyfile= yes
    fruit:metadata = netatalk
    fruit:resource = file
    fruit:locking = none
    fruit:encoding = private
    unix extensions = yes
    fruit:model = MacSamba
    spotlight = no 
    smb2 max read = 8388608
    smb2 max write = 8388608
    smb2 max trans = 8388608
    smb2 leases = yes
    aio read size = 1
    aio write size = 1
    kernel oplocks = no
    use sendfile = yes
    strict sync = yes
    sync always = no
    delete veto files = true
    fruit:veto_appledouble = yes
    fruit:posix_rename = yes 
    fruit:zero_file_id = yes
    fruit:wipe_intentionally_left_blank_rfork = yes 
    fruit:delete_empty_adfiles = yes
Interestingly, I cannot see the Pi in Finder and trying to map to it from the Mac Finder / Go / Server is very very very slow

Adding the following to the Global section of the config stops these errors (and speeds up the connection):

Code: Select all

# IPV4 support only
    interfaces = usb0
    bind interfaces only = yes
NOTE: This is a USB connected Pi - change the interfaces line to be valid for your system :D

To investigate (as time permits):
ssh - currently using AddressFamily inet in my Mac ~/.ssh/config file but nothing on the Pi side

No investigation done on:
ntp
DNS services (BIND / RPCBIND)
Avahi
Web servers (though not running on this box)
MQTT

Return to “Beginners”