[10:44] Hi netplan team, I am having trouble with netplan on ubuntu2204, I need to configure link-lock addresses to interfaces that managed by netplan, but I constantly fail to do so, netplan quietly does NOT add the IP address like 169.254.111.101 to the interface I specify. What issues might that be? Thanks in advance [10:45] Also, it seems a bit strange to be that netplan is generating the Address attribute under [Network] section instead of [Address] section, can anyone shed some lights on this behavior ? [10:47] imcom: can you share some relevant bits of your Netplan configuration? I assume you're using the "link-local: [ ipv4, ipv6 ]" setting, right? Also, from your 2nd comment I assume you're using the systemd-networkd backend, right? [10:49] note that "An IPv4 link-local address is configured when ... DHCPv4 autoconfiguration has been unsuccessful for some time". From systemd.network(5) [10:50] hi slyon, yes, we are running ubuntu-server so systemd-networkd is the backend. Let me share the netplan yml here, give me a sec. We tried to use link-local: [ipv4] , but it did not solve the issue, but instead, it gets an auto-assigned ipv4 address on the same interface .... [10:52] we do not use DHCP, all interfaces and IP addresses are statically configured. There was no issue with the same netplan config when we use 1804 and 2004 [10:52] im getting a demo config from my coworker, give me several minutes to post the config :D [11:09] the issue is that we want to use link-local address deliberately to some of the interfaces by specifying them in netplan config [11:09] also, there is the situation that if we add the addr via `ip addr add` and then run netplan apply again, the address will be removed from the interface [11:10] network: [11:10]   version: 2 [11:10]   renderer: networkd [11:10] so you're using "addresses: [ 169.254.111.101/24 ]" ? [11:10] correct [11:10] imcom: maybe use something like https://dpaste.org/ to share the config [11:11] we want to avoid network conflict with customer's network, so we would like to exploit the link-local addrs [11:11] sure [11:11] It seems to be working for me locally, manually assigning a link-local address. I'm on Ubuntu 24.04, though. Using a different version of Netplan (and systemd-networkd). [11:12] https://dpaste.org/R6yvy [11:12] It doesn't seem to be working in combination with DHCP4 or probably "link-local: [ipv4]", as noted by danilogondolfo above [11:12] >It seems to be working for me locally, manually assigning a link-local address. I'm on Ubuntu 24.04, though. Using a different version of Netplan (and systemd-networkd). [11:12] if we manually assign the address, it applied, but after restart networkd or run netplan apply, the address will be removed [11:13] >It doesn't seem to be working in combination with DHCP4 or probably "link-local: [ipv4]", as noted by danilogondolfo above [11:13] yes, but it is not our case [11:14] well, yes. Manually assigning via "ip addr" is expected to be temporary. With "Manually" I meant Netplan "addresses: [...]" [11:16] oh ok ok, but in 2204, we cannot do this Netplan "addresses: [...]" as well .. [11:16] no link-local address is added to the interface .. [11:18] imcom, you mentioned above "but instead, it gets an auto-assigned ipv4 address on the same interface", what kind of auto-configuration is that, where does it come from? [11:23] imcom: Hmm.. I cannot seem to reporduce in a 22.04 container. (But also the container's network setup is much less complex than yours). But manually assigning a link-local address seems work and is persistent. Can you confirm this minimal example works on your end? https://dpaste.org/Gd7M1 [11:30] >you mentioned above "but instead, it gets an auto-assigned ipv4 address on the same interface", what kind of auto-configuration is that, where does it come from? [11:30] if we enable link-lock: [ipv4] there is an additional link-local addr to be assigned by the system [11:40] oh right, that's the expected behavior. It will auto-config a link-local address in case of "link-local: [ipv4]". But that's not what you want (and not part of the configu you shared). [12:34] so, there is an important observation about the IPv4 link-local address in the RFC https://datatracker.ietf.org/doc/html/rfc3927#section-1.6 [12:34] you basically should not do that :) [12:35] something (networkd?) might be getting rid of it because they simply can. I'm just guessing here though