Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Architectures & Platforms Gentoo on ARM
  • Search

default route not working raspberry pi 4 (systemd)

Gentoo on all things ARM. Both 32 bit and 64 bit.
Tell about your hardware and CHOST.
Problems with crossdev targeting ARM hardware go here too.
Post Reply
  • Print view
Advanced search
20 posts • Page 1 of 1
Author
Message
JumboAg
Apprentice
Apprentice
User avatar
Posts: 224
Joined: Sat Mar 03, 2007 11:13 pm
Location: Dallas, TX

default route not working raspberry pi 4 (systemd)

  • Quote

Post by JumboAg » Tue Oct 04, 2022 2:53 am

I just put Gentoo on a raspberry pi 4b, boots fine but cant get it talking to anything. To keep things simple, I'm trying to use the wired eth0 ethernet connection with a static address on my home network.

I have a /etc/systemd/network/50-static.network file with the correct Match and Network sections. An ifconfig -a shows that eth1 is getting the correct address and a netstat -rn is showing two lines as expected (one 0.0.0.0 to my gateway IP, the other sending everything on my /24 out 0.0.0.0. Both tied to eth0.

I still get a destination host unreachable for everything and cant get in or out of the box. Guessing I have something turned on that I shouldnt somewhere. I did use genkernel to build my kernel using qemu from a separate box. I dont think my kernel or any modules are broken since I boot find, but I cant prove that.

Pasting the exact output of an ifconfig or netstat -rn is problematic without networking to the pi. Hoping someone sees this and its something super obvious I'm overlooking.

The only thing weird I see in the journalctl output is a "using degraded featureset" message in systemd-resolved. I dont think its related.
Top
alamahant
Advocate
Advocate
Posts: 4032
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Tue Oct 04, 2022 9:51 am

Can you post

Code: Select all

/etc/systemd/network/50-static.network
You cant have 2 gateways.Also 0.0.0.0 is NOT your router IP.
:)
Top
JumboAg
Apprentice
Apprentice
User avatar
Posts: 224
Joined: Sat Mar 03, 2007 11:13 pm
Location: Dallas, TX

  • Quote

Post by JumboAg » Tue Oct 04, 2022 11:21 am

alamahant wrote:Can you post

Code: Select all

/etc/systemd/network/50-static.network
You cant have 2 gateways.Also 0.0.0.0 is NOT your router IP.
I never claimed it was. It is how Linux describe a default route though.

50-static-network:

Code: Select all

[Match]
Name=eth0

[Network]
Address=192.168.86.76/24
Gateway=192.168.86.1
DNS=192.168.86.1

netstat -rn

Code: Select all

Kernel IP routing table
Destination      Gateway           Genmask          Flags    MSS Window    irtt Iface
0.0.0.0            192.168.86.1    0.0.0.0             UG       0      0             0   eth0
192.,168.86.0  0.0.0.0             255.255.255.0  U          0     0             0   eth0
[Moderator edit: added [code] tags to preserve output layout. -- pietinger]
Top
pingtoo
Advocate
Advocate
User avatar
Posts: 2180
Joined: Fri Sep 10, 2021 8:37 pm
Location: Richmond Hill, Canada

  • Quote

Post by pingtoo » Tue Oct 04, 2022 1:18 pm

Can you check dmesg for Link up event? on my machine

Code: Select all

me@pi-3 ~ $ dmesg |grep Link
[   18.043462] bcmgenet fd580000.ethernet eth0: Link is Down
[   22.106488] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
Can you also share ifconfig -a output
Top
JumboAg
Apprentice
Apprentice
User avatar
Posts: 224
Joined: Sat Mar 03, 2007 11:13 pm
Location: Dallas, TX

  • Quote

Post by JumboAg » Tue Oct 04, 2022 1:36 pm

Code: Select all

[    7.004552] bcmgenet fd580000.ethernet eth0: Link is Down
[   10.083212] bcmgenet fd580000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off

