MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.9k stars 499 forks source link

No Ethernet auto connect / reconnect #7281

Open oxoocoffee opened 6 days ago

oxoocoffee commented 6 days ago

Creating a bug report/issue

Required Information

Additional Information (if applicable)

Steps to reproduce

  1. Setup fresh latest DietPi SD card, boot and finish configuration. But do not enable WifI, just LAN port
  2. Remove LAN cable and reboot, After network timeout after reboot, login to the unit
  3. Plug in the network card
  4. run ifconfig or ip address show. The IP address in never assigned from DHCP server.
  5. Running sudo ifconfig eth0 down followed ifconfig eth0 up never gets a new address. After full reboot, with linkable is plugged in will get IP address assigned.

Expected behaviour

Actual behaviour

Extra details

MichaIng commented 12 hours ago

Yes this is expected behaviour, basically the same if a WiFi network is not in rage. Such plug&play for network requires additional tools, like ifplugd for events on Ethernet cable connection: https://packages.debian.org/ifplugd ... oh that one supports WiFi as well, so yeah, the de facto standard on Debian, actually.

I am currently not sure what it does by default, but on our forum you will find some threads where it is used to automatically switch between WiFi and Ethernet, depending on connection/availability: https://dietpi.com/forum/search?q=ifplugd From the configs, maybe you get the idea how just have it configuring eth0 automatically, once a cable is connected, if this is not its default behaviour anyway. Else feel free to ask.