6

The machine I'm using has 4 network interfaces, only one of which is currently being used (the other 3 are not plugged in at all). Currently when the machine is restarted it is delayed by a few minutes trying to bring up interfaces 2-4. This is a pretty significant annoyance because this machine is restarted very often.

Running dmesg I see that:

[15] IPv6 ADDRCONF(NETDEV_UP): eth1: link is not ready
[57] IPv6 ADDRCONF(NETDEV_UP): eth2: link is not ready
[98] IPv6 ADDRCONF(NETDEV_UP): eth3: link is not ready
[140] ...

seeing as these interfaces are not being used and taking up a lot of time I'd like to simply disable them from trying to start up, but I would be open to other options that would reduce the time wasted on these interfaces.

I've checked /etc/sysctrl.conf and IPv6 is disabled, so I wouldn't think it to try IPv6.

In the network-scripts directory I created scripts for interface 2-4 that just contain their interface name and ONBOOT=no.

Also I've looked in /sys/class/net/ethX/device/power/control for each interface, all of them contain "on" so I tried:

echo off > /sys/class/net/ethX/device/power/control

But I get write error: Invalid argument, whereas echoing on works fine. I haven't been able to find a reference for changing this file but I feel as though turning the interfaces off entirely would be a little extreme.

I do not have network manager installed and would prefer to keep it that way if at all possible (prefer configuration over throwing more packages at the problem).


I have since moved on from this issue, however for the sake of others that might experience this I'll mention that the fact dmesg is reporting these long waits suggests that the kernel is what's trying to enable these interfaces. So possibly kernel parameters would be an avenue to pursue, or it might just be a kernel bug. Configurations in Linux itself is unlikely to solve the problem, either the grub config or changes to the kernel itself might do it.


UPDATE

The self-answer I posted I actually did get a chance to test, but it didn't work out. However, posting what I tried.

Noticing that the messages from dmesg suggests the kernel is performing the action I looked through the kernel paramaters documentation: https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt

I found there is an option for configuring IPv6 on interfaces: https://www.kernel.org/doc/Documentation/networking/ipv6.txt.


The page outlines the following kernel options:

disable=[01] 0 loads the IPv6 module (default), 1 does not load the IPv6 module

autoconf=[01] 0 disables IPv6 auto-configuration on all interfaces, 1 enables auto-configuration on all interfaces (default)

disable_ipv6=[01] 0 enables IPv6 on all interfaces (default), 1 disables IPv6 on all interfaces

However, none of these options addressed the issue.

11
  • 4
    Look in /etc/sysconfig/network-scripts/ifcfg-<interface name> - is there an ONBOOT= line?
    – John
    Commented Apr 22, 2015 at 12:42
  • @John sorry I should have also mentioned, the interfaces previously didn't have a network script, so I created mostly blank ones for each that state only the interface and ONBOOT=no
    – Centimane
    Commented Apr 22, 2015 at 12:49
  • On debian based removal of the auto in the ‘/etc/network/interfaces’ will prevent the nic from coming on line at boot time.
    – jc__
    Commented Apr 13, 2017 at 13:39
  • @jc__ That wont stop grub from trying to start it, which I'm pretty sure was the source of the problem.
    – Centimane
    Commented Apr 13, 2017 at 19:05
  • 1
    @CiroSantilli刘晓波死六��事件法轮功 The idea with this problem was that interface 1 is still in use. Disabling all networking is definitely too heavy handed.
    – Centimane
    Commented Oct 2, 2017 at 17:02

3 Answers 3

0

You could add these lines in your /etc/rc.local :

ip link set dev "eth1" down
ip link set dev "eth2" down
ip link set dev "eth3" down

Unless it is a too basic or static solution...

3
  • Would that stop them from starting at boot time? That seems like it would simply try to stop the interfaces at a later point, after they have already timed out. If I do "ip link show dev eth1" it reports its state is already "DOWN".
    – Centimane
    Commented Apr 22, 2015 at 13:21
  • Ok, it's probably a wrong answer, so. Have you also looked into BIOS settings ? Sometimes you can choose which interfaces you want to be activated...
    – Félicien
    Commented Apr 22, 2015 at 13:28
  • I may be able to disable the other interfaces through the BIOS, but that's akin to removing them from the machine, that's a little more extreme than I'd like to go. I'm trying to find a config solution to the interfaces starting.
    – Centimane
    Commented Apr 22, 2015 at 13:40
0

I had the same annoying problem and, I'm not an expert, but searching inside the config files, found the solution on my Devuan actual lastest version:

  • Edit file /etc/init.d/networking
  • There's a line:
    CONFIGURE_INTERFACES=
    
    Set this to no
0

To selectively disable certain network interfaces from starting at boot, without NetworkManager, in RHEL or related distribution, edit the /etc/sysconfig/network-scripts/ifcfg-<interface> file that corresponds to the interface you wish to disable, and change the line ONBOOT="yes" to ONBOOT="no".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .