Can’t ping outside the network

12.04networkingserver

Like my title i cannot ping outsidwe my network, i have been using Ubuntu Server 22.04.2 LTS for a little while on a mini PC and I set the wifi settings on my machine when i installed the OS a year ago and since thiss morning i havent been able to reach outside my network and my gateway is not reachable either

Ping Cloudlare

PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.  
From 192.168.2.26 icmp_seq=1 Destination Host Unreachable  
--- 1.1.1.1 ping statistics ---  
6 packets transmitted, 0 received, +4 errors, 100% packet loss, time 5060ms  
pipe 3

Ping Gateway

PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.  
From 192.168.2.26 icmp_seq=1 Destination Host Unreachable  
--- 192.168.2.1 ping statistics ---  
9 packets transmitted, 0 received, +6 errors, 100% packet loss, time 8123ms  
pipe 3  

I suppose i have some problem with my network configuration, but since I don't remember changing anything in my network config I'm a bit lost, a newbie when it comes to configuring my network settings on it.

I checked my services and i noticed one failed.

× systemd-networkd-wait-online.service - Wait for Network to be Configured
     Loaded: loaded (/etc/systemd/system/systemd-networkd-wait-online.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Thu 2023-08-03 01:37:12 UTC; 1h 53min ago
       Docs: man:systemd-networkd-wait-online.service(8)
    Process: 683 ExecStart=/lib/systemd/systemd-networkd-wait-online --timeout=10 (code=exited, status=1/FAILURE)
   Main PID: 683 (code=exited, status=1/FAILURE)
        CPU: 36ms

Aug 03 01:37:01 bwd-server systemd[1]: Starting Wait for Network to be Configured...
Aug 03 01:37:05 bwd-server systemd-networkd-wait-online[683]: managing: wlp1s0
Aug 03 01:37:11 bwd-server systemd-networkd-wait-online[683]: managing: wlp1s0
Aug 03 01:37:12 bwd-server systemd-networkd-wait-online[683]: Timeout occurred while waiting for network connectivity.
Aug 03 01:37:12 bwd-server systemd[1]: systemd-networkd-wait-online.service: Main process exited, code=exited, status=1/FAILURE
Aug 03 01:37:12 bwd-server systemd[1]: systemd-networkd-wait-online.service: Failed with result 'exit-code'.
Aug 03 01:37:12 bwd-server systemd[1]: Failed to start Wait for Network to be Configured. 

So if this is accurate there is a problem with my configuration. I just can't find where.
I've already looked into it with google but most of the result i get are a problem with the device ip and the gateway not being on the same network which i doubt is the case

I have some web service up and they are all reachable, i can ssh into the server and and i can ping my server from my pc and my pc from my server so my router is able to route them together.

ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether 84:39:4c:00:31:05 brd ff:ff:ff:ff:ff:ff
    altname enp2s0
3: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 84:c5:a6:7a:d3:de brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.26/24 metric 600 brd 192.168.2.255 scope global dynamic wlp1s0
       valid_lft 257633sec preferred_lft 257633sec
    inet6 fd24:3316:d46c:66f2:86c5:a6ff:fe7a:d3de/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 250sec preferred_lft 250sec
    inet6 fe80::86c5:a6ff:fe7a:d3de/64 scope link 
       valid_lft forever preferred_lft forever
4: br-3ad3df7e63f4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:f3:66:93:14 brd ff:ff:ff:ff:ff:ff
    inet 172.18.0.1/16 brd 172.18.255.255 scope global br-3ad3df7e63f4
       valid_lft forever preferred_lft forever
5: br-823e7568d7d4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:92:28:93:c5 brd ff:ff:ff:ff:ff:ff
    inet 172.21.0.1/16 brd 172.21.255.255 scope global br-823e7568d7d4
       valid_lft forever preferred_lft forever
6: br-921e84efdc37: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:42:e1:d0:9b:30 brd ff:ff:ff:ff:ff:ff
    inet 172.19.0.1/16 brd 172.19.255.255 scope global br-921e84efdc37
       valid_lft forever preferred_lft forever
    inet6 fe80::42:e1ff:fed0:9b30/64 scope link 
       valid_lft forever preferred_lft forever
7: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:09:95:f5:63 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
8: br-c60aef3af76a: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:42:c9:e1:af:7f brd ff:ff:ff:ff:ff:ff
    inet 172.24.0.1/16 brd 172.24.255.255 scope global br-c60aef3af76a
       valid_lft forever preferred_lft forever
    inet6 fe80::42:c9ff:fee1:af7f/64 scope link 
       valid_lft forever preferred_lft forever
14: veth92f0294@if13: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-c60aef3af76a state UP group default 
    link/ether ae:f0:a4:f2:43:3c brd ff:ff:ff:ff:ff:ff link-netnsid 3
    inet6 fe80::acf0:a4ff:fef2:433c/64 scope link 
       valid_lft forever preferred_lft forever
62: veth33540bb@if61: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-c60aef3af76a state UP group default 
    link/ether 6e:29:9b:d1:ba:e3 brd ff:ff:ff:ff:ff:ff link-netnsid 1
    inet6 fe80::6c29:9bff:fed1:bae3/64 scope link 
       valid_lft forever preferred_lft forever
66: vethff333e0@if65: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-921e84efdc37 state UP group default 
    link/ether 56:57:7a:ed:ee:b5 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::5457:7aff:feed:eeb5/64 scope link 
       valid_lft forever preferred_lft forever

ip route

default via 192.168.2.1 dev wlp1s0 proto dhcp src 192.168.2.26 metric 600 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 
172.18.0.0/16 dev br-3ad3df7e63f4 proto kernel scope link src 172.18.0.1 linkdown 
172.19.0.0/16 dev br-921e84efdc37 proto kernel scope link src 172.19.0.1 
172.21.0.0/16 dev br-823e7568d7d4 proto kernel scope link src 172.21.0.1 linkdown 
172.24.0.0/16 dev br-c60aef3af76a proto kernel scope link src 172.24.0.1 
192.168.2.0/24 dev wlp1s0 proto kernel scope link src 192.168.2.26 metric 600 
192.168.2.1 dev wlp1s0 proto dhcp scope link src 192.168.2.26 metric 600 
207.164.234.129 via 192.168.2.1 dev wlp1s0 proto dhcp src 192.168.2.26 metric 600 

ip neigh

172.24.0.3 dev br-c60aef3af76a lladdr 02:42:ac:18:00:03 STALE
192.168.2.1 dev wlp1s0  INCOMPLETE
192.168.2.43 dev wlp1s0 lladdr a0:a4:c5:22:2f:c7 REACHABLE
172.19.0.2 dev br-921e84efdc37 lladdr 02:42:ac:13:00:02 STALE
192.168.2.44 dev wlp1s0 lladdr d4:3a:2c:a7:ba:69 REACHABLE
172.24.0.2 dev br-c60aef3af76a lladdr 02:42:ac:18:00:02 REACHABLE
172.24.0.4 dev br-c60aef3af76a lladdr 02:42:ac:18:00:04 STALE
192.168.2.16 dev wlp1s0 lladdr f2:ee:ce:93:b3:4c STALE
192.168.2.10 dev wlp1s0 lladdr b2:00:b8:ab:66:cc REACHABLE
fe80::6666:24ff:fefa:9ba0 dev wlp1s0 lladdr 64:66:24:fa:9b:a0 router STALE

This is the output i get from the most requested command i see on my researched.
I know that most of the interfaces i have are from docker.
If i forgot something that could help you find the problem let me know

Edit

my gateway can be reached from other device like my laptop:

PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.
64 bytes from 192.168.2.1: icmp_seq=1 ttl=62 time=6.19 ms
--- 192.168.2.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 2.790/4.123/6.185/1.478 ms

Best Answer

It looks like your router with the address 192.168.2.1 is dead or its interface has been disconnected. This is confirmed both by pinging this address and especially by the response to the ip neigh command, see INCOMPLETE clause in the line:

192.168.2.1 dev wlp1s0  INCOMPLETE

Other devices on the same 192.168.2.0/24 network are available, see the next lines for the ip neigh command:

192.168.2.44 dev wlp1s0 lladdr d4:3a:2c:a7:ba:69 REACHABLE
192.168.2.10 dev wlp1s0 lladdr b2:00:b8:ab:66:cc REACHABLE

The fault is most likely related to the router. Test the availability of the router 192.168.2.1 from other devices on the network.

Related Question