/srv/irclogs.ubuntu.com/2024/05/22/#netplan.txt

=== Son_Goku_ is now known as Son_Goku
CsokiCraftHi! I have an /e/n/i file which has IP aliases defined in it (interfaces in the form of `eth0:1`, for instance). `netplan migrate` seems to generate separate `ethernets` from it with colons in the name, which makes NM throw up... Is there any way to make `netplan migrate` handle these (add separate `addresses` instead), or is it not supported? Or10:02
CsokiCraftmaybe it is, and we just have a too old netplan version?10:02
danilogondolfoHi, yeah netplan doesn't support interface aliases. You need to add multiple IPs to the same interface. And I'm afraid "netplan migrate" is kinda experimental...10:09
CsokiCraftIs it possible to add multiple IPs to one interface in /e/n/i?10:26
CsokiCraftThe problem is we have to incrementally update our fleet from ifupdown2 to netplan/NM...10:28
danilogondolfoI think you can defined the "address" setting multiple times in ifupdown10:31
CsokiCraftOkay, so you can't have multiple `address`es, but you can have multiple `iface eth0` definitions, with different addresses, netmasks etc. However, `netplan migrate` still doesn't convert that to multiple `address`es on one interface, it just keeps the last one defined12:38
danilogondolfothere is one example with 2 addresses in the man page https://manpages.debian.org/unstable/ifupdown2/interfaces.5.en.html12:40
danilogondolfoI know it's for 1 ipv4 and 1 ipv6 but I'd expect it to work with multiple addresses from the same family...12:41
danilogondolfoSee this example https://git.launchpad.net/ubuntu/+source/ifupdown2/tree/docs/examples/interfaces12:43
danilogondolfoBut still, I don't know if "netplan migrate" understands it...12:43
CsokiCraftWell, it doesn't: `ifup: duplicate option "address"`12:51
CsokiCraftAt least not with BusyBox v1.35.0, which is what the old firmware uses...12:51
CsokiCraftFull log:12:52
CsokiCraftroot@mymachine:~# cat /etc/network/interfaces12:52
CsokiCraft# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)12:52
CsokiCraft# The loopback interface12:52
CsokiCraftauto lo12:52
CsokiCraftiface lo inet loopback12:52
CsokiCraftauto eth012:52
CsokiCraftiface eth0 inet static12:52
CsokiCraftaddress 192.168.144.11912:52
CsokiCraftnetmask 255.255.255.012:52
CsokiCraftaddress 192.168.188.112:52
CsokiCraftnetmask 255.255.255.012:52
CsokiCraftroot@mymachine:~# ifup eth012:52
CsokiCraftifup: duplicate option "address"12:52
CsokiCraftroot@mymachine:~# vi /etc/network/interfaces12:52
CsokiCraftroot@mymachine:~# cat /etc/network/interfaces12:52
CsokiCraft# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)12:52
CsokiCraft# The loopback interface12:52
CsokiCraftauto lo12:52
CsokiCraftAnd FYI even `netplan migrate` doesn't seem to handle multiple addresses in one `iface` stanza...13:06

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!