Sample Header Ad - 728x90

How do I disable network interfaces from loading at boot without Network Manager?

6 votes
3 answers
15053 views
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: IPv6 ADDRCONF(NETDEV_UP): eth1: link is not ready IPv6 ADDRCONF(NETDEV_UP): eth2: link is not ready IPv6 ADDRCONF(NETDEV_UP): eth3: link is not ready ... 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= 0 loads the IPv6 module (default), 1 does not load the IPv6 module autoconf= 0 disables IPv6 auto-configuration on all interfaces, 1 enables auto-configuration on all interfaces (default) disable_ipv6= 0 enables IPv6 on all interfaces (default), 1 disables IPv6 on all interfaces However, none of these options addressed the issue.
Asked by Centimane (4520 rep)
Apr 22, 2015, 12:37 PM
Last activity: Aug 7, 2025, 03:04 AM