I would like to add a second static IP to my local Ubuntu 11.10 desktop machine and have it automatically available after rebooting. So far I am successfully using ifconfig to to temporarily set up an alias for my primary network interface:

# ifconfig eth1:0 up
# ifconfig
eth1      Link encap:Ethernet  HWaddr c8:60:00:ef:a3:d9  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::ca60:ff:feef:a3d9/64 Scope:Link
          RX packets:61929 errors:0 dropped:0 overruns:0 frame:0
          TX packets:64034 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:45330863 (45.3 MB)  TX bytes:28175192 (28.1 MB)
          Interrupt:42 Base address:0x4000 

eth1:0    Link encap:Ethernet  HWaddr c8:60:00:ef:a3:d9  
          inet addr:  Bcast:  Mask:
          Interrupt:42 Base address:0x4000

However, when I add the following to /etc/network/interfaces, the alias is not up and running as expected after a reboot:

# vi /etc/network/interfaces
auto eth1:0
iface eth1:0 inet static

I would like to know what to configure to get this to work. As a side note, I am running gnome shell.

  • 1
    Is there network-manager on this machine ? If it is the case, it takes precedence on /etc/network/interfaces – Dom Dec 4 '12 at 9:09
  • The package network-manager seems to be installed on my system. I just tried configuring the network manager and I failed. I have the feeling the network manager might be buggy or maybe just not intuitive enough for me. I tried Gnome System Settings > Network > Wired > Configure == which opened a window to configure my "Wired connection 1". It allowed me to add a second IP address, but after saving, closing and reopening the dialog, my changes were gone. – Schmoove Dec 6 '12 at 10:01
  • Now it gets even weirder, I clicked twice on the "Configure" button to open the dialog for editing my "Wired connection 1", the second click opened a completely different dialog, namely an overview of all connections and the option to add a new connection. I added a new connection, messed up a setting, saved, closed, reopened, edited, saved, closed... and my changes are gone again. I give up. If anyone has a solution, please help :) – Schmoove Dec 6 '12 at 10:02
  • As MKzero says : remove Network Manager to come back in standard mode as you want. – Dom Dec 6 '12 at 11:18
  • What's up with your broadcast (bcast) addresses? – ptman Jan 25 '14 at 13:52

Is Network Manager managing the interface? I have configured network manager not to touch the interfaces that I manage through /etc/network/interfaces by having the following in /etc/NetworkManager/NetworkManager.conf:


When Network Manager is disabled for sure we can take a look at /etc/network/interfaces. Interface aliases are no longer recommended, but ip(8) can add more than one address to one interface. This can be done in /etc/network/interfaces as follows:

auto eth1
iface eth1 inet static
        up ip addr add dev eth1
        down ip addr del dev eth1

Read the manpage of interfaces(5) and ip(8) for more information.


In my experience you have to disable Network Manager for those kind of setups as it interferes with static configurations and has loads of bugs with pseudo-interfaces.

You have several options here:

  • You could disable IP management in /etc/NetworkManager/NetworkManager.conf and manage the interface yourself via /etc/network/interfaces
  • You could remove Network Manager and install Gnome Network Manager instead.
  • You could stick with NM and write a hook script in /etc/NetworkManager/dispatcher.d - for more information on this see NetworkManager(8)

does you main eth1 configuration is defined in the interfaces file or did you do it using network-manager? I would recommend you do it all in the interfaces file. it's much more robust for a server. but of course if you manage eth1 in nm and eth1:0 in the interfaces file... you will probably run into problems. having said that the syntax in you for seems correct at first look (given that you also have iface eth1 defined in that same file.

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.