0

Setup is Ubuntu 14.04.1 LTS or Debian 7.

I can assign bound IPs to network interfaces without network downtime with ifconfig, but it doesn't persist across restarts (unless you use rc.local, which apparently isn't recommended), with:

sudo ifconfig eth0:x <bound IP here>

What is the "preferred" way to do this that doesn't involve any network downtime (e.g. no ifup/ifdown)?

  • your question is a bit confusing. you talk about no downtime and then about across reboots. The majority of network setup can be done via the interfaces configuration file at /etc/network/interfaces. per the Debian documentation once you know what works from the ifconfig command you would then add it in to the interfaces file so that it is a permenant change. once added to interfaces the next reboot it should automatically kick in and unless you reboot your ifconfig changes should not go away. – Kendrick Nov 30 '14 at 23:38
  • 1
    So what you want to know is how to apply an updated /etc/network/interfaces file without using service network restart? – kasperd Nov 30 '14 at 23:38
1

do sudo ifconfig eth0:x <bound IP here> is quick way... but will not be there at reboot

or add this to your /etc/network/interfaces so settings will survive reboot or service network restart

auto eth0:x
iface eth0:x inet static
    address <bound IP here>
    # netmask 255.255.255.255
    # network xxx.xxx.xxx.xxx
    # broadcast xxx.xxx.xxx.xxx
    # gateway xxx.xxx.xxx.xxx

and do ifup eth0:x

  • isn't that the answer you where looking for? – Antony Gibbs Dec 4 '14 at 2:23

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.