Code: Select all

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.86.76  netmask 255.255.255.0  broadcast 192.168.86.255
        inet6 fe80::dea6:32ff:fe06:6f1  prefixlen 64  scopeid 0x20<link>
        ether dc:a6:32:06:06:f1  txqueuelen 1000  (Ethernet)
        RX packets 310  bytes 111600 (108.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 37976  bytes 1596168 (1.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 25374  bytes 2333696 (2.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 25374  bytes 2333696 (2.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Link is coming up, got the right lights at both the pi and my ethernet switch.
Top
pingtoo
Advocate
Advocate
User avatar
Posts: 2180
Joined: Fri Sep 10, 2021 8:37 pm
Location: Richmond Hill, Canada

  • Quote

Post by pingtoo » Tue Oct 04, 2022 2:50 pm

In your ifconfig output the RX and TX both seen data and no error. It seems to me your ethernet is functional.

Have you try traceroute?

Code: Select all

traceroute 8.8.8.8
Could it be some kind of firewall mis-configuration? or do you even use firewall on you pi?
Top
JumboAg
Apprentice
Apprentice
User avatar
Posts: 224
Joined: Sat Mar 03, 2007 11:13 pm
Location: Dallas, TX

  • Quote

Post by JumboAg » Tue Oct 04, 2022 3:50 pm

traceroute goes nowhere.

Code: Select all

$ traceroute 8.8.8.8
1  192.168.86.76 (192.168.86.76) 2899.427 ms !H 2899.365 ms !H 2899.334 ms !H
I'm pretty much a stock gentoo config on the PI. All I've done is compile and install the kernel and configure bare minimum to get it booted so far. I havent explicitly enabled any firewall or ipfilter stuff but if its on by default, I have not turned it off either.
Top
pingtoo
Advocate
Advocate
User avatar
Posts: 2180
Joined: Fri Sep 10, 2021 8:37 pm
Location: Richmond Hill, Canada

  • Quote

Post by pingtoo » Tue Oct 04, 2022 4:01 pm

How about firewall setting?

Code: Select all

iptables -L
Sorry about all these probing just trying to guess what could be of problems.
Top
JumboAg
Apprentice
Apprentice
User avatar
Posts: 224
Joined: Sat Mar 03, 2007 11:13 pm
Location: Dallas, TX

  • Quote

Post by JumboAg » Tue Oct 04, 2022 4:21 pm

IP Tables is empty for INPUT, FORWARD and OUTPUT.
Top
pingtoo
Advocate
Advocate
User avatar
Posts: 2180
Joined: Fri Sep 10, 2021 8:37 pm
Location: Richmond Hill, Canada

  • Quote

Post by pingtoo » Tue Oct 04, 2022 4:31 pm

JumboAg wrote:netstat -rn

Code: Select all

Kernel IP routing table
Destination      Gateway           Genmask          Flags    MSS Window    irtt Iface
0.0.0.0            192.168.86.1    0.0.0.0             UG       0      0             0   eth0
192.,168.86.0  0.0.0.0             255.255.255.0  U          0     0             0   eth0
[Moderator edit: added [code] tags to preserve output layout. -- pietinger]
Just one more check, the 192.,168.86.0 is strange, so is it from a copy/paste or just a typo?
Top
alamahant
Advocate
Advocate
Posts: 4032
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Tue Oct 04, 2022 4:43 pm

Do you have other network managers like NM maybe enabled?
Also in

Code: Select all

/etc/systemd/network
do you have other files that might be in conflict?
Try

Code: Select all

ip link set eth0 down
ip link set eth0 up
ip a add 192.168.86.76/24 dev eth0
ip route add default via 192.168.86.1 dev eth0
echo "nameserver 192.168.86.1" > /etc/resolv.conf
ping -c3 google.com
:)
Top
JumboAg
Apprentice
Apprentice
User avatar
Posts: 224
Joined: Sat Mar 03, 2007 11:13 pm
Location: Dallas, TX

  • Quote

Post by JumboAg » Tue Oct 04, 2022 5:47 pm

@pingtoo - just a typo. I cant paste from the pi because its not on network so I'm just typing what it shows manually (or in the case of large amounts of output, redirecting to a text file then mounting the SD card back to my PC to put into my forum replies)


@alamahant:

1) Not that I am aware of. I didn't emerge anything for networking (not even a dhcp client) while in my chroot env before I moved the SD card and booted the pi

2) The only file in my /etc/systemd/network directory is the 50-static.network. Output of which posted above.

3) no conflicts I am aware of but I cannot definitively tell you no to that question. Tried your code, had to do an ip flush first. Get a timeout on the ping. traceroutes still go nowhere.

