As part of some testing I do, I have to configure a 1000 IPv4 addresses and 1000 IPv6 addresses on a linux server. I am doing this on Ubuntu 16.04 (server edition).
After configuring these in /etc/network/interfaces.d/ens192, if I reboot the server, it takes 5 minutes to start the server with the following message on the console:
A start job is running for Raise network interfaces
After that, the server will start up and I can login. systemctl status for networking shows the below 2 error lines:
networking.service: Start operation timed out. Terminating
Failed to start Raise network interfaces.
I can also see that all the 1000 IPv4 addresses were added, but there were only a few 100 IPv6 addresses. If I just wait another 20-30 mins., then all the 1000 IPv6 addresses are added as well.
I've done similar configurations on CentOS7 and the server comes up in mere seconds with all the IP (v4s and v6s) already applied.
So, I'm thinking there is some setting I need to enable/disable to make this move faster.
As a safety and due to some race condition with RAs, I disabled the following based on some articles I found:
net.ipv6.conf.ens160.accept_ra=0
net.ipv6.conf.ens192.accept_ra=0
net.ipv6.conf.default.accept_ra=0
net.ipv6.conf.all.accept_ra=0
net.ipv6.conf.ens160.forwarding=0
net.ipv6.conf.ens192.forwarding=0
net.ipv6.conf.default.forwarding=0
net.ipv6.conf.all.forwarding=0
net.ipv6.conf.ens160.autoconf=0
net.ipv6.conf.ens192.autoconf=0
net.ipv6.conf.default.autoconf=0
net.ipv6.conf.all.autoconf=0
Probably, overkill, but, was just trying different things that I found on the net.
Is there anyway to speed this up? Or am I sorely out of luck?
A snippet of some of the lines in the ens192 file:
auto ens192
iface ens192 inet static
address 10.12.12.2
netmask 255.255.255.252
network 10.12.12.0
broadcast 10.12.12.3
gateway 10.12.12.1
iface ens192 inet static
address 10.12.12.11
netmask 255.255.252.0
...
iface ens192 inet6 static
address 2001:10:12:12::2
netmask 64
gateway 2001:10:12:12::1
iface ens192 inet6 static
address 2001:10:12:12::b
netmask 64
...