0

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
...
  • This ancient method of network configuration is very slow. It probably will never work. Upgrade to 18.04 and use netplan/networkd. – Michael Hampton Mar 15 at 5:48
  • Thanks, I will give it a try. However, what bugs me is that CentOS7 also uses ifupdown, but it is not slow at all. – bhairav13 Mar 15 at 12:03
  • CentOS 7 doesn't use Debian ifupdown. – Michael Hampton Mar 15 at 15:37
  • I believe I found the issue with the slowness. Kept looking on Google and one article I read helped me in the right direction. The slowness was related to the DAD. It would be triggered for every entry of the IPv6 address and would take potentially upto 3 secs for each. I disabled the DAD and now the host comes up in less than 3 mins! Still, not the "mere seconds" as compared to CentOS 7. – bhairav13 Mar 18 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.