You are not logged in.

#1 2013-12-16 04:42:49

gee
Member
Registered: 2006-11-29
Posts: 313

SOLVED: Weird network issue ("network is not available")

Hello people,

I have 3 PCs running Arch Linux on my LAN, one main and two secondaries.
The secondaries are image of each other, so exact same config.
I thought I had them set up same as the main but maybe not since it was manual setup...
The 3 machines are using NetworkManager, and I have used the KDE widget to set them up.

So here's my issue, it happened 2 days in a row since I added the 3rd machine to my network:

The main machine is totally fine.
Either one, or both of the secondaries have no connection to the Internet.
BUT, I can connect to them using SSH from the primary machine.
I can also, from these problematic machines, ping my router, still no issue.
Yet, they cannot ping the modem (which is after the router, but different IP range, router is 192.168.1.x, modem is 192.168.0.x).
If I remove the extra route mentioned above, nothing changes.
If I restart the NetworkManager service, everything works fine again... But I don't get it.
The machines were already connected to the LAN, so what would restarting NetworkManager do?

Also, if I cannot find the issue involved here, is there an easy way to restart the NetworkManager service automatically in these situations?


For now the only difference I see between the primary and secondaries, is that on the secondaries route shows me an extra one.

Primary:

#route
Kernel IP routing table
Destination      Gateway       Genmask           Flags  Metric  Ref    Use  Iface
default              tomato          0.0.0.0                UG     0          0        0       wlan0
192.168.1.0     *                    255.255.255.0   U        9          0        0       wlan0

Secondaries:

#route
Kernel IP routing table
Destination         Gateway          Genmask              Flags   Metric  Ref    Use  Iface
default                 tomato              0.0.0.0                  UG      0           0        0      wlp0s20u7
192.168.1.0        *                        255.255.255.0     U         9           0        0      wlp0s20u7
<HOSTNAME>  localhost.local  255.255.255.255 UGH   303       0        0      lo

#route
Kernel IP routing table
Destination          Gateway          Genmask              Flags   Metric  Ref    Use  Iface
default                  tomato              0.0.0.0                  UG      0           0        0      wlp0s20u7
192.168.1.0         *                        255.255.255.0     U         9           0        0      wlp0s20u7
<HOSTNAME2> localhost.local  255.255.255.255 UGH   303       0        0      lo

Also since the last machine started as a copy of the 2nd one, it is possible some stuff that should be unique is not and that affects the network somehow...
I changed the hostname right away, but that's about it. (WIFI connection is on DHCPD)

Thanks!

edit:
Well it looks like the main computer was using dhclient, but the others were on dhcpcd.
I installed dhclient on all, and haven't seen the issue back (yet?)

Last edited by gee (2013-12-18 03:41:06)

Offline

#2 2013-12-22 03:12:30

gee
Member
Registered: 2006-11-29
Posts: 313

Re: SOLVED: Weird network issue ("network is not available")

Well my issue reappeared on one computer hmm
Although it seems different, as now that computer loses all connectivity to the network, no ping, no ssh, nothing works...

For now I have written this as a workaround:
https://aur.archlinux.org/packages/autorestartnm/

What it does is basically this:
- It pings an ip (configurable, in my case my modem)
- If the ping does not return, it waits for some time (configurable) and retries a certain number of times (configurable)
- It calls systemctl to restart NetworkManager, which usually fixes my issues...

For now the service runs every 15 minutes, but I am open to making that configurable as well if people have a need for it.

Offline

Board footer

Powered by FluxBB