2

My issue is similar to what is described here: Raspberry Pi has no internet and cannot ping primary router when connected to repeater

I was playing around with PiVPN (WireGuard) and invoked the command pivipn uninstall - after that the result from trying to ping my router (192.168.1.1) is that the first line is PING 192.168.1.1 ... and all subsequent lines list the Pi's own IP address instead of the router's...? All pings are lost.

arp -n

yields HWadress incomplete...

I've tried a bunch of things but I'm stumped.

Can anyone point me in the right direction?

EDIT:

Ingo asked for the output from the following commands:

IP ADDR:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    net 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: eth0: <BROADCAST,MULTICAST,UP.LOWER_UP> mtu 1500 qdisc mq master br0 state UP group default qlen 1000
    link/ether dc:a6:32:07:55:6f bed ff:ff:ff:ff:ff:ff
    inet 192.168.1.12/24 brd 192.168.1.255 scope global dynamic noprefixroute eth0
       valid_lft 863473sec preferred_lft 755473sec
    inet6 fe80::b5f3::9c5a::7fcc::cdda/64 scope link
      valid_lft forever preferred_lft forever
3: br0: <BROADCAST,MULTICAST> mtu 1500 qdisc state state DOWN group default qlen 1000
4: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether dc:a6:32:07:55:70 brd ff:ff:ff:ff:ff:ff

IP ROUTE:
default via 192.168.1.1 dev eth0 proto dhcp src 192.168.1.12 metric 202
192.168.1.0/24 dev eth0 proto dhcp scope link src 192.168.1.12 metric 202

If I enable these two lines in dhcpcd.conf, the interface br0 gets the address 192.168.1.12 and it kinda works... I'm very confused:

denyinterfaces wlan0 eth0
interface br0

END EDIT

It would be great if this could be resolved - I'm banging my head against the wall... :(

Best regards, Andrew

3
  • Seems pivpn does not uninstall properly. Please edit your questinon and add the output of these commands to it: ip addr and ip route. – Ingo Jan 1 at 20:38
  • Sorry, I already 'threw in the towel' and went back to a backup... – Andrew Jan 3 at 11:40
  • This problem reared its head again after I did some apt get install and ..-autoremove commands. With the br0 interface active (s. edited post), I can ping but there is no DNS lookup... – Andrew Jan 16 at 20:49
1

Answer:

You may find it easier to re-flash your SD card with a fresh image, and start over.

Other Things to Consider:

1. You shoulda' had a backup:

We have several must-read Q&A here on the subject of backups:

2. Keeping a spare SD card will provide you with additional options when you find yourself in this situation.

For example, if you want/need to recover files from your troublesome SD card, or if you want to do a post-mortem to discover where you went wrong. With a USB adapter-thing-y (as shown below), you can be restored -literally- in a minute or two:

enter image description here

Imagine: If you maintained a backup on this spare SD card, and you ran into this problem, you could do this:

  1. sudo shutdown
  2. swap the spare/backup SD card for the damaged one in your RPi, and
  3. reboot

You could have resolved this problem in far less time than we've taken posting and answering this question!

9
  • Hi Seamus, I indeed did have a backup :) ... but it was > two months old (to my own disgrace) and I wanted to avoid redoing a lot of work. Alas, that is what I resorted to. Thank you for the quick response though! – Andrew Jan 3 at 11:41
  • @Andrew: You needn't have lost all your work. All you needed was a spare SD card and a USB-to-SD Adapter as shown in the answer. – Seamus Jan 3 at 23:27
  • Thanks for getting back to me. Yes, I understand that I probably could have recovered the information. However, it was embedded in a MariaDB database and I just don't have the skills/knowledge to figure out how to extract datapoint from a database and move them to another... In the end redoing some of the work took less effort than even my attempts at restoring network functionality. Lesson learned: Backup right before trying out something new on a working system! I'm intrigued by image-utils and will check them out ASAP. Thanks again! – Andrew Jan 5 at 5:10
  • @Andrew: Lesson learned makes it all worthwhile :) And yeah - image-utils makes backups very simple. It does have a couple of quirks, and the documentation is not excellent - but considering the alternatives, I think it's hard to beat. – Seamus Jan 5 at 6:18
  • I spent some time browsing the original RonR-image-utils-thread... Not sure if I've understood it correctly, but it should create an .img file that will be bootable when flashed to an SD card, correct? – Andrew Jan 6 at 9:07
2

eth0 with master br0 is slave interface of a bridge br0. Slave interfaces never have an ip address but yours have. The bridge itself is down. In addition there is no other interface with master br0. A bridge with only one slave interface (eth0) doesn't make much sense. There is nothing to bridge.

That all together is a complete messed up and unspecified "configuration". Its behavior is completely unpredictable. You should clean up the setup. Either remove the bridge, or set it up correctly with no ip address on eth0 but on br0 and a second slave interface.

1
  • What a thread! :) – Seamus Jan 17 at 18:16
0

Thank you Ingo for this analysis. I honestly don't know how I got here and wouldn't know how to go about fixing it. I honestly don't understand anything of what you wrote here - that is absolutely due to my knowledge-deficit.

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: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP group default qlen 1000
    link/ether dc:a6:32:07:55:6f brd ff:ff:ff:ff:ff:ff
    inet6 fe80::dea6:32ff:fe07:556f/64 scope link 
       valid_lft forever preferred_lft forever
3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether f2:ea:7e:5b:ba:a4 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.12/24 brd 192.168.1.255 scope global dynamic noprefixroute br0
       valid_lft 843201sec preferred_lft 735201sec
    inet6 2001:4dd5:4075:0:10d:3893:d2:e632/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 7115sec preferred_lft 3515sec
    inet6 fe80::d847:a8aa:3a86:c9d0/64 scope link 
       valid_lft forever preferred_lft forever
4: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether dc:a6:32:07:55:70 brd ff:ff:ff:ff:ff:ff

This is what I'm now working with after fiddling with it some more. It works, but I don't know why...

Thank you again very much for your input. I'm trying to wrap my head around the networking, but I'm obviously having trouble.

Best regards, Andrew

2
  • Well done with the bridge :-) But it still has only one slave interface. It seems you do not need at bridge at all. A brigde "merges" two (or more) interfaces (e.g. eth0 and wlan0) to merge two (or more) network subnets to one subnet. Otherwise you would have a different subnet on each interface. The interfaces become part of the bridge as slaves and they are encapsulated by the bridge. You cannot use them for ip networking then. That's doing the bridge br0 that behaves like a usual interface belonging to ip. – Ingo Jan 17 at 18:06
  • I hope you see that a bridge with one interface has nothing to bridge. But if its working now let it go. Maybe a second interface is added to the bridge dynamically. – Ingo Jan 17 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.