0

im trying to connect to the internet and eventhough i conected the pi with a ethernet cable with a network enabled cable, it cant connect to the internet. another pi i have with the same cable is able to connect to the internet.

Pi with error

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether d8:3a:dd:50:a7:dc brd ff:ff:ff:ff:ff:ff
inet 192.168.1.107/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0
   valid_lft 604532sec preferred_lft 604532sec
inet6 fe80::f802:4d3c:2b61:51fb/64 scope link noprefixroute
   valid_lft forever preferred_lft forever

pi without error

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether d8:3a:dd:23:88:d2 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.124/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0
   valid_lft 604014sec preferred_lft 528414sec
inet6 fe80::2ad3:8c00:79d6:97a1/64 scope link
   valid_lft forever preferred_lft forever

the difference is that the scope link for the pi with error has a noprefixroute flag to it. I did my research and believe it might be a dns issue but id love to get better advice on this.

Edit: so you could not see in the question but there is a dongle. I have a huawei hilink dongle that is connected to both the pi. it just so happened that on the pi that has the problem, the hilink dongle was defaulted too by the pi and the hilink has its internet connection disabled. so by turning off the pi's ipv6 assigning by the hilink, i was able to remove it from the main connection ( this was a fluke i was playing around and i turned the ipv6 off for the hilink connection and suddenly the main connection from the cable works)so i guess if ur having the same issue you can try changing the advanced network settings on the raspian os

13
  • 1
    Can you share the ip routes ip routes There may be an default route which has no acces to internet
    – Yann
    Oct 26, 2023 at 8:16
  • How did you test internet connection? Via e.g. ping (to IP, to domain...), curl, download?
    – FelixJN
    Oct 26, 2023 at 8:20
  • 1
    @MarcusMüller - Is Raspberry Pi OS really based on Ubuntu? God I hope not. Oct 26, 2023 at 9:15
  • 1
    @JaromandaX ah thankfully you're right, it's debian bookworm Oct 26, 2023 at 9:39
  • 1
    If your problem is solved, either delete your question or answer yourself to it with how it was solved, but put an answer in the question.
    – A.B
    Oct 30, 2023 at 6:59

1 Answer 1

0

Method 1:

so you could not see in the question but there is a dongle. I have a huawei hilink dongle that is connected to both the pi. it just so happened that on the pi that has the problem, the hilink dongle was defaulted too by the pi and the hilink has its internet connection disabled. so by turning off the pi's ipv6 assigning by the hilink, i was able to remove it from the main connection ( this was a fluke i was playing around and i turned the ipv6 off for the hilink connection and suddenly the main connection from the cable works)so i guess if ur having the same issue you can try changing the advanced network settings on the raspian os. ( this method somehow stopped working after a few days without any changes being made)

Method 2:

nmcli connection show

to show the connections,

sudo nmcli connection modify connection-name ipv4.route-metric 10

by adding the metric you will give it network priority on the pi

nmcli connection show connection-name

verify that the connection has changed in order. The order of the networks shows the priority

sudo systemctl restart NetworkManager

to restart the network on your pi and it should work now.

( as of writing this it has been 1 day since I implemented this. i will update if it somehow reverts back or it works perfectly on in production)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .