0

I have Ubuntu 16.04.3 LTS with EVE-NG running on top of it. I have run into a known issue with Predictable-Network-Interface-Names and changed interface names to old style, but something is still wrong.

During the boot I see "failed to start raise network interfaces" message. Then, that's what systemctl shows:

* networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
  Drop-In: /run/systemd/generator/networking.service.d
           `-50-insserv.conf-$network.conf
   Active: failed (Result: exit-code) since Tue 2017-11-14 07:06:04 EST; 20min ago
     Docs: man:interfaces(5)
  Process: 677 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 570 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (
 Main PID: 677 (code=exited, status=1/FAILURE)

Nov 14 07:06:03 eve-ng ifup[677]: Waiting for pnet2 to get ready (MAXWAIT is 32 seconds).
Nov 14 07:06:04 eve-ng ifup[677]: SIOCADDRT: File exists
Nov 14 07:06:04 eve-ng ifup[677]: Failed to bring up pnet2.
Nov 14 07:06:04 eve-ng ifup[677]: Waiting for pnet3 to get ready (MAXWAIT is 32 seconds).
Nov 14 07:06:04 eve-ng ifup[677]: interface eth4 does not exist!
Nov 14 07:06:04 eve-ng ifup[677]: Waiting for pnet4 to get ready (MAXWAIT is 32 seconds).
Nov 14 07:06:04 eve-ng systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Nov 14 07:06:04 eve-ng systemd[1]: Failed to start Raise network interfaces.
Nov 14 07:06:04 eve-ng systemd[1]: networking.service: Unit entered failed state.
Nov 14 07:06:04 eve-ng systemd[1]: networking.service: Failed with result 'exit-code'

However, my interfaces are successfully renamed: dmesg | grep eth confirms no renamig occurs during boot.

All of interfaces are up and running, I'm able to SSH to this host.

There are four things I have already done (and none worked):

You disable the assignment of fixed names, so that the unpredictable kernel names are used again. For this, simply mask udev's rule file for the default policy: ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules // done

You pass the net.ifnames=0 on the kernel command line // done

You create your own manual naming scheme, for example by naming your interfaces "internet0", "dmz0" or "lan0". For that create your own .link files in /etc/systemd/network/, that choose an explicit name or a better naming scheme for one, some, or all of your interfaces. // done:

cat /etc/systemd/network/10-eth.link
[Match]
MACAddress=00:0c:29:20:c2:66
[Link]
Name=eth0
[Match]
MACAddress=00:0c:29:20:c2:70
[Link]
Name=eth1
[Match]
MACAddress=00:0c:29:20:c2:7a
[Link]
Name=eth2
[Match]
MACAddress=00:0c:29:20:c2:84
Name=eth3

I did create a new file 10-rename-network.rules in /etc/udev/rules.d/ and added the following content to it: SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="ff:ff:ff:ff:ff:ff", NAME="eth0" //done:

cat /etc/udev/rules.d/10-rename-network.rules
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:0c:29:20:c2:66", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:0c:29:20:c2:70", NAME="eth1"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:0c:29:20:c2:7a", NAME="eth2"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:0c:29:20:c2:84", NAME="eth3"

Is there anything I'm missing?

1 Answer 1

0

Reason

The problem was caused by Predictable-Network-Interface-Names from systemd/udev. Possible solution

According to this source you can either:

You disable the assignment of fixed names, so that the unpredictable kernel names are used again. For this, simply mask udev's rule file for the default policy: ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
You create your own manual naming scheme, for example by naming your interfaces "internet0", "dmz0" or "lan0". For that create your own .link files in /etc/systemd/network/, that choose an explicit name or a better naming scheme for one, some, or all of your interfaces. See systemd.link(5) for more information.
You pass the net.ifnames=0 on the kernel command line

Applied solutions

I did create a new file 10-rename-network.rules in /etc/udev/rules.d/ and added the following content to it:

SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="ff:ff:ff:ff:ff:ff", NAME="eth0"

where

eth0 = desired network interface name, used in /etc/network/interfaces
ff:ff:ff:ff:ff:ff = hardware mac address of the network device

I'd recommend rebooting after completing this to make sure the change is sticky.

1
  • tried that one too (see my edit in original message) - doesn't help. Nov 14, 2017 at 13:04

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.