imcom | 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:44 |
---|---|---|
imcom | 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:45 |
slyon | 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:47 |
danilogondolfo | note that "An IPv4 link-local address is configured when ... DHCPv4 autoconfiguration has been unsuccessful for some time". From systemd.network(5) | 10:49 |
imcom | 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:50 |
imcom | 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 |
imcom | im getting a demo config from my coworker, give me several minutes to post the config :D | 10:52 |
imcom | 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 |
imcom | 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:09 |
imcom | network: | 11:10 |
imcom | version: 2 | 11:10 |
imcom | renderer: networkd | 11:10 |
slyon | so you're using "addresses: [ 169.254.111.101/24 ]" ? | 11:10 |
imcom | correct | 11:10 |
slyon | imcom: maybe use something like https://dpaste.org/ to share the config | 11:10 |
imcom | we want to avoid network conflict with customer's network, so we would like to exploit the link-local addrs | 11:11 |
imcom | sure | 11:11 |
slyon | 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:11 |
imcom | https://dpaste.org/R6yvy | 11:12 |
slyon | It doesn't seem to be working in combination with DHCP4 or probably "link-local: [ipv4]", as noted by danilogondolfo above | 11:12 |
imcom | >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 |
imcom | if we manually assign the address, it applied, but after restart networkd or run netplan apply, the address will be removed | 11:12 |
imcom | >It doesn't seem to be working in combination with DHCP4 or probably "link-local: [ipv4]", as noted by danilogondolfo above | 11:13 |
imcom | yes, but it is not our case | 11:13 |
slyon | well, yes. Manually assigning via "ip addr" is expected to be temporary. With "Manually" I meant Netplan "addresses: [...]" | 11:14 |
imcom | oh ok ok, but in 2204, we cannot do this Netplan "addresses: [...]" as well .. | 11:16 |
imcom | no link-local address is added to the interface .. | 11:16 |
slyon | 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:18 |
slyon | 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:23 |
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:30 |
imcom | if we enable link-lock: [ipv4] there is an additional link-local addr to be assigned by the system | 11:30 |
slyon | 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). | 11:40 |
danilogondolfo | 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 |
danilogondolfo | you basically should not do that :) | 12:34 |
danilogondolfo | something (networkd?) might be getting rid of it because they simply can. I'm just guessing here though | 12:35 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!