NetSecond
Posts: 94
Joined: Wed Mar 13, 2013 12:14 am
Location: Germany

[solved] No DHCP adress in buster with network cable, only on dhcp

Sat Aug 31, 2019 5:46 pm

Hi together,

my problem:

I have installed Raspbian Buster on serveral Pis (3B, 3B+ and 4B), the problem is everywhere the same:

If I config a WiFi connection, the Pi gets a DHCP adress from my router (AVM FritzBox), eg.: 192.168.178.35 (Router is 192.168.178.1)

If I connect network cable, the Pi gets a second IP adress but not in DHCP range, eg.: 169.254.56.161

Normaly I know, that when I plug the network cable in, the Pi gets a new DHCP adress from my DHCP server in my router and the DHCP adress from wifi and complete WiFi is disabled.
Now the Pi stay in Wifi and he gets a second nonDHCP adress for eth0.

Long time I didn´t see that, because I worked with WiFi and when I plugged cable in, everything worked but what I did´t see was the problem, that the Connection was also WiFi anf I thought, it was cable.

Many tests with new Images, different RasPis, changed cables, resettet router, and so on let me think, it could only be a problem of the actual buster Image (I´ve updated packages via sudo apt-get update && sudo apt-get upgrade -y).

Any ideas ??

Sorry for my english, ist not my mother language ….
Last edited by NetSecond on Sat Aug 31, 2019 10:36 pm, edited 2 times in total.
Gruß / Regards
NetSecond

Ernst
Posts: 1232
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: No DHCP adress in buster with network cable, only on dhcp

Sat Aug 31, 2019 5:52 pm

I suggest you remove power from your router to force a cold start.
This is not a buster problem, the problem is in your network.
The road to insanity is paved with static ip addresses

User avatar
B.Goode
Posts: 8568
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: No DHCP adress in buster with network cable, only on dhcp

Sat Aug 31, 2019 6:27 pm

Many tests with new Images, different RasPis, changed cables, resettet router, and so on let me think, it could only be a problem of the actual buster Image (I´ve updated packages via sudo apt-get update && sudo apt-get upgrade -y).

Any ideas ??

Another explanation, consistent with your description, is that by default your Fritzbox router does not assign valid IP addresses in response to DHCP requests on its wired/cabled interface. Maybe it implements hardware Mac address filtering by default on that interface and requires your RPi(s) to be 'whitelisted'.

My experience of setting up an RPi3b+ with Raspbian Buster yesterday was that it did get a working IP address configuration from the home broadband 'hub' on my network, with no additional configuration or intervention on my part. I really do doubt that the Buster Operating System image is 'broken' in this respect.

User avatar
PeterO
Posts: 5021
Joined: Sun Jul 22, 2012 4:14 pm

Re: No DHCP adress in buster with network cable, only on dhcp

Sat Aug 31, 2019 7:10 pm

169.254.56.161 is a "Link local" address that has been assigned because there is no dhcp server on your wired network to give your PI's wired interface a real address.

https://en.wikipedia.org/wiki/Link-local_address

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

NetSecond
Posts: 94
Joined: Wed Mar 13, 2013 12:14 am
Location: Germany

Re: No DHCP adress in buster with network cable, only on dhcp

Sat Aug 31, 2019 8:06 pm

Ernst wrote:
Sat Aug 31, 2019 5:52 pm
I suggest you remove power from your router to force a cold start.
This is not a buster problem, the problem is in your network.
No, I don´t remove power, I select "Restart" in router maintenance menu.
B.Goode wrote:Another explanation, consistent with your description, is that by default your Fritzbox router does not assign valid IP addresses in response to DHCP requests on its wired/cabled interface. Maybe it implements hardware Mac address filtering by default on that interface and requires your RPi(s) to be 'whitelisted'.

My experience of setting up an RPi3b+ with Raspbian Buster yesterday was that it did get a working IP address configuration from the home broadband 'hub' on my network, with no additional configuration or intervention on my part. I really do doubt that the Buster Operating System image is 'broken' in this respect.
Mac filtering is disabled.
Other Pis with Stretch are working without any Problems and they get DHCP adresses over Network cables, ist very confusing.
PeterO wrote: 169.254.56.161 is a "Link local" address that has been assigned because there is no dhcp server on your wired network to give your PI's wired interface a real address.

https://en.wikipedia.org/wiki/Link-local_address

PeterO
I know but why get all other Network device over cable network / WiFi a dhcp adress but only buster devices not ??
This is, where I am looking for a solution.

For example, I have a Pi 2B with volumio over cable => working, switch to WiFi => working.
I have a P3B with RaspberryMatic changed from WiFi to cable => working without any Problems same time.
I have a Pi3B+ with Windows 10 IoT => working with and without cable ….
My main PC is working with DHCP over cable at the same time an the same router.
I can change my Laptop from WiFi to cable and back without any Problem, but why and my Pis with buster not ??
I have a NAS, working without any Problems over cable and the same dhcp ….

Maybe is there something I do other than bevore in the config ??

Normaly I Flash the sd card, make the empty ssh file in the fat partition and also the WiFi config over wpa_supplicant.conf.

Then everything is running and I do the rest of the updates and configs.

But next, I try to test without any updates, Maybe there is something different ….
Gruß / Regards
NetSecond

User avatar
PeterO
Posts: 5021
Joined: Sun Jul 22, 2012 4:14 pm

Re: No DHCP adress in buster with network cable, only on dhcp

Sat Aug 31, 2019 8:09 pm

Is the dhcp server on your wired network configured to give addressed to specific mac addresses ?

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
B.Goode
Posts: 8568
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: No DHCP adress in buster with network cable, only on dhcp

Sat Aug 31, 2019 8:17 pm

Is there a fixed-size pool of IP addresses the DHCP server can hand out, and might you have hit that limit?

NetSecond
Posts: 94
Joined: Wed Mar 13, 2013 12:14 am
Location: Germany

Re: No DHCP adress in buster with network cable, only on dhcp

Sat Aug 31, 2019 10:35 pm

I tested this next and deleted all disconnected devices.

But that was it not.

I have found the error now:
A network cable plug was slipped out but only so minimal that you have not seen it.
This cable was hanging between the switch and the router and all devices attached to this switch did not get a DHCP address.
All other devices where it worked (PC, NAS, etc.), of course got DHCP addresses.

I noticed it only when I pulled out all the network cables and put them back in again. Then I noticed that the LED for the connection between said switch (I use 4 pieces) and the router only went back to when I re-inserted the cable.
Since the plug is probably broken, I changed the cable and now everything is back.

Big, big sorry for this, I was desperate but better a broken cable than something bigger.

Thanks a lot for your ideas and next time, I will check every cable before I post ….
Gruß / Regards
NetSecond

Return to “General discussion”