Fonte: https://cwesystems.com/?p=231
I had connection problems with my Raspberry Pi, it dropped connection over IPv4 periodically.
My solution was to disable IPv6, and the Pi’s network connections (over IPv4) went stable!
![](https://cwesystems.com/wp-content/uploads/2019/09/before.jpg)
To check if you have any IPv6 address, run:
1 | $ ifconfig |
Check for “inet6”, see picture above.
To disable IPv6:
- Edit “/etc/sysctl.conf”:Add this to the end:
$
sudo
nano
/etc/sysctl
.conf
Save and close the file.1234net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1
net.ipv6.conf.eth0.disable_ipv6 = 1
- Edit “/etc/rc.local”:Add this to the end (but before “exit 0”):
$
sudo
nano
/etc/rc
.
local
Save and close the file.1service procps reload
- Reboot
- Check with “ifconfig” if the IPv6 address has disappeared.See my result in picture below, “inet6” is missing:
$
ifconfig
![](https://cwesystems.com/wp-content/uploads/2019/09/after.jpg)
Done!