Enable NM 1.52 link-local fallback resolution - #2321
Conversation
|
It would probably be good to mention this in the documentation, but I don't think there is currently a section talking about DHCP. |
|
Yeah, I don't believe our documentation talks about networking very much at all. It seems like a common enough foot gun. It may be worth mentioning, although most people probably don't need to know very much |
|
I added some draft documentation, although I'm unsure if I got the level of detail right. |
4153f8b to
4d1f0a5
Compare
d2f1481 to
36b69ec
Compare
03a43cd to
68fc1e7
Compare
36b69ec to
05eb545
Compare
439f5fc to
b8e9e4f
Compare
05eb545 to
0ebf011
Compare
|
When do we want to try introducing this? The Raspberry Pi and Arabian Orange Pi images have the necessary NM versions, but the Rubik Pi and Joshua Riek Orange Pi images do not. It shouldn't break with older NM versions, but it won't do anything either. |
0ebf011 to
cd1a229
Compare
|
All of our images now have at least NM 1.52, so this feature should now be functional. |
|
I've been reading the NetworkManager issues and I'm not sure that version 1.52 completely solves this problem. According to open issue 1775, we have to set I'll try to do more testing when I have some time. |
|
Good catch. I tested this again, and the connection does seem to briefly drop approximately every 50 seconds when connected via the link-local address as it tries to renegotiate the DHCP address. |
|
I tried combining this with |
|
Can we add some documentation on previous networking issues and the Om5p radio specifically? In general it's worth asking if we want to maintain support for it and its quirks. I remember something about ipv6 issues? |
|
If we want to avoid IPv6, we can configure the connection like this: # 1. Keep the standard DHCP configuration active
nmcli connection modify "<con-name>" ipv4.method auto
# 2. Allow link-local (169.254.x.x) only when no DHCP IP is present
nmcli connection modify "<con-name>" ipv4.link-local fallback
# 3. Tell NM that an outstanding DHCP request is allowed to stay unfulfilled
nmcli connection modify "<con-name>" ipv4.may-fail yes
# 4. CRITICAL: Avoid protocol timeout errors that cause interface resets
nmcli connection modify "<con-name>" ipv4.dhcp-timeout infinity
# 5. Completely disable IPv6 to match your requirements
nmcli connection modify "<con-name>" ipv6.method disabled
# 6. Set connection auto-activation retries to infinite loop mode
nmcli connection modify "<con-name>" connection.autoconnect-retries 0I used Google Gemini to help formulate this and I've been testing it with good results. I can swap between being connected to my router and being connected directly to my computer and the coprocessor remains reachable. Here's the explanation provided by Gemini:
I think that the reason enabling IPv6 also works is that it prevents the IPv4 DHCP timeout from triggering the network reset, essentially doing the same thing as setting the timeout to infinity. |
|
I think a weird thing about FRC networking is that the field DHCP server often isn't accessible when the wired link is established due to the wireless startup time. Most of our networking testing does not cover this frequently encountered scenario. |
|
Actually, I forgot that a range of addresses is reserved for on-radio DHCP to hand out, but it still doesn't hurt to check that deferred DHCP availably works correctly. |
775a5c5 to
b7e7e7e
Compare
Description
This enables link-local as a fallback to DHCP address resolution, using the new features of NetworkManager 1.52. Debian 13 (Trixie) and Ubuntu 26.04 (Resolute) introduce the required updates to NetworkManager for this to work. Unlike #1550, this continues to timeout and retry DHCP while holding a link-local address, which should avoid breaking compatibility with DHCP servers that don't respond immediately.
Closes #1813, blocked on updating the images to have NM 1.52 or later.
Meta
Merge checklist: