I am concerned that I may be incorrectly using the up and down interface options in /etc/network/interfaces.

I was under the impression that these options were simply executed as a 'hook' after bringing the interface up or after taking it down.

However, reading a really good answer on SEU, I am now uncertain of what these options are really there for.

The manpage is not a great source of enlightenment either. I have read the manpage and think that I can pretty much put any command into the up or down option hooks but I would appreciate someone else to verify that.


Would the following configuration be ok for an interface, specifically the up and down parts? Or is this interpretation wrong and prone to unexpected results?

allow-hotplug eth1
iface eth1 inet static
up ring_a_bell
down send_an_email

Where the ring_a_bell and the send_an_email just refer to any valid system command.


The answer you link to is right about a great many things, but it is wrong about what up and down do. You can, indeed, use up and down in very much the way you post here. They are alternatives for post-up and post-down, if that makes it clearer.

However, it is possible to use up and down as replacements for configuring the interface, provided there is no other configuration on the interface; i.e., if you have something like

iface ethX inet manual

then you can use up and down to semi-manually configure the interface (instead of having the standard address and netmask and gateway and friends there).

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.