Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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'm running Debian Weezy on an ARM board. Right now I'm working around an issue with my network driver by running an ethtool command that limits the Ethernet interface to 100 megabit. However, the issue with the driver manifests itself as early as DHCP negotiation, so I need to run ethtool before dhclient runs.

I've been trying to find a place where ethtool (or mii-tool, either way) can run before dhclient. So far all of the places I've tried (/etc/network/if-pre-up.d and /etc/dhcp/dhclient-enter-hooks.d) won't work because "eth0" isn't present yet.

Is there a clean hook in the Debian network or system configuration where I can make changes to the Ethernet state before dhclient runs? Or am I trying to do something impossible here?

share|improve this question

migrated from serverfault.com Oct 10 '13 at 17:35

This question came from our site for system and network administrators.

up vote 1 down vote accepted

It should be possible to bring up the eth as "manual" then apply whatever arbitrary scripts you want to run, including sleeps to slow things down, and then call for dhclient at the end. On Ubuntu it would look like this in /etc/network/interfaces

auto eth0
iface eth0 inet manual
pre-up /etc/network/pre-up-scripts/eth0.sh  ( one way to do it)
pre-up some-script-or-command  (another way)
up dhclient  eth0

The man page for interfaces is quite helpful.

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.