That is a clever solution. To satisfy myself that link-local does work, I tried the following:The current behaviour of Network Manager (1.42.4) is contrary to how you might expect this to work.
Connections with DHCP (ipv4.method=auto) configured that fail to get a DHCP lease will disconnect and then reconnect to attempt again indefinitely. If you don't' have a DHCP server available, even if you have enabled Link-Local addressing, the connection will restart until it gets a DHCP lease.
There has been talk for at least the last two years to change this behaviour:
...
...
Code:
sudo nmcli con modify 'Wired connection 1' ipv4.method link-local ipv6.method disabledsudo nmcli con reloadsudo nmcli con down 'Wired connection 1'; sudo nmcli con up 'Wired connection 1'ping 169.254.191.194PING 169.254.191.194 (169.254.191.194) 56(84) bytes of data.64 bytes from 169.254.191.194: icmp_seq=1 ttl=64 time=0.729 ms .. ..64 bytes from 169.254.191.194: icmp_seq=902 ttl=64 time=0.155 ms64 bytes from 169.254.191.194: icmp_seq=903 ttl=64 time=0.152 ms^C--- 169.254.191.194 ping statistics ---903 packets transmitted, 903 received, 0% packet loss, time 922238msrtt min/avg/max/mdev = 0.110/0.226/1.019/0.154 ms
Code:
sudo nmcli con modify 'Wired connection 1' ipv4.method auto ipv6.method autosudo nmcli con reloadsudo nmcli con down 'Wired connection 1'; sudo nmcli con up 'Wired connection 1'
Statistics: Posted by kmacdchap — Sat Oct 12, 2024 5:25 am