I'm stumped. The output of every command I can think of seems to indicate wired ethernet is up and running and I have a good default route but the Pi for some reason seems to be totally ignoring that route. My guess is a kernel, config, or driver conflict somewhere. For the life of me cant think of where though. I have another 4B running stock raspbian and it works fine. Just cant get my second one happy with gentoo.
Top
pingtoo
Advocate
Advocate
User avatar
Posts: 2180
Joined: Fri Sep 10, 2021 8:37 pm
Location: Richmond Hill, Canada

  • Quote

Post by pingtoo » Tue Oct 04, 2022 5:54 pm

I was going to suggest what alamahant suggested a manual reset. As you tested and still now working. I would suggest try to use your second PI kernel to rule out if it is kernel configuration problem. Or even better try use 2nd pi SD card (or duplicate one) to see if that can help, because if it still not working you may have hardware problem.

Can you ping eth0 ip 192.168.86.76?

Is it possible you have duplicated IP

Just want to bring some ideas to try.
Top
JumboAg
Apprentice
Apprentice
User avatar
Posts: 224
Joined: Sat Mar 03, 2007 11:13 pm
Location: Dallas, TX

  • Quote

Post by JumboAg » Tue Oct 04, 2022 6:11 pm

I can ping the pi from itself fine.

Definitely not duplicated. I've also tried a range of a few different unused IP addresses on my subnet. Same result from all.

This pi had been in a box collecting dust for a while before I installed gentoo on it. (Used to work with stock raspian though.) I'll try to find another card and/or swap with my working pi and see if a stock raspian works with this particular one.
Top
pingtoo
Advocate
Advocate
User avatar
Posts: 2180
Joined: Fri Sep 10, 2021 8:37 pm
Location: Richmond Hill, Canada

  • Quote

Post by pingtoo » Tue Oct 04, 2022 6:28 pm

JumboAg wrote:I can ping the pi from itself fine.
I got a wrong impression, I thought you cannot even ping the pi itself :oops:

may be give the traceroute another try?

Code: Select all

## As root
traceroute -I 8.8.8.8
I expect the first hop is your router/gateway (as long as your router/gateway is not suppress ICMP)
traceroute default use UDP, just want to exclude any firewall blocking issue. The -I (capital i) force traceroute use ICMP

If traceroute can reach your router/gateway it most likely mean router/gateway need configuration changes to work with your pi.
if traceroute not working than it could be hardware problem, cable, or route port.
Top
JumboAg
Apprentice
Apprentice
User avatar
Posts: 224
Joined: Sat Mar 03, 2007 11:13 pm
Location: Dallas, TX

  • Quote

Post by JumboAg » Tue Oct 04, 2022 6:33 pm

traceroute times out, even with the -I.

Router port is good. I borrowed the cable in question from something else that works fine.

Since ping tells me destination host unreachable, I'm convinced its something on the pi itself either config or a hardware issue. Guessing config but until I test with a stock OS on it, cannot be positive.
Top
JumboAg
Apprentice
Apprentice
User avatar
Posts: 224
Joined: Sat Mar 03, 2007 11:13 pm
Location: Dallas, TX

  • Quote

Post by JumboAg » Tue Oct 04, 2022 8:53 pm

works like a champ with the stock raspberry pi OS. Going to assume I messed something up with the initial gentoo install. Will wipe it and try again. Fingers crossed that's all it is.
Top
pingtoo
Advocate
Advocate
User avatar
Posts: 2180
Joined: Fri Sep 10, 2021 8:37 pm
Location: Richmond Hill, Canada

  • Quote

Post by pingtoo » Tue Oct 04, 2022 9:14 pm

Good news, No hardware issue.

I use GenPi64's kernel, may be you can give it a try.
Top
JumboAg
Apprentice
Apprentice
User avatar
Posts: 224
Joined: Sat Mar 03, 2007 11:13 pm
Location: Dallas, TX

  • Quote

Post by JumboAg » Tue Oct 04, 2022 9:20 pm

First go around I used the raspberypi one in portage. 5.10.63_p20211029
Top
JumboAg
Apprentice
Apprentice
User avatar
Posts: 224
Joined: Sat Mar 03, 2007 11:13 pm
Location: Dallas, TX

  • Quote

Post by JumboAg » Tue Oct 04, 2022 10:56 pm

Confirmed that I must have messed something up the first time. After wiping the sd card and redoing the kernel build and stage3 install, its now working over eth0. Thanks to everyone that assisted me in ruling out other possibilities.
Top
Post Reply
  • Print view

20 posts • Page 1 of 1

Return to “Gentoo on ARM”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic