This problem started about three weeks ago, apparently after an update.
When I connect to a new wifi network, I reach local connectivity only; my laptop connects and receives an IP address successfully (verified via syslog) but ping 8.8.8.8
returns connect: Network is unreachable
.
The routing table always looks something like this:
Table de routage IP du noyau
Destination Passerelle Genmask Indic Metric Ref Use Iface
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlp2s0
192.168.2.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp2s0
In particular, there is no default route specified. I think this is the problem. If I run the command
sudo route add default gw 192.168.2.1 wlp2s0
Then everything works; I can ping google.com, but network-manager still thinks I have only local connectivity.
If I use a static IP instead and specify 8.8.8.8 as a nameserver, everything works. If I use a static IP and do not specify 8.8.8.8 as a nameserver, I can ping 8.8.8.8 but not google.com.
How can I get network-manager to properly automatically assign a default route?
managed=true
and add the corresponding entrynever-default=false
to/etc/NetworkManager/system-connections/eth0
to get a default route, I couldn't configure it with the GUI elements for some reason (I uncheckeduse connection only for resources on its network
but to no avail). – hochl Apr 03 '20 at 09:49