I have 2 lab systems that have no connection to the outside world. We don't have an ipv6 infrastructure in our lab. We have no need for ipv6. The machines are connected to three networks, one is a 1GbE network the other two are 10-GbE networks. Both use simple unmanaged switches. They are essentially a HPC cluster. We are forced into using Ubuntu 18.04 LTS on this setup because one of the machines is only supported in that release by the vendor.
The problem we are facing is that our networks are just flooded by router solicitation packets. We decided to start by solving for just one interface.
We tried to disable ipv6 through sysctl.conf by adding
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.enp2s0.disable_ipv6 = 1
That seems to make the ipv6 addresses and such go away and all sorts of ways to check whether ipv6 is active show it isn't. /proc/net/inet_if6 is a blank file. sysctl -a returns
net.ipv6.conf.enp2s0.disable_ipv6 = 1
We also added the following line to /etc/default/grub
GRUB_CMDLINE_LINUX="ipv6.disable=1"
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
But the router solicitation packets kept flowing. So we then went and added things the mighty Google says should stop this behavior to /etc/sysctl.conf
net.ipv6.conf.all.autoconf = 0
net.ipv6.conf.default.autoconf = 0
net.ipv6.conf.lo.autoconf = 0
net.ipv6.conf.enp2s0.autoconf = 0
net.ipv6.conf.all.forwarding = 0
net.ipv6.conf.default.forwarding = 0
net.ipv6.conf.lo.forwarding = 0
net.ipv6.conf.enp2s0.forwarding = 0
net.ipv6.conf.all.accept_ra = 0 <tried 1 here as well. Anything but 2 should work>
net.ipv6.conf.default.accept_ra = 0
net.ipv6.conf.lo.accept_ra = 0
But they keep marching on out. tcpdump shows a constant chain of:
12:06:45.860057 IP6 ubuntu18 > ip6-allrouters: ICMP6, router solicitation, length 8
On a 1 GbE this traffic is at about 640 Mbits/s!
We have to be missing something, but can't figure it out. Maybe someone has an idea.
net.ipv6.conf.enp2s0.accept_ra = 0