Fragile netplan file





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I have a kvm server that has several vlans on it, and I want to create a bridge for each vlan. Putting together docs from several sites, I've come up with something that sometimes works, and sometimes doesn't. The other thing I need is for br212 (see below) to come up with an IP address. Sometimes it works, sometimes is does not. This is a shortened version, as the actual version has over 30 bridges and vlans.



# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: no

bridges:
# 10.66.12.0/22 - dev
br212:
interfaces: [vlan212]
macaddress: "11:22:33:44:55:66"
dhcp4: true

# 10.5.0.0/16 - cert
br105:
interfaces: [vlan105]
dhcp4: no

# 172.16.0.0/16 - sandbox
br16:
interfaces: [vlan16]
dhcp4: no

# 10.66.6.0/24 - logging
br206:
interfaces: [vlan206]
dhcp4: no

vlans:
vlan105:
accept-ra: no
id: 105
link: eno2

vlan16:
accept-ra: no
id: 16
link: eno2

vlan206:
accept-ra: no
id: 206
link: eno2

vlan212:
accept-ra: no
id: 212
link: eno2









share|improve this question





























    0















    I have a kvm server that has several vlans on it, and I want to create a bridge for each vlan. Putting together docs from several sites, I've come up with something that sometimes works, and sometimes doesn't. The other thing I need is for br212 (see below) to come up with an IP address. Sometimes it works, sometimes is does not. This is a shortened version, as the actual version has over 30 bridges and vlans.



    # This file describes the network interfaces available on your system
    # For more information, see netplan(5).
    network:
    version: 2
    renderer: networkd
    ethernets:
    eno1:
    dhcp4: no

    bridges:
    # 10.66.12.0/22 - dev
    br212:
    interfaces: [vlan212]
    macaddress: "11:22:33:44:55:66"
    dhcp4: true

    # 10.5.0.0/16 - cert
    br105:
    interfaces: [vlan105]
    dhcp4: no

    # 172.16.0.0/16 - sandbox
    br16:
    interfaces: [vlan16]
    dhcp4: no

    # 10.66.6.0/24 - logging
    br206:
    interfaces: [vlan206]
    dhcp4: no

    vlans:
    vlan105:
    accept-ra: no
    id: 105
    link: eno2

    vlan16:
    accept-ra: no
    id: 16
    link: eno2

    vlan206:
    accept-ra: no
    id: 206
    link: eno2

    vlan212:
    accept-ra: no
    id: 212
    link: eno2









    share|improve this question

























      0












      0








      0








      I have a kvm server that has several vlans on it, and I want to create a bridge for each vlan. Putting together docs from several sites, I've come up with something that sometimes works, and sometimes doesn't. The other thing I need is for br212 (see below) to come up with an IP address. Sometimes it works, sometimes is does not. This is a shortened version, as the actual version has over 30 bridges and vlans.



      # This file describes the network interfaces available on your system
      # For more information, see netplan(5).
      network:
      version: 2
      renderer: networkd
      ethernets:
      eno1:
      dhcp4: no

      bridges:
      # 10.66.12.0/22 - dev
      br212:
      interfaces: [vlan212]
      macaddress: "11:22:33:44:55:66"
      dhcp4: true

      # 10.5.0.0/16 - cert
      br105:
      interfaces: [vlan105]
      dhcp4: no

      # 172.16.0.0/16 - sandbox
      br16:
      interfaces: [vlan16]
      dhcp4: no

      # 10.66.6.0/24 - logging
      br206:
      interfaces: [vlan206]
      dhcp4: no

      vlans:
      vlan105:
      accept-ra: no
      id: 105
      link: eno2

      vlan16:
      accept-ra: no
      id: 16
      link: eno2

      vlan206:
      accept-ra: no
      id: 206
      link: eno2

      vlan212:
      accept-ra: no
      id: 212
      link: eno2









      share|improve this question














      I have a kvm server that has several vlans on it, and I want to create a bridge for each vlan. Putting together docs from several sites, I've come up with something that sometimes works, and sometimes doesn't. The other thing I need is for br212 (see below) to come up with an IP address. Sometimes it works, sometimes is does not. This is a shortened version, as the actual version has over 30 bridges and vlans.



      # This file describes the network interfaces available on your system
      # For more information, see netplan(5).
      network:
      version: 2
      renderer: networkd
      ethernets:
      eno1:
      dhcp4: no

      bridges:
      # 10.66.12.0/22 - dev
      br212:
      interfaces: [vlan212]
      macaddress: "11:22:33:44:55:66"
      dhcp4: true

      # 10.5.0.0/16 - cert
      br105:
      interfaces: [vlan105]
      dhcp4: no

      # 172.16.0.0/16 - sandbox
      br16:
      interfaces: [vlan16]
      dhcp4: no

      # 10.66.6.0/24 - logging
      br206:
      interfaces: [vlan206]
      dhcp4: no

      vlans:
      vlan105:
      accept-ra: no
      id: 105
      link: eno2

      vlan16:
      accept-ra: no
      id: 16
      link: eno2

      vlan206:
      accept-ra: no
      id: 206
      link: eno2

      vlan212:
      accept-ra: no
      id: 212
      link: eno2






      netplan






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 30 at 0:30









      rory tomarory toma

      262




      262






















          2 Answers
          2






          active

          oldest

          votes


















          0














          Your .yaml file has extra space characters in it. .yaml files are very fussy about indents, spacing, and no tabs. You also didn't include your en02: code. Try this skeleton, and see if it works for you.



          network: 
          version: 2
          renderer: networkd
          ethernets:
          eno1:
          optional: true
          en02:
          match:
          macaddress: "11:22:33:44:55:66"
          optional: true
          bridges:
          br212:
          interfaces: [vlan212]
          dhcp4: true
          vlans:
          vlan212:
          accept-ra: no
          id: 212
          link: eno2





          share|improve this answer
























          • So I actually want to specify the mac address for the 212 bridge, otherwise, I can't get a predictable dhcp address. As for spaces, that's probably a cut and paste victim.

            – rory toma
            Apr 1 at 21:40











          • @rorytoma As far as I can make out... the macaddress "selects a subset of available physical devices by various hardware properties". That's why I placed it, with associated "match" into the en02 definition. Why don't you set the proper MAC address, and try my skeleton script the way it is, and see what happens.

            – heynnema
            Apr 1 at 22:24













          • @rorytoma status please...

            – heynnema
            Apr 3 at 2:53



















          0














          OK, I have solved this. Step 1 - make sure your network gear is properly set for trunking and has a natively tagged vlan...



          Step 2 - the file:



          # This file describes the network interfaces available on your system
          # For more information, see netplan(5).
          network:
          version: 2
          renderer: networkd
          ethernets:
          eno2:
          optional: true

          bridges:
          # 10.66.12.0/22 - dev
          br212:
          interfaces: [vlan212]
          macaddress: "00:20:3e:42:0e:64"
          dhcp4: true

          # 10.5.0.0/16 - cert
          br105:
          interfaces: [vlan105]
          dhcp4: no

          # 172.16.0.0/16 - sandbox
          br16:
          interfaces: [vlan16]
          dhcp4: no

          # 10.66.6.0/24 - logging
          br206:
          interfaces: [vlan206]
          dhcp4: no

          # 10.66.8.0/22 - dev
          br208:
          interfaces: [vlan208]
          dhcp4: no

          vlans:
          vlan105:
          accept-ra: no
          id: 105
          link: eno2

          vlan16:
          accept-ra: no
          id: 16
          link: eno2

          vlan206:
          accept-ra: no
          id: 206
          link: eno2

          vlan208:
          accept-ra: no
          id: 208
          link: eno2

          vlan212:
          accept-ra: no
          id: 212
          link: eno2





          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',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            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%2f1129810%2ffragile-netplan-file%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Your .yaml file has extra space characters in it. .yaml files are very fussy about indents, spacing, and no tabs. You also didn't include your en02: code. Try this skeleton, and see if it works for you.



            network: 
            version: 2
            renderer: networkd
            ethernets:
            eno1:
            optional: true
            en02:
            match:
            macaddress: "11:22:33:44:55:66"
            optional: true
            bridges:
            br212:
            interfaces: [vlan212]
            dhcp4: true
            vlans:
            vlan212:
            accept-ra: no
            id: 212
            link: eno2





            share|improve this answer
























            • So I actually want to specify the mac address for the 212 bridge, otherwise, I can't get a predictable dhcp address. As for spaces, that's probably a cut and paste victim.

              – rory toma
              Apr 1 at 21:40











            • @rorytoma As far as I can make out... the macaddress "selects a subset of available physical devices by various hardware properties". That's why I placed it, with associated "match" into the en02 definition. Why don't you set the proper MAC address, and try my skeleton script the way it is, and see what happens.

              – heynnema
              Apr 1 at 22:24













            • @rorytoma status please...

              – heynnema
              Apr 3 at 2:53
















            0














            Your .yaml file has extra space characters in it. .yaml files are very fussy about indents, spacing, and no tabs. You also didn't include your en02: code. Try this skeleton, and see if it works for you.



            network: 
            version: 2
            renderer: networkd
            ethernets:
            eno1:
            optional: true
            en02:
            match:
            macaddress: "11:22:33:44:55:66"
            optional: true
            bridges:
            br212:
            interfaces: [vlan212]
            dhcp4: true
            vlans:
            vlan212:
            accept-ra: no
            id: 212
            link: eno2





            share|improve this answer
























            • So I actually want to specify the mac address for the 212 bridge, otherwise, I can't get a predictable dhcp address. As for spaces, that's probably a cut and paste victim.

              – rory toma
              Apr 1 at 21:40











            • @rorytoma As far as I can make out... the macaddress "selects a subset of available physical devices by various hardware properties". That's why I placed it, with associated "match" into the en02 definition. Why don't you set the proper MAC address, and try my skeleton script the way it is, and see what happens.

              – heynnema
              Apr 1 at 22:24













            • @rorytoma status please...

              – heynnema
              Apr 3 at 2:53














            0












            0








            0







            Your .yaml file has extra space characters in it. .yaml files are very fussy about indents, spacing, and no tabs. You also didn't include your en02: code. Try this skeleton, and see if it works for you.



            network: 
            version: 2
            renderer: networkd
            ethernets:
            eno1:
            optional: true
            en02:
            match:
            macaddress: "11:22:33:44:55:66"
            optional: true
            bridges:
            br212:
            interfaces: [vlan212]
            dhcp4: true
            vlans:
            vlan212:
            accept-ra: no
            id: 212
            link: eno2





            share|improve this answer













            Your .yaml file has extra space characters in it. .yaml files are very fussy about indents, spacing, and no tabs. You also didn't include your en02: code. Try this skeleton, and see if it works for you.



            network: 
            version: 2
            renderer: networkd
            ethernets:
            eno1:
            optional: true
            en02:
            match:
            macaddress: "11:22:33:44:55:66"
            optional: true
            bridges:
            br212:
            interfaces: [vlan212]
            dhcp4: true
            vlans:
            vlan212:
            accept-ra: no
            id: 212
            link: eno2






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 30 at 14:31









            heynnemaheynnema

            21.6k32361




            21.6k32361













            • So I actually want to specify the mac address for the 212 bridge, otherwise, I can't get a predictable dhcp address. As for spaces, that's probably a cut and paste victim.

              – rory toma
              Apr 1 at 21:40











            • @rorytoma As far as I can make out... the macaddress "selects a subset of available physical devices by various hardware properties". That's why I placed it, with associated "match" into the en02 definition. Why don't you set the proper MAC address, and try my skeleton script the way it is, and see what happens.

              – heynnema
              Apr 1 at 22:24













            • @rorytoma status please...

              – heynnema
              Apr 3 at 2:53



















            • So I actually want to specify the mac address for the 212 bridge, otherwise, I can't get a predictable dhcp address. As for spaces, that's probably a cut and paste victim.

              – rory toma
              Apr 1 at 21:40











            • @rorytoma As far as I can make out... the macaddress "selects a subset of available physical devices by various hardware properties". That's why I placed it, with associated "match" into the en02 definition. Why don't you set the proper MAC address, and try my skeleton script the way it is, and see what happens.

              – heynnema
              Apr 1 at 22:24













            • @rorytoma status please...

              – heynnema
              Apr 3 at 2:53

















            So I actually want to specify the mac address for the 212 bridge, otherwise, I can't get a predictable dhcp address. As for spaces, that's probably a cut and paste victim.

            – rory toma
            Apr 1 at 21:40





            So I actually want to specify the mac address for the 212 bridge, otherwise, I can't get a predictable dhcp address. As for spaces, that's probably a cut and paste victim.

            – rory toma
            Apr 1 at 21:40













            @rorytoma As far as I can make out... the macaddress "selects a subset of available physical devices by various hardware properties". That's why I placed it, with associated "match" into the en02 definition. Why don't you set the proper MAC address, and try my skeleton script the way it is, and see what happens.

            – heynnema
            Apr 1 at 22:24







            @rorytoma As far as I can make out... the macaddress "selects a subset of available physical devices by various hardware properties". That's why I placed it, with associated "match" into the en02 definition. Why don't you set the proper MAC address, and try my skeleton script the way it is, and see what happens.

            – heynnema
            Apr 1 at 22:24















            @rorytoma status please...

            – heynnema
            Apr 3 at 2:53





            @rorytoma status please...

            – heynnema
            Apr 3 at 2:53













            0














            OK, I have solved this. Step 1 - make sure your network gear is properly set for trunking and has a natively tagged vlan...



            Step 2 - the file:



            # This file describes the network interfaces available on your system
            # For more information, see netplan(5).
            network:
            version: 2
            renderer: networkd
            ethernets:
            eno2:
            optional: true

            bridges:
            # 10.66.12.0/22 - dev
            br212:
            interfaces: [vlan212]
            macaddress: "00:20:3e:42:0e:64"
            dhcp4: true

            # 10.5.0.0/16 - cert
            br105:
            interfaces: [vlan105]
            dhcp4: no

            # 172.16.0.0/16 - sandbox
            br16:
            interfaces: [vlan16]
            dhcp4: no

            # 10.66.6.0/24 - logging
            br206:
            interfaces: [vlan206]
            dhcp4: no

            # 10.66.8.0/22 - dev
            br208:
            interfaces: [vlan208]
            dhcp4: no

            vlans:
            vlan105:
            accept-ra: no
            id: 105
            link: eno2

            vlan16:
            accept-ra: no
            id: 16
            link: eno2

            vlan206:
            accept-ra: no
            id: 206
            link: eno2

            vlan208:
            accept-ra: no
            id: 208
            link: eno2

            vlan212:
            accept-ra: no
            id: 212
            link: eno2





            share|improve this answer




























              0














              OK, I have solved this. Step 1 - make sure your network gear is properly set for trunking and has a natively tagged vlan...



              Step 2 - the file:



              # This file describes the network interfaces available on your system
              # For more information, see netplan(5).
              network:
              version: 2
              renderer: networkd
              ethernets:
              eno2:
              optional: true

              bridges:
              # 10.66.12.0/22 - dev
              br212:
              interfaces: [vlan212]
              macaddress: "00:20:3e:42:0e:64"
              dhcp4: true

              # 10.5.0.0/16 - cert
              br105:
              interfaces: [vlan105]
              dhcp4: no

              # 172.16.0.0/16 - sandbox
              br16:
              interfaces: [vlan16]
              dhcp4: no

              # 10.66.6.0/24 - logging
              br206:
              interfaces: [vlan206]
              dhcp4: no

              # 10.66.8.0/22 - dev
              br208:
              interfaces: [vlan208]
              dhcp4: no

              vlans:
              vlan105:
              accept-ra: no
              id: 105
              link: eno2

              vlan16:
              accept-ra: no
              id: 16
              link: eno2

              vlan206:
              accept-ra: no
              id: 206
              link: eno2

              vlan208:
              accept-ra: no
              id: 208
              link: eno2

              vlan212:
              accept-ra: no
              id: 212
              link: eno2





              share|improve this answer


























                0












                0








                0







                OK, I have solved this. Step 1 - make sure your network gear is properly set for trunking and has a natively tagged vlan...



                Step 2 - the file:



                # This file describes the network interfaces available on your system
                # For more information, see netplan(5).
                network:
                version: 2
                renderer: networkd
                ethernets:
                eno2:
                optional: true

                bridges:
                # 10.66.12.0/22 - dev
                br212:
                interfaces: [vlan212]
                macaddress: "00:20:3e:42:0e:64"
                dhcp4: true

                # 10.5.0.0/16 - cert
                br105:
                interfaces: [vlan105]
                dhcp4: no

                # 172.16.0.0/16 - sandbox
                br16:
                interfaces: [vlan16]
                dhcp4: no

                # 10.66.6.0/24 - logging
                br206:
                interfaces: [vlan206]
                dhcp4: no

                # 10.66.8.0/22 - dev
                br208:
                interfaces: [vlan208]
                dhcp4: no

                vlans:
                vlan105:
                accept-ra: no
                id: 105
                link: eno2

                vlan16:
                accept-ra: no
                id: 16
                link: eno2

                vlan206:
                accept-ra: no
                id: 206
                link: eno2

                vlan208:
                accept-ra: no
                id: 208
                link: eno2

                vlan212:
                accept-ra: no
                id: 212
                link: eno2





                share|improve this answer













                OK, I have solved this. Step 1 - make sure your network gear is properly set for trunking and has a natively tagged vlan...



                Step 2 - the file:



                # This file describes the network interfaces available on your system
                # For more information, see netplan(5).
                network:
                version: 2
                renderer: networkd
                ethernets:
                eno2:
                optional: true

                bridges:
                # 10.66.12.0/22 - dev
                br212:
                interfaces: [vlan212]
                macaddress: "00:20:3e:42:0e:64"
                dhcp4: true

                # 10.5.0.0/16 - cert
                br105:
                interfaces: [vlan105]
                dhcp4: no

                # 172.16.0.0/16 - sandbox
                br16:
                interfaces: [vlan16]
                dhcp4: no

                # 10.66.6.0/24 - logging
                br206:
                interfaces: [vlan206]
                dhcp4: no

                # 10.66.8.0/22 - dev
                br208:
                interfaces: [vlan208]
                dhcp4: no

                vlans:
                vlan105:
                accept-ra: no
                id: 105
                link: eno2

                vlan16:
                accept-ra: no
                id: 16
                link: eno2

                vlan206:
                accept-ra: no
                id: 206
                link: eno2

                vlan208:
                accept-ra: no
                id: 208
                link: eno2

                vlan212:
                accept-ra: no
                id: 212
                link: eno2






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 6 at 0:09









                rory tomarory toma

                262




                262






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1129810%2ffragile-netplan-file%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Category:香港粉麵

                    List *all* the tuples!

                    Channel [V]