How to configure IPVS loopback address with netplan in Ubuntu 18.04?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












Previously, I configured IPVS loopback addresses in /etc/network/interfaceslike this:



auto lo:0
iface lo:0 inet static
address 12.34.56.78
netmask 255.255.255.255
pre-up sysctl -q -p


On 18.04, I tried adding this section to the netplan config:



network:
ethernets:
lo:
addresses:
- 12.34.56.78/32


And then ran netplan apply. systemd-networkd logs the following:



May 18 10:01:55 [...] systemd-networkd[3820]: lo: Adding address: 12.34.56.78/32 (valid forever)
May 18 10:01:55 [...] systemd-networkd[3820]: lo: Adding address: 127.0.0.1/8 (valid forever)
May 18 10:01:55 [...] systemd-networkd[3820]: rtnl: received address with invalid family 129, ignoring


But it doesn't seem to have any effect (ifconfig doesn't list lo:0). Not sure what the invalid family 129 refers to. The actual address (it's not 12.34.56.78 :-) ) works fine when I manually use ifconfig to set it up.



I also tried using lo:0 as the YAML key name, but then I get this error:



May 18 10:00:06 [...] systemd-networkd[3736]: /run/systemd/network/10-netplan-lo:0.network:2: Interface name is not valid or too long, ignoring assignment: (null)


Looks like systemd-networkd doesn't like lo:0 as an interface name. Any suggestions?







share|improve this question






















  • See my answer in this post, I think that is what you are looking for: askubuntu.com/questions/1033403/…
    – user822833
    May 18 at 17:02











  • @MikaelSchultz This seems very close to I want to do (lo:0 instead of lo:1). I tried explicitly specifying renderer and match, but that didn't seem to have any effect. Also FYI -- I updated the question with some more info from the logs. I wonder what I'm missing.
    – kartik_subbarao
    May 18 at 17:14











  • Turns out that my netplan config was actually working, but ifconfig could not display the additional loopback address assigned to lo. Problem solved :-)
    – kartik_subbarao
    May 18 at 19:42














up vote
0
down vote

favorite












Previously, I configured IPVS loopback addresses in /etc/network/interfaceslike this:



auto lo:0
iface lo:0 inet static
address 12.34.56.78
netmask 255.255.255.255
pre-up sysctl -q -p


On 18.04, I tried adding this section to the netplan config:



network:
ethernets:
lo:
addresses:
- 12.34.56.78/32


And then ran netplan apply. systemd-networkd logs the following:



May 18 10:01:55 [...] systemd-networkd[3820]: lo: Adding address: 12.34.56.78/32 (valid forever)
May 18 10:01:55 [...] systemd-networkd[3820]: lo: Adding address: 127.0.0.1/8 (valid forever)
May 18 10:01:55 [...] systemd-networkd[3820]: rtnl: received address with invalid family 129, ignoring


But it doesn't seem to have any effect (ifconfig doesn't list lo:0). Not sure what the invalid family 129 refers to. The actual address (it's not 12.34.56.78 :-) ) works fine when I manually use ifconfig to set it up.



I also tried using lo:0 as the YAML key name, but then I get this error:



May 18 10:00:06 [...] systemd-networkd[3736]: /run/systemd/network/10-netplan-lo:0.network:2: Interface name is not valid or too long, ignoring assignment: (null)


Looks like systemd-networkd doesn't like lo:0 as an interface name. Any suggestions?







share|improve this question






















  • See my answer in this post, I think that is what you are looking for: askubuntu.com/questions/1033403/…
    – user822833
    May 18 at 17:02











  • @MikaelSchultz This seems very close to I want to do (lo:0 instead of lo:1). I tried explicitly specifying renderer and match, but that didn't seem to have any effect. Also FYI -- I updated the question with some more info from the logs. I wonder what I'm missing.
    – kartik_subbarao
    May 18 at 17:14











  • Turns out that my netplan config was actually working, but ifconfig could not display the additional loopback address assigned to lo. Problem solved :-)
    – kartik_subbarao
    May 18 at 19:42












up vote
0
down vote

favorite









up vote
0
down vote

favorite











Previously, I configured IPVS loopback addresses in /etc/network/interfaceslike this:



auto lo:0
iface lo:0 inet static
address 12.34.56.78
netmask 255.255.255.255
pre-up sysctl -q -p


