I have a server with the current /etc/network/interfaces:

auto lo
iface lo inet loopback

auto em1
iface em1 inet dhcp

auto em1:1
iface em1:1 inet static

dhclient.conf file is default, nothing edited. If I connect 2 machines together, ethernet port on pc1 to ethernet port on pc2, the connection works great for 5 minutes (this just happens to be the default dhclient.conf timeout). If I change the dhclient.conf timeout to 20 seconds, the machines stay connected for 20 seconds then kill both interfaces (em1 and em1:1). I can do ifdown to both connections & ifup to bring them up, but they will just die again in whatever the dhcp timeout is.

/etc/network/interfaces has to be like that, DHCP on em1 with an alias or virtual connect for em1:1 that is static. I could set the dhcp timeout to like 9999999999999999999999999999999999999, but eventually it will hit that timeout & bomb. No errors in the log files.

Any ideas? No Network Mangler suggestions please :)


We had a similar issue for an embedded application that we wanted to connect to a DHCP server when available, but also have a static IP on an alias.

Our final solution was to simply add a script to /etc/dhcp/dhclient-enter-hooks.d/ that simply restarts the alias. We tested this with a flood ping and had no dropped packets on the alias even when the DHCP retry caused this script to run. That entire script follows:

ifup em1:1 @> /dev/null

  • Heh, forgot about this question :) I had actually done just this but it never fixed the direct connection issue. I just told the client stop doing it & just use a switch :) Thanks though for that, as that could actually be useful to others out there that may stumble upon this later in life. – Rich Johnson Jul 24 '15 at 4:55

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.