I have two systems where I need them to assign link-local addresses in a 
169.254.4/24 subnet, regardless of any other addresses configured. I'm using a 
/24 subnet because I have multiple interfaces on the system that require 
link-local addresses; I was placing them in their own subnets.

>From this 
>comment<https://www.freedesktop.org/software/systemd/man/latest/systemd.network.html#:~:text=If%20an%20IPv4%20link%2Dlocal%20address%20(169.254.0.0/16)%20is%20specified%2C%20IPv4%20Address%20Conflict%20Detection%20(RFC%205227)%20is%20enabled%20for%20the%20address.>
> in the man page, I was expecting I could configure the interface address 
>identically on both systems and leave it to collision detection to pick an 
>appropriate available address.

The 1st interface assigns its link-local address (169.254.4.2/24). 
Unfortunately, the next interface to start doesn't assign any link-local 
address. I've tried to get more debug information by increasing log-level to 
debug, but I get no indications around the address assignments.

As an experiment, I change the 2nd system to use a different host address in 
the same subnet, and it gets assigned correctly.  I guess that collision 
detection is preventing the address assignment.

How do I achieve this or how can I get more debug information?

The relevant snippet from the network config file is:

[Network]
Address=169.254.4.2/24


Full contents of the network configuration follows:

$ networkctl cat 10-eno0.network
# /etc/systemd/network/10-eno0.network
[Match]
KernelCommandLine=!nfsroot
Name=eno0

[DHCP]
ClientIdentifier=mac
RouteMetric=10
UseDomains=yes
UseHostname=yes
UseMTU=yes

[IPv6AcceptRA]
UseRedirect=no

[Link]
RequiredForOnline=no

[Network]
DHCP=yes
Domains=labs.company.net
NTP=10.10.135.123
# LinkLocalAddressing=yes
# IPv4LLStartAddress=169.254.1.1
Address=169.254.4.2/24

# /usr/lib/systemd/network/10-eno0.network.d/10-network.conf
[Network]
MulticastDNS=yes

Regards,
Matt.

Reply via email to