On 18.04, I tried adding this section to the netplan config:



network:
ethernets:
lo:
addresses:
- 12.34.56.78/32


And then ran netplan apply. systemd-networkd logs the following:



May 18 10:01:55 [...] systemd-networkd[3820]: lo: Adding address: 12.34.56.78/32 (valid forever)
May 18 10:01:55 [...] systemd-networkd[3820]: lo: Adding address: 127.0.0.1/8 (valid forever)
May 18 10:01:55 [...] systemd-networkd[3820]: rtnl: received address with invalid family 129, ignoring


But it doesn't seem to have any effect (ifconfig doesn't list lo:0). Not sure what the invalid family 129 refers to. The actual address (it's not 12.34.56.78 :-) ) works fine when I manually use ifconfig to set it up.



I also tried using lo:0 as the YAML key name, but then I get this error:



May 18 10:00:06 [...] systemd-networkd[3736]: /run/systemd/network/10-netplan-lo:0.network:2: Interface name is not valid or too long, ignoring assignment: (null)


Looks like systemd-networkd doesn't like lo:0 as an interface name. Any suggestions?







share|improve this question














Previously, I configured IPVS loopback addresses in /etc/network/interfaceslike this:



auto lo:0
iface lo:0 inet static
address 12.34.56.78
netmask 255.255.255.255
pre-up sysctl -q -p


On 18.04, I tried adding this section to the netplan config:



network:
ethernets:
lo:
addresses:
- 12.34.56.78/32


And then ran netplan apply. systemd-networkd logs the following:



May 18 10:01:55 [...] systemd-networkd[3820]: lo: Adding address: 12.34.56.78/32 (valid forever)
May 18 10:01:55 [...] systemd-networkd[3820]: lo: Adding address: 127.0.0.1/8 (valid forever)
May 18 10:01:55 [...] systemd-networkd[3820]: rtnl: received address with invalid family 129, ignoring


But it doesn't seem to have any effect (ifconfig doesn't list lo:0). Not sure what the invalid family 129 refers to. The actual address (it's not 12.34.56.78 :-) ) works fine when I manually use ifconfig to set it up.



I also tried using lo:0 as the YAML key name, but then I get this error:



May 18 10:00:06 [...] systemd-networkd[3736]: /run/systemd/network/10-netplan-lo:0.network:2: Interface name is not valid or too long, ignoring assignment: (null)


Looks like systemd-networkd doesn't like lo:0 as an interface name. Any suggestions?









share|improve this question













share|improve this question




share|improve this question








edited May 18 at 18:12

























asked May 18 at 16:54









kartik_subbarao

1267




1267











  • See my answer in this post, I think that is what you are looking for: askubuntu.com/questions/1033403/…
    – user822833
    May 18 at 17:02











  • @MikaelSchultz This seems very close to I want to do (lo:0 instead of lo:1). I tried explicitly specifying renderer and match, but that didn't seem to have any effect. Also FYI -- I updated the question with some more info from the logs. I wonder what I'm missing.
    – kartik_subbarao
    May 18 at 17:14











  • Turns out that my netplan config was actually working, but ifconfig could not display the additional loopback address assigned to lo. Problem solved :-)
    – kartik_subbarao
    May 18 at 19:42
















  • See my answer in this post, I think that is what you are looking for: askubuntu.com/questions/1033403/…
    – user822833
    May 18 at 17:02











  • @MikaelSchultz This seems very close to I want to do (lo:0 instead of lo:1). I tried explicitly specifying renderer and match, but that didn't seem to have any effect. Also FYI -- I updated the question with some more info from the logs. I wonder what I'm missing.
    – kartik_subbarao
    May 18 at 17:14











  • Turns out that my netplan config was actually working, but ifconfig could not display the additional loopback address assigned to lo. Problem solved :-)
    – kartik_subbarao
    May 18 at 19:42















See my answer in this post, I think that is what you are looking for: askubuntu.com/questions/1033403/…
– user822833
May 18 at 17:02





See my answer in this post, I think that is what you are looking for: askubuntu.com/questions/1033403/…
– user822833
May 18 at 17:02













