3

With the following config (see config file below):

  1. if only ethernet cable is connected, it 100% works: I can quickly SSH the computer via eth0's IP,

  2. if both ethernet cable and wifi dongle are connected, it 100% works: I can quickly SSH the computer via eth0's IP or wlan0's IP,

  3. if only wifi dongle is connected, I have to wait 1min30sec after boot to be able to SSH the computer! It's like the fact no ethernet cable is there "blocks" the boot* during 1min30sec.

Why does the fact no ethernet cable is present in case #3 block the boot for 1min30sec?

This is confirmed by:

# systemd-analyze blame
  1min 28.442s networking.service
         353ms getty-static.service

/etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "<myssid>"
wpa-psk "<mypasswd>"

1 Answer 1

3

Solution:

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "myssid"
wpa-psk "mypasswd"

The differences between auto and allow-hotplug are explained well in Good detailed explanation of /etc/network/interfaces syntax:

auto interface – Start the interface(s) at boot. That’s why the lo interface uses this kind of linking configuration.

allow-hotplug interface – Start the interface when a "hotplug" event is detected. In the real world, this is used in the same situations as auto but the difference is that it will wait for an event like "being detected by udev hotplug api" or "cable linked".

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .