-1

I’ve been attempting to connect a Pi 4B 4Gb to a network on a Technicolor DGA4231 router in the latest Raspberry Pi OS. Flashed to a Micro SD card with no modifications at all.

It seems to get an incorrect route assigned from the router and also an incorrect DNS. Both are set to a 192.168.1.140 IP which doesn’t exist at all on the network.

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.140   0.0.0.0         UG    303    0        0 wlan0
169.254.0.0     0.0.0.0         255.255.0.0     U     202    0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     303    0        0 wlan0

Here’s the result of ‘ifconfig’ (when connecting via wifi):


eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.22.45  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 fe80::9074:5f6b:aeb1:1e67  prefixlen 64  scopeid 0x20<link>
        ether dc:a6:32:dd:ab:10  txqueuelen 1000  (Ethernet)
        RX packets 229  bytes 164902 (161.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4  bytes 690 (690.0 B)
        TX errors 629  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
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 109  bytes 11500 (11.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 109  bytes 11500 (11.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.104  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::c84a:e40a:a726:3007  prefixlen 64  scopeid 0x20<link>
        ether dc:a6:32:dd:ab:11  txqueuelen 1000  (Ethernet)
        RX packets 6161  bytes 6357121 (6.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4508  bytes 541311 (528.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Pinging the router at 192.168.1.1 gives ‘destination host unreachable’. It does this on both ethernet and wifi. DNS doesn't work either.

I added a new default route as follows:

route add default gw 192.168.1.1 eth0

But it didn’t help.

I attempted to make the Pi use a static ip, suspecting DHCP issues, using the following setup in /etc/dhcpcd.conf:

# Example static IP configuration:
nohook lookup-hostname
interface eth0
static ip_address=192.168.1.23/24
static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=192.168.1.1
static domain_name_servers=192.168.1.1 8.8.8.8 fd51:42f8:caae:d92e::1

I also set up a static IP reservation on the router by mac address.

This successfully shows the correct static IP, route, and DNS are set when looking at ‘route -n’ and ‘ifconfig’. However, I still cannot ping the router or anything on the internet. DNS doesn’t work either.

The strangest thing is that if I create a wifi hotspot from my Android phone, the Pi 4 B connects perfectly and everything works including full internet access.

But connecting to the home network via wifi or wired causes the issues described. What could be the issue?

I've rebooted everything multiple times.

Many thanks in advance for any ideas!

3
  • Thought it worth mentioning that the OS is fully up to date (I updated it over 4G) – neilmillstone Apr 24 at 21:05
  • Whatever you have done eth0 is NOT being allocated an IP address. Your routing table and settings appear inconsistent and you are not following normal procedures. – Milliways Apr 24 at 22:47
  • I know it's not being allocated an IP address. I thought this should work out of the box on a Pi as it has before (I've had a Pi 3B on this network and it worked fine). I disabled ipv6 as a last ditch attempt. I've now discovered it does occasionally connect to the internet successfully! About one in three reboots I get a perfect connection that runs well. Then after another reboot it is dead. This is with the static IP config I posted above, but on wlan0. I'm even more confused now! (also, great username you have there) – neilmillstone Apr 25 at 0:53
0

I suggest that rather than trying to set a static IP Address you request the DHCP server to assign a predictable IP Address. See https://raspberrypi.stackexchange.com/a/121830/8697

The Pi WILL "work out of the box" - it is designed to use DHCP.

The values you are are attempting to assign seem to be inconsistent with your router, but you haven't specified what these are.

If for some reason you do want a static IP Address see How to set up Static IP Address which explains how to do it correctly.

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.