What is a hotplug event from the interface?

allow-hotplug <interface>, is used the same way auto is by most people. However, the hotplug event is something that involves kernel/udev detection against the hardware, that could be a cable being connected to the port, or a USB-to-Ethernet dongle that will be up and running whenever you plug on USB, or either a PCMCIA wireless card being connected to the slot.

My personal opinion: I also think that allow-hotplug could have more documented examples to make this thing easier to understand. As pointed out by other U&L members and Debian lists, those two options create the "chicken and egg problem" when there are no cables connected or when an event is created:

  • Re: network reference v2: questions about allow-hotplug
  • Re: Netcfg and allow-hotplug vs auto

References:

  • Good detailed explanation of /etc/network/interfaces syntax?;
  • Re: Netcfg and allow-hotplug vs auto;
  • Howto Set Up Multiple Network Schemes on a Linux Laptop PCMCIA, Cardbus, USB ;
  • Debian networking. Basic sintax of /etc/networ/interfaces;

There is a general important thing to remember:

If you configured a plugable device as auto, it will prevent the entire system from booting if it doesn't exist at the moment! Whether an allow-hotplug configured device IS NOT set to up after services networking restart automatically. That's totally confusing. In both cases I've lost entire systems. If you have to restart neworking being connected to a hotplug-device you MUST manually ensure to ifup <interface> after restart like this

services networking restart; ifup wlan0

at once. Otherwise you are screwed.