Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on an embedded system running Linux. There is a USB ethernet adapter that can be attached to this system for debugging purposes. I would like this adapter to automatically request an IP address whenever it is active with a link (on boot, or when plugged in to a running system).

This particular system is running a derivative of RedHat EL 5, and I tried simply configuring this adapter in the /etc/sysconfig/network-scripts/ifcfg-ethx file, however this only works if the adapter is present on boot, and the link is active. I would prefer not to delay the boot if the DHCP server is not available.

Ideally, the solution will start trying to get an address as soon as the adapter is present and the link is active, and continue trying forever. I believe Network Manager would do this, but I don't want to install it and it's dependencies on this system. I've tried using dhcpcd and plain old dhclient, but there doesn't appear to be any way to have them continue trying after initially failing to get an address, and dhcpcd does not daemonize until after it gets an address.

I thought of writing a shell script, but there doesn't appear to be any way to get notified when the link becomes active for an interface.

share|improve this question
up vote 1 down vote accepted

Look like ifplugd do what you want to do. Haven’t use it, so can’t give more informations.

share|improve this answer
Thanks, that was exactly what I was looking for. – Jason Martens May 13 '11 at 20:03

ifplugd or netplug are standard solutions for this.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.