LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   laptop assigned static address still loses connection once a day (https://www.linuxquestions.org/questions/linux-software-2/laptop-assigned-static-address-still-loses-connection-once-a-day-4175694270/)

LenHoff 04-25-2021 09:01 PM

laptop assigned static address still loses connection once a day
 
4 Attachment(s)
This is an older laptop that never lost inet connection (via Linksys WRT54GL) until switching from Windows to Mint (19.3_32 bit).

On Mint, & set to use DHCP, it started losing connection about the same time every day.
I assumed that was related to the router lease expire times are set at default "0" (means 1 day). Restarting Mint would get a connection & keep it - until the next afternoon.

Years ago - under Windows, I set a static IP on wireless HP printer, so devices could always find it. It's worked fine since & I've never had to restart the printer because of lost connection w/ same router.

Devices using DHCP or static IP - losing connection (or not re-assigned an IPa after lease expires) seems common. Suggested work around is often to assign static IPa's. I did that on the laptop, but still loses connection every day- usually late afternoon. Restarting Mint gets connection back (same static address I assigned).

This Linksys router doesn't have feature to reserve DHCP addresses. But the address being given to another device isn't the issue.
There may be a "bug" - somewhere - that even w/ a static address, expiring address leases somehow affects it.

I've read lots of fixes, though most are for DHCP problems. I've tried several suggestions that seemed to apply - none worked. Many fixes don't work for others, either.

Static address devices don't show up in this router's UI, but it can ping static address devices & shows no problems - no lost packets, etc.

Some screens below, showing Network Connections settings for static address.
One or 2 settings I'm not sure about, but tutorials I found didn't explain them well or at all.

Ser Olmy 04-26-2021 12:15 PM

When you say it "loses [the] connection", do you mean it disconnects completely from the wireless network? Are you unable to ping the IP address of the router when this happens?

If your laptop loses all network connectivity even when assigned a static IP address, the issue probably isn't IP related. What are your "Wi-Fi Security" settings (TKIP, AES, WPA/WPA2 etc)?

LenHoff 04-26-2021 08:18 PM

Quote:

If your laptop loses all network connectivity even when assigned a static IP address, the issue probably isn't IP related.
I assume, meaning that when it loses inet connection, IF I can't even ping the router from laptop? I don't think it's related to specific addresses, either (DHCP or static).
I think something, somewhere, isn't handling the renewal of expired address leases.

Since it also happens w/ static address, would seem to point to a Linux setting or such. Possibly laptop's adapter or driver. This problem didn't exist under Windows.
I don't know how Mint network manager or other files handle manually assigned static addresses. Does it check inet addresses & also (supposed to) renew them for a device, after a certain time, the same as a router?

Since it only happens 1x / day (afaik), it should be easier to pinpoint than frequent, random inet connection losses.

I have little experience troubleshooting once / day inet conn. loss - (apparently) regardless of DHCP or static address. I'm thinking there's a Linux file, maybe with a wrong value. Or driver for the wifi adapter doesn't play well w/ Linux, etc. Need a guru. No idea where to start on things like that.

Clarify: Laptop loses its inet connection. I'd have to check if it can still see the printer. That's all the "network" the laptop uses - an inet conn. & able to see the printer.

I didn't try pinging laptop (from router's UI) WHEN it lost internet connection. I did at other times (from laptop & router) & it was OK.
I don't remember, if when it was still getting DHCP addresses, if it disappeared from router's DHCP table, or just showed it had no assigned IPa in the router's UI, or something else.

I'm not 100% sure if I pinged the router from laptop (when on DHCP), after it lost inet connection(s). I did ping the router successfully, just not sure of exact time.

BUT, while it was still using DHCP, after it lost inet connection, I ran linux commands that showed the state of laptop inet was "down."

Since it now has a static IPa (set in network manager ON the laptop, not in the router), it never shows up on the router. So all I can do when it loses connection is ping it from router (or ping router from laptop).

AFAIK, pinging it successfully doesn't prove the laptop has an inet connection - only that the laptop still has some level of network connection.

The router checks for connection w/ DHCP devices far more than once a day (I can check how often). If there was any security incompatibility between them, I'd think it would've had problems > once a day (under DHCP). They are both set with WPA/WPA2.

No other wireless devices (phones) lose connection w/ wifi, or least, never seen our phones wifi conn. symbol disappear (it would, if their wifi connection was down). AFAIK, never had problems sending phone data over wifi.

Ser Olmy 04-26-2021 08:55 PM

Quote:

Originally Posted by LenHoff (Post 6245295)
I assume, meaning that when it loses inet connection, IF I can't even ping the router from laptop?

If you can't ping the router, the actual wireless connection is down. If you can ping the router but not hosts on the Internet, something else is going on.
Quote:

Originally Posted by LenHoff (Post 6245295)
I don't think it's related to specific addresses, either (DHCP or static).
I think something, somewhere, isn't handling the renewal of expired address leases.

"Expired addressed" is a DHCP concept. It means that according to the DHCP server database, a given address that was previously leased to a client can now be leased to another client. If you're not using DHCP on the client, the DHCP server on the router is irrelevant.
Quote:

Originally Posted by LenHoff (Post 6245295)
Since it also happens w/ static address, would seem to point to a Linux setting or such. Possibly laptop's adapter or driver. This problem didn't exist under Windows.

Agreed. You should check the logs on the Linux client for clues as to what's going on.
Quote:

Originally Posted by LenHoff (Post 6245295)
I don't know how Mint network manager or other files handle manually assigned static addresses. Does it check inet addresses & also (supposed to) renew them for a device, after a certain time, the same as a router?

No, it just assigns the address when the network link goes up, and that's it.
Quote:

Originally Posted by LenHoff (Post 6245295)
Since it only happens 1x / day (afaik), it should be easier to pinpoint than frequent, random inet connection losses.

It does appear to be related to something expiring and having to be renewed. If it's not the IP address (and I believe we have established that it isn't), then I'd guess it's the encryption key for the wireless connection. It gets renegotiated at regular intervals.
Quote:

Originally Posted by LenHoff (Post 6245295)
BUT, while it was still using DHCP, after it lost inet connection, I ran linux commands that showed the state of laptop inet was "down."

Yep, that means the security association between the laptop and the wireless router is broken.
Quote:

Originally Posted by LenHoff (Post 6245295)
They are both set with WPA/WPA2.

WPA is rubbish and should be avoided whenever possible.

A setting of "WPA/WPA2" means the client gets to choose, and it's entirely possible that the Linux box chooses WPA (TKIP/RC4) while all the other devices default to WPA2 (CCMP/AES). Try disabling WPA altogether and see what happens.

LenHoff 06-14-2021 06:58 PM

Ser Olmy,
Thanks. I finally had to check what channels the neighbors were using most often. Mainly ones with higher signal strength, most likely to interfere with us.
Most of them probably use routers their ISP gave, @ original settings. Some of those change channels every so often - by some timing or algorithm.

Observing the highest signal strength routers at different times, it looked like very few selected Ch. 1, so that's the channel I set our router on. Before, ours was set to Ch. 6 (by default).
I also moved the router around a bit. It's in a bedroom, next to the den, so the signal has to go through 2 layers of 1/2 inch drywall. No insulation, but studs in corner of the BR could be an issue.

Finally got our signal strength (where wireless device is) more consistently above 60. Mostly 70 - 85+. If it has lost connection since then, it auto re-connects, so we're not aware.

If that hadn't worked, I'd probably drill a hole in the wall for ethernet cable & mounted the router on a tiny shelf, close to the ceiling.


All times are GMT -5. The time now is 09:55 PM.