2

I'm running Ubuntu 14.04.4 LTS on VMWare ESXi 5.5 with 2x E1000 Adapters (tried VMXNET 3 aswell, but no changes on the issue below)

I'm using 2 static public IP's, but the server is continuesly waiting for it's network connection, and only 1 IP at the time is working (sometimes eth0, sometimes eth1)

My /etc/network/interfaces file:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address xx.x.66.169
        netmask 255.255.255.224
        network xx.x.66.160
        gateway xx.x.66.161
        dns-nameservers 8.8.8.8 8.8.4.4

auto eth1
iface eth1 inet static
        address xx.x.66.170
        netmask 255.255.255.224
        network xx.x.66.160
        gateway xx.x.66.161
        dns-nameservers 8.8.4.4 8.8.8.8

ifconfig -a output:

usr@server:~$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:0c:29:c5:a1:0a
          inet addr:xx.x.66.169  Bcast:xx.x.66.191  Mask:255.255.255.224
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:196 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:21341 (21.3 KB)  TX bytes:0 (0.0 B)

eth1      Link encap:Ethernet  HWaddr 00:0c:29:c5:a1:14
          inet addr:xx.x.66.170  Bcast:xx.x.66.191  Mask:255.255.255.224
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:314 errors:0 dropped:0 overruns:0 frame:0
          TX packets:166 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:35728 (35.7 KB)  TX bytes:29220 (29.2 KB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

As of now, I can connect to the server on the .170 address, but not on the .169.

When attempting ifdown eth0 && ifup eth0, I get the error message that eth0 is not configured:

ifdown: interface eth0 not configured
RTNETLINK answers: File exists
Failed to bring up eth0.

Any ideas on how to fix this issue ?

1 Answer 1

1

It looks like it thinks your network interface is in a half-configured state.

Ubuntu will say interface eth0 not configured when it doesn't think that eth0 is configured as specified in /etc/network/interfaces, or the interface wasn't configured using the ifdown/ifup system. The RTNETLINK answers: File exists happens when something like an IP address or route is already configured, and it tries to configure it a second time (not the best error message, I agree!).

I tend to see this problem when changing the /etc/network/interfaces config. Usually, if I'm directly sitting at the machine, I will ifdown the interface, change the config, and then ifup it to not trigger this.

In this case, you need to manually clean up the interface state.

So, do this, from the VMware console (not over SSH as you are taking some of the networking down and might lock yourself out).

#will probably get an error- thats fine
ifdown eth0
# remove default gateway route
ip route del default via xx.x.66.161 dev eth0
# remove the IP address on the interface
ip addr del xx.x.66.169/27 dev eth0
# Mark the interface as down
ifconfig eth0 down
# Use the /etc/network/interfaces config system to configure the interface
ifup eth0

If you still have problems after that, it might be because of having gateway stuff on both connections -- but I might just be being overly cautious about that since I have never really run a setup that way.

4
  • This didn't work for me either, I suppose it's having to do with the same subnet, as this article: pontus.ullgren.com/view/multiple_interfaces_on_the_same_subnet fixed it for me.
    – Sander
    Apr 18, 2016 at 18:56
  • Why not just put both addresses on the same (one) interface, since they both connect to the same network and are virtual anyway.
    – Azendale
    Apr 18, 2016 at 20:51
  • I've tried that aswell, received same errors.
    – Sander
    Apr 19, 2016 at 8:36
  • So, I'm not sure if you got it working with that article, or if you are still having errors? (Or was my suggestion of just one interface not really helping, and that it where you were still getting errors? If so, I guess why to to fix it if it is (no longer) broken.)
    – Azendale
    Apr 19, 2016 at 16:18

You must log in to answer this question.

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