FlightAware Discussions

DHCP Issues

Unit stopped getting DHCP after a reboot. It hadn’t been rebooted in quite some time. Its a pi3. I confirmed with my router it wasn’t seeking dhcp. I confirmed the settings are still set to get dhcp on the pi. I checked the /boot/piaware-config.txt and both wifi and wired were being used (I dont use wifi).

So I took the chip and put it into a working raspberry pi to be sure it wasn’t a blown ethernet port and it wouldn’t get DHCP there either. So I tried with a different router to be sure it wasn’t my network. It wouldn’t get DHCP there either.

From what I could see one network file sets it to manual initially but then calls on some /var/lib dhcp files. In those files are the last lease I had and correct ip addresses. But it will not work.

Any ideas?

Writing a fresh image is by far the easiest solution.

For Beginners - How to Get Back Existing Station Number in A Fresh Install

I’m not really familiar with the piaware sd-card networking shenanigans, so i wouldn’t know where to start.

1 Like

Thanks for the reply… I’m keeping a reflash as a last option. I’d really like to just fix it. I’m trying to see how the networking is actually working. If it were straight linux networking this would get fixed fast. I suspect something got corrupt during the reboot but I like to fix problems. I’ve had to reload this once before. But if I find the bug or issue I can report it back.

It may just be that, a corrupt sd-card and not a bug?
What was the version when you wrote it to the sd-card, maybe it’s a problem caused due to some upgrade?

I’ thinking there was an update I think it was set up to automatically update. It continued to work but after the next boot some configuration is out of order .

Would be nice if someone could chime in on the correct dhcp configuration that is needed for it to work…

One of the most helpful users on the forum already gave you the fastest and easiest solution to correct your issue 3 hours ago.

If i were fancy on debugging this, which i might be if i had the issue, i’d probably start looking here:

https://github.com/flightaware/piaware-support/blob/master/scripts/generate-network-config

This isn’t about the easiest solution but finding the bug :slight_smile:
But i get your gist!

Make sure /etc/network/interfaces contains iface eth0 inet dhcp.

Yeah, no. That’s not what the sdcard configuration uses.

The manual interface commands are essentially a copy of what ifupdown would do in “dhcp” mode, with slightly adjusted dhclient command lines as ifupdown doesn’t do quite what we want and there’s no way to override only part of it.

What do the system logs say? Is it actually requesting a DHCP lease on the Pi side?

Yeah I’ve been seeing some systemctl errors so I think there is a corruption in the OS. I was just hoping it wasn’t and maybe I could fix it. I’ll do a reload - thanks for all the tips.

Might also be that the whole sd-card is bad.
Especially if you needed a reflash before.

Not sure how often just data corruption happens on the pi3.

I’ve had an image “go bad” on a Pi3. It stated getting unreliable requiring a restart once a week, then every few days.
I reflashed the same SD card and it’s been fine for six months.

The Pi is on a UPS, but the problems seemed to start some time after a power failure - maybe the cause, maybe a coincidence.