MiSTer-devel / Linux-Kernel_MiSTer

Other
12 stars 17 forks source link

Wifi randomly pulls a second 169 IP, causing all internet connections to fail post-boot #29

Open Drakonas opened 2 years ago

Drakonas commented 2 years ago

Over the last week a few of us have been hammering at what is causing these weird wifi-related failures on boot at random. When they occur, the MiSTer gets an IP, even gets the time when you don't have an RTC board, and SAMBA/SSH connections work, but anything attempting to get an internet connection after that fails. Even nslookup google.com 8.8.8.8 fails with a timeout to the DNS.

What we have found are the following:

Possible methods to fix (doing multiple is not a bad idea):

Any thoughts as to what may be directly causing this is welcome. I'd like to get to the bottom of this, as various users besides me have reported this happening at random with their MiSTer. We are using the latest Mr. Fusion images as far as I know.

I have attached my syslog for review.

/var/log/messages

ghost commented 1 year ago

one more change , that improve how dhcpcd behave @sorgelig add to /etc/fstab please tmpfs /var/db/dhcpcd tmpfs mode=0750 0 0

this will remove dhcpcd complains about lasefile write ,and slightly improve bootup network startup no need to rebuild image for now. but worth to push it with that change for user testing Thanks

prenetic commented 1 year ago

Just following up on this -- the most recent updates published seem to be working great on my end. Thanks for that.

The multiple DHCP lease address issue persists however because the of default DUID configuration in dhcpcd.conf that I mentioned previously. With this set to DUID a new address is assigned to the MiSTer every restart for both wired and wireless connections, instead of using an existing DHCP lease. This also causes significant delays reconnecting to the MiSTer over the network due to local DNS caches.

This should be set to use client ID based on my experience, as some routers struggle with DUID in the first place and others will be wasteful with leases in a scope due to the way the MiSTer appears as a new device every time it is restarted. When set to client ID with a DUID-aware DHCP server, the MiSTer should retrieve the same leases upon restart.

https://github.com/MiSTer-devel/Linux-Kernel_MiSTer/issues/29#issuecomment-1214634815 https://github.com/MiSTer-devel/Linux-Kernel_MiSTer/issues/29#issuecomment-1218916193