View previous topic :: View next topic |
Author |
Message |
JumboAg Apprentice
Joined: 03 Mar 2007 Posts: 198 Location: Dallas, TX
|
Posted: Tue Oct 04, 2022 2:53 am Post subject: default route not working raspberry pi 4 (systemd) |
|
|
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. |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3882
|
Posted: Tue Oct 04, 2022 9:51 am Post subject: |
|
|
Can you post
Code: |
/etc/systemd/network/50-static.network
|
You cant have 2 gateways.Also 0.0.0.0 is NOT your router IP. _________________
|
|
Back to top |
|
|
JumboAg Apprentice
Joined: 03 Mar 2007 Posts: 198 Location: Dallas, TX
|
Posted: Tue Oct 04, 2022 11:21 am Post subject: |
|
|
alamahant wrote: | Can you post
Code: |
/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: | [Match]
Name=eth0
[Network]
Address=192.168.86.76/24
Gateway=192.168.86.1
DNS=192.168.86.1 |
netstat -rn
Code: | 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] |
|
Back to top |
|
|
pingtoo l33t
Joined: 10 Sep 2021 Posts: 995 Location: Richmond Hill, Canada
|
Posted: Tue Oct 04, 2022 1:18 pm Post subject: |
|
|
Can you check dmesg for Link up event? on my machine Code: | 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 |
|
Back to top |
|
|
JumboAg Apprentice
Joined: 03 Mar 2007 Posts: 198 Location: Dallas, TX
|
Posted: Tue Oct 04, 2022 1:36 pm Post subject: |
|
|
Code: |
[ 7.004552] bcmgenet fd580000.ethernet eth0: Link is Down
[ 10.083212] bcmgenet fd580000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
|
Code: |
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. |
|
Back to top |
|
|
pingtoo l33t
Joined: 10 Sep 2021 Posts: 995 Location: Richmond Hill, Canada
|
Posted: Tue Oct 04, 2022 2:50 pm Post subject: |
|
|
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?
Could it be some kind of firewall mis-configuration? or do you even use firewall on you pi? |
|
Back to top |
|
|
JumboAg Apprentice
Joined: 03 Mar 2007 Posts: 198 Location: Dallas, TX
|
Posted: Tue Oct 04, 2022 3:50 pm Post subject: |
|
|
traceroute goes nowhere.
Code: |
$ 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. |
|
Back to top |
|
|
pingtoo l33t
Joined: 10 Sep 2021 Posts: 995 Location: Richmond Hill, Canada
|
Posted: Tue Oct 04, 2022 4:01 pm Post subject: |
|
|
How about firewall setting?
Sorry about all these probing just trying to guess what could be of problems. |
|
Back to top |
|
|
JumboAg Apprentice
Joined: 03 Mar 2007 Posts: 198 Location: Dallas, TX
|
Posted: Tue Oct 04, 2022 4:21 pm Post subject: |
|
|
IP Tables is empty for INPUT, FORWARD and OUTPUT. |
|
Back to top |
|
|
pingtoo l33t
Joined: 10 Sep 2021 Posts: 995 Location: Richmond Hill, Canada
|
Posted: Tue Oct 04, 2022 4:31 pm Post subject: |
|
|
JumboAg wrote: | netstat -rn
Code: | 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? |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3882
|
Posted: Tue Oct 04, 2022 4:43 pm Post subject: |
|
|
Do you have other network managers like NM maybe enabled?
Also in
Code: |
/etc/systemd/network
|
do you have other files that might be in conflict?
Try
Code: |
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
|
_________________
|
|
Back to top |
|
|
JumboAg Apprentice
Joined: 03 Mar 2007 Posts: 198 Location: Dallas, TX
|
Posted: Tue Oct 04, 2022 5:47 pm Post subject: |
|
|
@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. |
|
Back to top |
|
|
pingtoo l33t
Joined: 10 Sep 2021 Posts: 995 Location: Richmond Hill, Canada
|
Posted: Tue Oct 04, 2022 5:54 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
JumboAg Apprentice
Joined: 03 Mar 2007 Posts: 198 Location: Dallas, TX
|
Posted: Tue Oct 04, 2022 6:11 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
pingtoo l33t
Joined: 10 Sep 2021 Posts: 995 Location: Richmond Hill, Canada
|
Posted: Tue Oct 04, 2022 6:28 pm Post subject: |
|
|
JumboAg wrote: | I can ping the pi from itself fine. | I got a wrong impression, I thought you cannot even ping the pi itself
may be give the traceroute another try? Code: | ## 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. |
|
Back to top |
|
|
JumboAg Apprentice
Joined: 03 Mar 2007 Posts: 198 Location: Dallas, TX
|
Posted: Tue Oct 04, 2022 6:33 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
JumboAg Apprentice
Joined: 03 Mar 2007 Posts: 198 Location: Dallas, TX
|
Posted: Tue Oct 04, 2022 8:53 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
pingtoo l33t
Joined: 10 Sep 2021 Posts: 995 Location: Richmond Hill, Canada
|
Posted: Tue Oct 04, 2022 9:14 pm Post subject: |
|
|
Good news, No hardware issue.
I use GenPi64's kernel, may be you can give it a try. |
|
Back to top |
|
|
JumboAg Apprentice
Joined: 03 Mar 2007 Posts: 198 Location: Dallas, TX
|
Posted: Tue Oct 04, 2022 9:20 pm Post subject: |
|
|
First go around I used the raspberypi one in portage. 5.10.63_p20211029 |
|
Back to top |
|
|
JumboAg Apprentice
Joined: 03 Mar 2007 Posts: 198 Location: Dallas, TX
|
Posted: Tue Oct 04, 2022 10:56 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
|