Network won't connect once CM4 has booted

If I have no Ethernet connected to my RPI CM4 it takes a lot longer to boot up and once it has booted and I connect the ethernet cable the connection will not connect and establish, I have to reboot the whole system for the Ethernet to work again.

My device has no WIFI built in and Ethernet cable will only be connected if I need to plug my pc in for debugging the touch screen etc

Is there a way ignore network connections on boot and force the connection when it is booted?

If it boots up with ethernet connected and I disconnect it and reconnect it again it works fine, so it must be some initial settings during boot for network interface I would suspect.

Maybe setting up static IP would solve this rather than DHCP?

When you connect it directly to you PC no DHCP server is involved to assign an IP, so you would need set an static IP, on both, the CM4 and you PC. Of cource also same subnet etc.

@Jappe I understand that, but at the moment i’m connecting it into a network which has DHCP server ( OpenWRT ) I would expect it to automatically connect to the network when plugged in even after boot

Normally that should happen.
what does it show at dietpi-config7 : Network Options: Adapters

This is it here when connected during boot. If I connect after boot I can’t shh into it… It also doesn’t show up on my router or when I do IP scan

I forgot to mention I also have Boot wait for network switched off but still get’s hang up. Full boot time ethernet plugged in is about 1 min and without ethernet plugged in it takes about 3 min

Seems to be an DHCP issue… if I set everything static and boot without ethernet it boots up same speed, switch back to DHCP same issue. Also reconnecting ethernet works for static IP

On another note I have a few errors on the boot when I check the log. ( should I start new topic? )

 11.420139] usb 1-1: device descriptor read/64, error -110
[   27.036135] usb 1-1: device descriptor read/64, error -110
[   27.332127] usb 1-1: new high-speed USB device number 3 using dwc2
[   32.668136] usb 1-1: device descriptor read/64, error -110
[   48.284136] usb 1-1: device descriptor read/64, error -110
[   48.392210] usb usb1-port1: attempt power cycle

did you have attached something to the usb port? Some additional disk?