You are not logged in.

#1 2022-07-06 19:04:07

lfitzgerald
Member
Registered: 2021-07-16
Posts: 175

[SOLVED] Unreliable DHCP over ethernet with OpenWRT

I have a server (internal to the LAN) that I put at a certain static IP. Before I was using my ISPs crappy router, it didn't even have a proper interface for configuring DHCP but somehow I got the server to show up at the right one. I have since deleted that connection so I'm not sure exactly how it worked, but it was something very simple.

I have since switched to OpenWRT. There's no particularly complex configuration that I've done vs. the default (mainly just passwords, timezone etc). All my wifi devices have little trouble connecting, but the server (plugged in via Ethernet) cannot acquire an IP from DHCP. I use NetworkManager. "nmcli connection up ethernet" just hangs for 45 seconds or so before timing out with a generic error about failing to acquire IP. I've tried:

* Setting IPv6 to Automatic in NM
* Setting IPv6 to Ignore in NM
* Setting IPv6 to Disable in NM
* Putting my desired IP in "Addresses" under IPv4 in NM
* Leaving "Addresses" under IPv4 blank in NM
* Disconnecting and re-connecting via "nmcli connection up/down"
* Deleting the connection and letting NM re-create a new one
* Disabling and enabling the ethernet device
* Switching to dhcpcd (I'm back on NM's internal DHCP client now)
* Disconnecting and reconnecting the ethernet cable
* Rebooting the server
* Rebooting the router

None of it seems to reliably fix the issue. Yesterday after I had given up it magically connected, without me doing anything new. I assigned a static lease for my desired IP through OpenWRT, and made the server reconnect, after which it showed up on the IP. All seemed good. Today I woke up to the router not broadcasting Wifi for some reason, and all LEDs except power were off. I power-cycled the router and everything worked again, but now the server refuses to connect with the same DHCP issue.

How can I diagnose the problem? When I check "systemctl status networkmanager" I just get a single error about the timeout/failed to acquire IP. Since my previous router didn't have this problem, it must be at least in part an OpenWRT issue. But it seems strange that Arch can't acquire a DHCP lease and won't report a useful error.

Last edited by lfitzgerald (2022-07-06 19:23:26)

Offline

#2 2022-07-06 19:23:11

lfitzgerald
Member
Registered: 2021-07-16
Posts: 175

Re: [SOLVED] Unreliable DHCP over ethernet with OpenWRT

Looks like it's working again now - I had set a range of DHCP addresses that excludes my desired static IP. Other routers I've used in the past have excluded static IPs from the DHCP range, so even if it was outside of it, they would allow a client to connect. Looks like OpenWRT works differently.

I'll edit the question if the problem comes back, since I'm not entirely sure the DHCP range actually fixed as opposed to it being coincidental.

Offline

Board footer

Powered by FluxBB