<div dir="ltr"><div>Hi Andrei</div>Thanks for your valuable information and clarification.<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Regards<br>Manjunatha Srinivasan N</div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 19 Oct 2023 at 18:00, Andrei Borzenkov <<a href="mailto:arvidjaar@gmail.com">arvidjaar@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Oct 19, 2023 at 3:18 PM manjunatha srinivasan<br>
<<a href="mailto:manjunathan.n@gmail.com" target="_blank">manjunathan.n@gmail.com</a>> wrote:<br>
><br>
> Hi<br>
> I have 2 following ethernet profiles at /etc/NetworkManager/system-connections:<br>
> One for dynamic ip configuration and other for link local as fallback when DHCP server is not reachable. As expected when DHCP server is not reachable, fall back IPv4 address happens e.g. 169.254.105.20 with subnet mask as 255.255.0.0 by the NetworkManager.<br>
> This particular IP address is always the same which is expected one.<br>
<br>
You can not expect this. There is always the possibility of address<br>
collision and NetworkManager will then generate a different address.<br>
<br>
> Please let me know how this constant IPv4 address is decided by the NetworkManager.<br>
<br>
By default it hashes the interface MAC address.<br>
<br>
> Also let me know if there is any configuration option in NetworkManager to change last 2 octets (i.e.105.20) represented in the decimal value of last 2 values of ethernet MAC hex address.<br>
><br>
<br>
It is not guaranteed to be unique. Besides, you have two addresses<br>
less than 2 octets, so for some MAC this cannot be used at all.<br>
<br>
> Ethernet (eth0) method based on DHCP:<br>
> [connection]<br>
> id=my-eth0<br>
> uuid=8466b654-0183-4900-a2d6-26a9e6af275e<br>
> type=ethernet<br>
> autoconnect-priority=1<br>
> interface-name=eth0<br>
> timestamp=1697699281<br>
><br>
> [ethernet]<br>
><br>
> [ipv4]<br>
> dhcp-timeout=10<br>
> method=auto<br>
><br>
> [ipv6]<br>
> addr-gen-mode=stable-privacy<br>
> method=auto<br>
> ra-timeout=10<br>
><br>
> [proxy]<br>
> -------------------<br>
> Ethernet (eth0) method based on link-local:<br>
> root@FXR90D5FB72:/etc/NetworkManager/system-connections# cat rfid-ll-eth0.nmconnection<br>
> [connection]<br>
> id=ll-eth0<br>
> uuid=f07f43e6-59c8-428f-bc04-55a0e581e621<br>
> type=ethernet<br>
> interface-name=eth0<br>
><br>
> [ethernet]<br>
><br>
> [ipv4]<br>
> method=link-local<br>
><br>
> [ipv6]<br>
> addr-gen-mode=stable-privacy<br>
> method=auto<br>
><br>
> [proxy]<br>
> ------<br>
><br>
> When DHCP request fails, the IPv4 address fallback to<br>
><br>
><br>
><br>
> Thanks & Regards<br>
> Manjunatha Srinivasan N<br>
</blockquote></div>