ubuntu@netplan2:~$ ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 52:54:00:d2:9b:b5 brd ff:ff:ff:ff:ff:ff
3: myif1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 52:54:00:b4:02:6e brd ff:ff:ff:ff:ff:ff
But if I now change set-name to myif0, I can't get it to change the name 'live'.
If I apply with the interface 'up', nothing happens, which is fine:
ubuntu@netplan2:~$ sudo netplan apply
ubuntu@netplan2:~$ ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 52:54:00:d2:9b:b5 brd ff:ff:ff:ff:ff:ff
3: myif1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 52:54:00:b4:02:6e brd ff:ff:ff:ff:ff:ff
But if I bring it down and run netplan apply, the interface is renamed to ens7, not myif0, and it stays down.
ubuntu@netplan2:~$ sudo ip l set dev myif1 down
ubuntu@netplan2:~$ sudo netplan apply
ubuntu@netplan2:~$ ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 52:54:00:d2:9b:b5 brd ff:ff:ff:ff:ff:ff
3: ens7: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
link/ether 52:54:00:b4:02:6e brd ff:ff:ff:ff:ff:ff
If I downgrade to 0.36.3, the interface is correctly renamed and brought up:
9: myif0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 52:54:00:b4:02:6e brd ff:ff:ff:ff:ff:ff
Hi,
This works on reboot but not so well after the system boots.
Say I have the following file:
network:
macaddress: 52:54:00:b4:02:6e
set- name: myif1
optional: true
version: 2
ethernets:
ens7:
dhcp4: true
match:
If I reboot, everything is fine:
ubuntu@netplan2:~$ ip l UP,LOWER_ UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 MULTICAST, UP,LOWER_ UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 MULTICAST, UP,LOWER_ UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
1: lo: <LOOPBACK,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens3: <BROADCAST,
link/ether 52:54:00:d2:9b:b5 brd ff:ff:ff:ff:ff:ff
3: myif1: <BROADCAST,
link/ether 52:54:00:b4:02:6e brd ff:ff:ff:ff:ff:ff
But if I now change set-name to myif0, I can't get it to change the name 'live'.
If I apply with the interface 'up', nothing happens, which is fine:
ubuntu@netplan2:~$ sudo netplan apply UP,LOWER_ UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 MULTICAST, UP,LOWER_ UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 MULTICAST, UP,LOWER_ UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
ubuntu@netplan2:~$ ip l
1: lo: <LOOPBACK,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens3: <BROADCAST,
link/ether 52:54:00:d2:9b:b5 brd ff:ff:ff:ff:ff:ff
3: myif1: <BROADCAST,
link/ether 52:54:00:b4:02:6e brd ff:ff:ff:ff:ff:ff
But if I bring it down and run netplan apply, the interface is renamed to ens7, not myif0, and it stays down.
ubuntu@netplan2:~$ sudo ip l set dev myif1 down UP,LOWER_ UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 MULTICAST, UP,LOWER_ UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 MULTICAST> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
ubuntu@netplan2:~$ sudo netplan apply
ubuntu@netplan2:~$ ip l
1: lo: <LOOPBACK,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens3: <BROADCAST,
link/ether 52:54:00:d2:9b:b5 brd ff:ff:ff:ff:ff:ff
3: ens7: <BROADCAST,
link/ether 52:54:00:b4:02:6e brd ff:ff:ff:ff:ff:ff
If I downgrade to 0.36.3, the interface is correctly renamed and brought up:
9: myif0: <BROADCAST, MULTICAST, UP,LOWER_ UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 52:54:00:b4:02:6e brd ff:ff:ff:ff:ff:ff
So not an unqualified success here.
Regards,
Daniel