internet problems pi 5

April 3, 2024, 10:58

k9t33n

my pi 5 cannot access the internet and since i am accessing via ssh i have no clue why it would have troubles.
kameron@pi5:~ $ ping google.com
PING google.com (142.250.187.238) 56(84) bytes of data.
From 192.168.1.10 (192.168.1.10) icmp_seq=1 Destination Host Unreachable
ping: sendmsg: No route to host
From 192.168.1.10 (192.168.1.10) icmp_seq=2 Destination Host Unreachable
From 192.168.1.10 (192.168.1.10) icmp_seq=3 Destination Host Unreachable
From 192.168.1.10 (192.168.1.10) icmp_seq=5 Destination Host Unreachable
ping: sendmsg: No route to host
From 192.168.1.10 (192.168.1.10) icmp_seq=6 Destination Host Unreachable
From 192.168.1.10 (192.168.1.10) icmp_seq=7 Destination Host Unreachable
^C
--- google.com ping statistics ---
11 packets transmitted, 0 received, +6 errors, 100% packet loss, time 10168ms
pipe 3
any clue why? it also can not pip install anything or update because of it.

k9t33n

the only thing i can think of is that i set a static ip earlier using https://discord.com/channels/818384379197784084/1193810781473607732 but it succesfully got said static ip and its connected so i have no clue why that would interfere

k9t33n

a reboot does not fix it

oops.se2

what does route -n say

k9t33n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.10    0.0.0.0         UG    100    0        0 eth0
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
172.18.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-99161eb9b7d7
172.19.0.0      0.0.0.0         255.255.0.0     U     0      0        0 br-7ce16739e5de
192.168.1.0     0.0.0.0         255.255.255.0   U     100    0        0 eth0

k9t33n

192.168.1.10 is the static ip which ive checked and its out of the ip scope

k9t33n

and it shows in the router with that ip. what i do find interesting tho is that i seem to have 3 ips

k9t33n

kameron@pi5:~ $ hostname -I
192.168.1.10 172.17.0.1 172.18.0.1 172.19.0.1 
kameron@pi5:~ $ 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 noprefixroute 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether d8:3a:dd:d6:09:63 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.10/24 brd 192.168.1.255 scope global noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::bae1:9622:e544:ad99/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether d8:3a:dd:d6:09:64 brd ff:ff:ff:ff:ff:ff
4: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:42:a5:44:8e:80 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
    inet6 fe80::42:a5ff:fe44:8e80/64 scope link 
       valid_lft forever preferred_lft forever
5: br-99161eb9b7d7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:42:b4:3c:9d:30 brd ff:ff:ff:ff:ff:ff
    inet 172.18.0.1/16 brd 172.18.255.255 scope global br-99161eb9b7d7
       valid_lft forever preferred_lft forever
    inet6 fe80::42:b4ff:fe3c:9d30/64 scope link 
       valid_lft forever preferred_lft forever
6: br-7ce16739e5de: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:01:27:87:aa brd ff:ff:ff:ff:ff:ff
    inet 172.19.0.1/16 brd 172.19.255.255 scope global br-7ce16739e5de
       valid_lft

k9t33n

forever preferred_lft forever
8: veth9e32ad1@if7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default 
    link/ether ae:3b:e5:43:a2:41 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::ac3b:e5ff:fe43:a241/64 scope link 
       valid_lft forever preferred_lft forever
10: vethf15fecf@if9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-99161eb9b7d7 state UP group default 
    link/ether d2:1f:09:30:6b:e4 brd ff:ff:ff:ff:ff:ff link-netnsid 1
    inet6 fe80::d01f:9ff:fe30:6be4/64 scope link 
       valid_lft forever preferred_lft forever

k9t33n

sorry that was my mods acting up to split my message

oops.se2

192.168.1.10 in
0.0.0.0         192.168.1.10    0.0.0.0         UG    100    0        0 eth0
Is wrong. 192.168.1.10 must be your router/firewalls adr. perhaps 192.168.1.1 The 0.0.0.0 is a "wildcard" and could be explained as, all other addresses than any local network should be forwarded to a device (router/firewall) that know where the internet is.

oops.se2

And now is 0.0.0.0 pointing to your Linux machine, so you get in to a loop.

k9t33n

my routers ip is 192.168.1.254, so i put in my static ip where my router ip should be?

oops.se2

Yes, replace 192.168.1.10 with 192.168.1.254

k9t33n

oh thats strange. must've been really tired last night

oops.se2

I know that can happen even the best

k9t33n

so just to check this is correct?
sudo nmcli con mod a18ddbec-4695-32b7-8590-3ab0e2d96b1f ipv4.addresses 192.168.1.10/24
sudo nmcli con mod a18ddbec-4695-32b7-8590-3ab0e2d96b1f ipv4.gateway 192.168.1.254
sudo nmcli con mod a18ddbec-4695-32b7-8590-3ab0e2d96b1f ipv4.dns "192.168.1.254"
sudo nmcli con mod a18ddbec-4695-32b7-8590-3ab0e2d96b1f ipv4.method manual

sudo nmcli con up a18ddbec-4695-32b7-8590-3ab0e2d96b1f