I'm trying to set the static IP of a network interface on a server that has just upgraded its distro from 20.04 to 22.04. Here is the netplan /etc/netplan/80_netplan_netcfg.yaml.
network:
version: 2
renderer: networkd
ethernets:
eno3:
dhcp4: no
addresses: [ 169.254.20.1/16 ]
The command sudo netplan apply doesn't seem to be able to assign the static IP to eno3 anymore. Here's the output of ip a:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether a8:a1:59:f2:c4:5d brd ff:ff:ff:ff:ff:ff
altname enp4s0f0
inet6 2401:fa00:480:4029:aaa1:59ff:fef2:c45d/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 2591429sec preferred_lft 604229sec
inet6 fe80::aaa1:59ff:fef2:c45d/64 scope link
valid_lft forever preferred_lft forever
I've tried manually setting the static ip using ip a add 169.254.20.1/16 dev eno3 which initially succeeds in assigning the ip address, but somehow gets unassigned after a period of time. I'm not sure if some background process would be responsible for this, but ideally I would be able to do this with netplan.
I've been scratching my head all day about this, so any help would be appreciated!