-1

Fresh Rasberry Pi 4 with Pi OS Lite (64bit) successfully get's an IPv4 leased from the DHCP server, however it cannot ping or be pinged by the DHCP server itself let alone any other device which isn't connected to the exact same switch as it.

From my desktop I am able to successfully SSH into the pi which is how I've been accessing it as I don't have a micro HDMI cable. From my desktop I can ping the pi, however the pi cannot ping back to my desktop. The pi also cannot be pinged by any other device on the network including from the router itself which assigned it the IP in the first place, and I have confirmed that both the pi and router agree it should have the same IP to the same MAC address.

Also cannot ping or be pinged from my NAS which is directly connected to the router on the same vLan as the pi with IP 10.0.0.2

As the PI cannot even talk to the gateway, I also cannot install any packages that might be helpful to diagnose the issue.

Attempts so far

  • Rebooted pi (many times)
  • Define static IPv4 in /etc/dhcpcd.conf
  • Deleted iptable rules
  • Enable routing echo 1 > /proc/sys/net/ipv4/ip_forward
  • Restart DHCP service sudo service dhcpcd restart
  • Leave device off until lease expires and restart with no reserved IP or static IP settings on PI
  • Restarted ethernet adapter sudo ip link set eth0 down (then up)
  • Restarted network manager sudo systemctl restart NetworkManager
  • Restarted networking service sudo systemctl restart networking
  • Renew DHCP via Network manager nmcli connection down "Wired connection 1" && nmcli connection up "Wired connection 1"
  • Reflashed multiple times (have just reflashed it ready for any feedback, so it's stock Raspberry Pi OS Lite (64bit) just with a custom password)

Some information that may or may not be helpful

arp -a
? (10.0.0.2) at <incomplete> on eth0
? (10.0.0.6) at 74:56:3c:6e:43:83 [ether] on eth0
? (10.0.0.1) at <incomplete> on eth0
arp -n
Address                  HWtype  HWaddress           Flags Mask            Iface
10.0.0.6                 ether   74:56:3c:6e:43:83   C                     eth0
iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ip route
default via 10.0.0.1 dev eth0 src 10.0.0.7 metric 202
10.0.0.0/24 dev eth0 proto dhcp scope link src 10.0.0.7 metric 202
ip route show
default via 10.0.0.1 dev eth0 src 10.0.0.7 metric 202
10.0.0.0/24 dev eth0 proto dhcp scope link src 10.0.0.7 metric 202
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
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether e4:5f:01:f7:42:15 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.7/24 brd 10.0.0.255 scope global noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::868:6e14:c4ec:9875/64 scope link
       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 e4:5f:01:f7:42:16 brd ff:ff:ff:ff:ff:ff
dmesg | grep eth0
[    9.687196] bcmgenet fd580000.ethernet eth0: Link is Down
[   13.760177] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   13.760218] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[  309.696216] bcmgenet fd580000.ethernet eth0: Link is Down
[  312.768318] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 7449.670065] bcmgenet fd580000.ethernet eth0: Link is Down
[ 7449.705111] bcmgenet fd580000.ethernet eth0: Link is Down
[ 7453.792318] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 7453.792393] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 7487.934052] bcmgenet fd580000.ethernet eth0: Link is Down
[ 7487.968852] bcmgenet fd580000.ethernet eth0: Link is Down
[ 7492.064265] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 7492.064339] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
nmcli connection show
NAME                UUID                                  TYPE      DEVICE
Wired connection 1  70f4efc4-4e71-4eac-872e-8998ccd6cdba  ethernet  eth0
nmcli device status
DEVICE         TYPE      STATE         CONNECTION
eth0           ethernet  connected     Wired connection 1
wlan0          wifi      disconnected  --
p2p-dev-wlan0  wifi-p2p  disconnected  --
lo             loopback  unmanaged     --

Network:
Rasberry Pi + Desktop connected to unmannaged switch in bedroom. That switch is then connected to the router (TP-ER605) on a port assigned to vlan1.
Whether I use DHCP dynmically, reserve an IP, or use static on the device it makes no difference.
The router itself does have the added complexity of a port based vLAN, however as it is port based it should be transparent to the pi as just being on it's own network.

Router Settings:

| Property | Value |
|:-|:-
vlan1 | 10.0.0.0/24 (gateway .1 auto-lease 10.0.0.100-199)
vlan2 | 10.0.1.0/24 (gateway .1 auto-lease 10.0.1.100-199)
DNS | 10.0.0.2 (vlan2 allowed to access)
desktop ip reserved by MAC | 10.0.0.6
NAS ip reserved by MAC | 10.0.0.2
pi ip reserved by MAC | 10.0.0.7
8
  • I've spent hours trying even more things that I've listed here, but I can't even remember them all now. This is a new pi that arrived today. I'm at a lost. Jun 19, 2023 at 9:51
  • You also claim to be running NetworkManager? I suggest you do a fresh install and leave it alone to do its job.
    – Milliways
    Jun 19, 2023 at 10:22
  • I have done three fresh installs using the Raspberry Pi Imager, but I'll try another one. Jun 19, 2023 at 10:25
  • Reflash didn't help, though it's probably good since I started trying anything out of deperation at one point and that probably messed with things quite a lot. Jun 19, 2023 at 10:35
  • @Milliways "why define a static IPv4 in dhcpd.conf"? Because the stock build of PiOS literally has a comment that says "# Example static IP configuration:" - so funnily enough I tried uncommenting out their example below that line and changing the values to reflect my network configuration. No need to be so concedecending... :| Jun 19, 2023 at 10:42

2 Answers 2

0

Stick with one or the other - do not try using both nmcli and dhcpcd. If you've enabled both, your best choice for repair is to re-flash. I've had much more experience with dhcpcd, and so I will recommend you use that.

Avoid using the static option until you've had some experience. One of your comments above suggests you didn't read man dhcpcd.conf. Please re-read at least this portion of it:

For IPv4, you should use the inform ipaddress option instead of setting a static address.

Your best chance for success is to begin with no modification to dhcpcd.conf at all. It should work fine with no modification. I'd suggest you get things working with no modifications first, and then experiment.

3
  • I originally started with a fresh version of PiOS which didn't work which is why I started experimenting. It is currently in a fresh state (reflashed and done nothing but login and run a few pings and checked the ip config) with no extra configs and still doesn't work Jun 30, 2023 at 0:06
  • @AjaniBilby: Sounds like you've done something else wrong. What do you mean by "... checked the ip config"???
    – Seamus
    Jun 30, 2023 at 23:02
  • I looked at the default DHCP config, iptables -L, ip addr ip route, ip link show, systemctl status dhcpcd, systemctl status systemd-networkd, systemctl status NetworkManager, cat /etc/network/interfaces, ifconfig -a, cat /etc/sysctl.conf cat /etc/sysctl.conf All I have done on the current install is flash PiOS, with a set username and password (using the imager utility) connect device to the network via ethernet and SSH in. I don't see how I could have done any of those steps wrong. Jul 3, 2023 at 0:50
0

Port 2 of my router which every other device on my home network is connected thourgh, is setup as a tagged VLAN. I switched that port to an untagged VLAN and now it works.

Why the rasberry pi can't handle a tagged VLAN when everything from my PI cameras, to Google home, to android phone, to windows PCs all work fine. Who knows...

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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