With the current implementation renaming an interface comes in two steps:
Renaming an interface means changing both the configuration and the mapping file. Changing only one of them leaves the old name’s settings orphaned and the new name unconfigured.
To rename eth1 to eth23:
vyos@vyos:~$ configure vyos@vyos# rename interfaces ethernet eth1 to interfaces ethernet eth23 vyos@vyos# commit vyos@vyos# save vyos@vyos# exit
Then change the key in the mapping file, leaving its value untouched:
vyos@vyos:~$ sudo vi /config/interface-mapping.json
{
"version": 1,
"interfaces": {
"eth0": "ID_NET_NAME_SLOT=ens18",
"eth23": "ID_PATH=pci-0000:00:13.0"
}
}The new name is applied on the next boot:
vyos@vyos:~$ reboot
This is error prone and should be improved with a nice single CLI command.