0

This is on a Debian/Raspbian based OS. My goal is to have one or more network interfaces fully configured, but down.

I need to be able to just use ifconfig wlan0 up or ifconfig eth0 up to start them up.

What can I do to achieve this? (This is a systemd based distro)

migrated from serverfault.com Apr 21 '17 at 21:29

This question came from our site for system and network administrators.

  • I haven't done it on Ubuntu/Debian in a long time. On Enterprise Linux it's fairly easy: add ONBOOT=no to the /etc/sysconfig/network-scripts/ifcfg-eth0 script. I forget if that works for Debian, so I'm not posting as an official answer. – 0xSheepdog Apr 21 '17 at 21:32
0

You could try the following: disable a network interface on booting ubuntu

You can add the interfaces that should not come up on boot on a new file /etc/network/interfaces.noboot, then bring them up when needed with:

sudo ifup -i /etc/network/interfaces.noboot -v eth1
  • Unfortunately, I need it to specifically be brought up with ifconfig <interface> up. I need it to be fully configured already, but down, not left in an unconfigured state. – Trel Apr 21 '17 at 16:24
0

Assuming you already have the interfaces configured as normal, each of the interfaces (e.g. eth0) should have an auto eth0 or allow-hotplug eth0 line in the config. Removing that line will prevent the interface from being started at boot.

ifup eth0 or ifconfig eth0 up should then bring up the interface as configured.

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.