@MikaelSchultz This seems very close to I want to do (lo:0 instead of lo:1). I tried explicitly specifying renderer and match, but that didn't seem to have any effect. Also FYI -- I updated the question with some more info from the logs. I wonder what I'm missing.
– kartik_subbarao
May 18 at 17:14





@MikaelSchultz This seems very close to I want to do (lo:0 instead of lo:1). I tried explicitly specifying renderer and match, but that didn't seem to have any effect. Also FYI -- I updated the question with some more info from the logs. I wonder what I'm missing.
– kartik_subbarao
May 18 at 17:14













Turns out that my netplan config was actually working, but ifconfig could not display the additional loopback address assigned to lo. Problem solved :-)
– kartik_subbarao
May 18 at 19:42




Turns out that my netplan config was actually working, but ifconfig could not display the additional loopback address assigned to lo. Problem solved :-)
– kartik_subbarao
May 18 at 19:42










1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










It turns out that the netplan configuration did assign the additional loopback address to lo, but ifconfig couldn't display it, which was misleading me. When I manually ran ifconfig lo:0 12.34.56.78 netmask 255.255.255.255 it displayed lo:0 just fine. But netplan assigned the address to lo, not lo:0. Running ip addr revealed the additional IP address on lo.



Upon further reading, I found that ifconfig (net-tools) has long been deprecated in favor of ip (iproute): https://serverfault.com/questions/633087/where-is-the-statement-of-deprecation-of-ifconfig-on-linux






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1037834%2fhow-to-configure-ipvs-loopback-address-with-netplan-in-ubuntu-18-04%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote



    accepted










    It turns out that the netplan configuration did assign the additional loopback address to lo, but ifconfig couldn't display it, which was misleading me. When I manually ran ifconfig lo:0 12.34.56.78 netmask 255.255.255.255 it displayed lo:0 just fine. But netplan assigned the address to lo, not lo:0. Running ip addr revealed the additional IP address on lo.



    Upon further reading, I found that ifconfig (net-tools) has long been deprecated in favor of ip (iproute): https://serverfault.com/questions/633087/where-is-the-statement-of-deprecation-of-ifconfig-on-linux






    share|improve this answer
























      up vote
      1
      down vote



      accepted










      It turns out that the netplan configuration did assign the additional loopback address to lo, but ifconfig couldn't display it, which was misleading me. When I manually ran ifconfig lo:0 12.34.56.78 netmask 255.255.255.255 it displayed lo:0 just fine. But netplan assigned the address to lo, not lo:0. Running ip addr revealed the additional IP address on lo.



      Upon further reading, I found that ifconfig (net-tools) has long been deprecated in favor of ip (iproute): https://serverfault.com/questions/633087/where-is-the-statement-of-deprecation-of-ifconfig-on-linux






      share|improve this answer






















        up vote
        1
        down vote



        accepted







        up vote
        1
        down vote



        accepted






        It turns out that the netplan configuration did assign the additional loopback address to lo, but ifconfig couldn't display it, which was misleading me. When I manually ran ifconfig lo:0 12.34.56.78 netmask 255.255.255.255 it displayed lo:0 just fine. But netplan assigned the address to lo, not lo:0. Running ip addr revealed the additional IP address on lo.



        Upon further reading, I found that ifconfig (net-tools) has long been deprecated in favor of ip (iproute): https://serverfault.com/questions/633087/where-is-the-statement-of-deprecation-of-ifconfig-on-linux






        share|improve this answer












        It turns out that the netplan configuration did assign the additional loopback address to lo, but ifconfig couldn't display it, which was misleading me. When I manually ran ifconfig lo:0 12.34.56.78 netmask 255.255.255.255 it displayed lo:0 just fine. But netplan assigned the address to lo, not lo:0. Running ip addr revealed the additional IP address on lo.



        Upon further reading, I found that ifconfig (net-tools) has long been deprecated in favor of ip (iproute): https://serverfault.com/questions/633087/where-is-the-statement-of-deprecation-of-ifconfig-on-linux







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered May 18 at 19:40









        kartik_subbarao

        1267




        1267






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1037834%2fhow-to-configure-ipvs-loopback-address-with-netplan-in-ubuntu-18-04%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            pylint3 and pip3 broken

            Missing snmpget and snmpwalk

            How to enroll fingerprints to Ubuntu 17.10 with VFS491