Netplan bond/bridge MTU setting not being honored on Bionic system












1














I'm running Netplan on an 18.04 system. I've been able to workout and convert most of my network configuration from my 16.04 systems to Netplan for 18.04, however I've run into an issue now when trying to set the MTU to 9000 on a bridge that uses a bond that is part of a VLAN.



My configuration:



# Ceph network configuration
network:
version: 2
renderer: networkd
ethernets:
eth2:
dhcp4: no
dhcp6: no
optional: true
mtu: 9000
eth3:
dhcp4: no
dhcp6: no
optional: true
mtu: 9000
bonds:
bond1:
interfaces: [ eth2, eth3 ]
parameters:
mode: 802.3ad
mii-monitor-interval: 100
lacp-rate: fast
vlans:
bond1.220:
id: 220
link: bond1
mtu: 9000
bridges:
br-ceph-access:
addresses: [ x.x.x.x/24 ]
interfaces: [ bond1.220 ]
parameters:
forward-delay: 9
hello-time: 2
max-age: 12
stp: false


I've added 'mtu: 9000' to both NICs that are part of the bond, and to the VLAN as well. I've done this, because the adding 'mtu: 9000' to the bond interface or the bridge interface produces the error "unknown key mtu"



In any case, the mtu: 9000 setting is not honored, as you can see here in the relevant sections of ip a (notice mtu 15000):



4: eth2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond1 state UP group default qlen 1000
link/ether b2:07:76:18:10:5b brd ff:ff:ff:ff:ff:ff
5: eth3: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond1 state UP group default qlen 1000
link/ether b2:07:76:18:10:5b brd ff:ff:ff:ff:ff:ff
10: br-ceph-access: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 4e:b5:52:25:a4:c5 brd ff:ff:ff:ff:ff:ff
inet x.x.x.x/24 brd 172.16.238.255 scope global br-ceph-access
valid_lft forever preferred_lft forever
11: bond1: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether b2:07:76:18:10:5b brd ff:ff:ff:ff:ff:ff


So where am I going wrong here? What is the proper way to set mtu with Netplan? Have I discovered a bug that needs to be reported?










share|improve this question



























    1














    I'm running Netplan on an 18.04 system. I've been able to workout and convert most of my network configuration from my 16.04 systems to Netplan for 18.04, however I've run into an issue now when trying to set the MTU to 9000 on a bridge that uses a bond that is part of a VLAN.



    My configuration:



    # Ceph network configuration
    network:
    version: 2
    renderer: networkd
    ethernets:
    eth2:
    dhcp4: no
    dhcp6: no
    optional: true
    mtu: 9000
    eth3:
    dhcp4: no
    dhcp6: no
    optional: true
    mtu: 9000
    bonds:
    bond1:
    interfaces: [ eth2, eth3 ]
    parameters:
    mode: 802.3ad
    mii-monitor-interval: 100
    lacp-rate: fast
    vlans:
    bond1.220:
    id: 220
    link: bond1
    mtu: 9000
    bridges:
    br-ceph-access:
    addresses: [ x.x.x.x/24 ]
    interfaces: [ bond1.220 ]
    parameters:
    forward-delay: 9
    hello-time: 2
    max-age: 12
    stp: false


    I've added 'mtu: 9000' to both NICs that are part of the bond, and to the VLAN as well. I've done this, because the adding 'mtu: 9000' to the bond interface or the bridge interface produces the error "unknown key mtu"



    In any case, the mtu: 9000 setting is not honored, as you can see here in the relevant sections of ip a (notice mtu 15000):



    4: eth2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond1 state UP group default qlen 1000
    link/ether b2:07:76:18:10:5b brd ff:ff:ff:ff:ff:ff
    5: eth3: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond1 state UP group default qlen 1000
    link/ether b2:07:76:18:10:5b brd ff:ff:ff:ff:ff:ff
    10: br-ceph-access: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 4e:b5:52:25:a4:c5 brd ff:ff:ff:ff:ff:ff
    inet x.x.x.x/24 brd 172.16.238.255 scope global br-ceph-access
    valid_lft forever preferred_lft forever
    11: bond1: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b2:07:76:18:10:5b brd ff:ff:ff:ff:ff:ff


    So where am I going wrong here? What is the proper way to set mtu with Netplan? Have I discovered a bug that needs to be reported?










    share|improve this question

























      1












      1








      1


      1





      I'm running Netplan on an 18.04 system. I've been able to workout and convert most of my network configuration from my 16.04 systems to Netplan for 18.04, however I've run into an issue now when trying to set the MTU to 9000 on a bridge that uses a bond that is part of a VLAN.



      My configuration:



      # Ceph network configuration
      network:
      version: 2
      renderer: networkd
      ethernets:
      eth2:
      dhcp4: no
      dhcp6: no
      optional: true
      mtu: 9000
      eth3:
      dhcp4: no
      dhcp6: no
      optional: true
      mtu: 9000
      bonds:
      bond1:
      interfaces: [ eth2, eth3 ]
      parameters:
      mode: 802.3ad
      mii-monitor-interval: 100
      lacp-rate: fast
      vlans:
      bond1.220:
      id: 220
      link: bond1
      mtu: 9000
      bridges:
      br-ceph-access:
      addresses: [ x.x.x.x/24 ]
      interfaces: [ bond1.220 ]
      parameters:
      forward-delay: 9
      hello-time: 2
      max-age: 12
      stp: false


      I've added 'mtu: 9000' to both NICs that are part of the bond, and to the VLAN as well. I've done this, because the adding 'mtu: 9000' to the bond interface or the bridge interface produces the error "unknown key mtu"



      In any case, the mtu: 9000 setting is not honored, as you can see here in the relevant sections of ip a (notice mtu 15000):



      4: eth2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond1 state UP group default qlen 1000
      link/ether b2:07:76:18:10:5b brd ff:ff:ff:ff:ff:ff
      5: eth3: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond1 state UP group default qlen 1000
      link/ether b2:07:76:18:10:5b brd ff:ff:ff:ff:ff:ff
      10: br-ceph-access: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
      link/ether 4e:b5:52:25:a4:c5 brd ff:ff:ff:ff:ff:ff
      inet x.x.x.x/24 brd 172.16.238.255 scope global br-ceph-access
      valid_lft forever preferred_lft forever
      11: bond1: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
      link/ether b2:07:76:18:10:5b brd ff:ff:ff:ff:ff:ff


      So where am I going wrong here? What is the proper way to set mtu with Netplan? Have I discovered a bug that needs to be reported?










      share|improve this question













      I'm running Netplan on an 18.04 system. I've been able to workout and convert most of my network configuration from my 16.04 systems to Netplan for 18.04, however I've run into an issue now when trying to set the MTU to 9000 on a bridge that uses a bond that is part of a VLAN.



      My configuration:



      # Ceph network configuration
      network:
      version: 2
      renderer: networkd
      ethernets:
      eth2:
      dhcp4: no
      dhcp6: no
      optional: true
      mtu: 9000
      eth3:
      dhcp4: no
      dhcp6: no
      optional: true
      mtu: 9000
      bonds:
      bond1:
      interfaces: [ eth2, eth3 ]
      parameters:
      mode: 802.3ad
      mii-monitor-interval: 100
      lacp-rate: fast
      vlans:
      bond1.220:
      id: 220
      link: bond1
      mtu: 9000
      bridges:
      br-ceph-access:
      addresses: [ x.x.x.x/24 ]
      interfaces: [ bond1.220 ]
      parameters:
      forward-delay: 9
      hello-time: 2
      max-age: 12
      stp: false


      I've added 'mtu: 9000' to both NICs that are part of the bond, and to the VLAN as well. I've done this, because the adding 'mtu: 9000' to the bond interface or the bridge interface produces the error "unknown key mtu"



      In any case, the mtu: 9000 setting is not honored, as you can see here in the relevant sections of ip a (notice mtu 15000):



      4: eth2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond1 state UP group default qlen 1000
      link/ether b2:07:76:18:10:5b brd ff:ff:ff:ff:ff:ff
      5: eth3: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond1 state UP group default qlen 1000
      link/ether b2:07:76:18:10:5b brd ff:ff:ff:ff:ff:ff
      10: br-ceph-access: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
      link/ether 4e:b5:52:25:a4:c5 brd ff:ff:ff:ff:ff:ff
      inet x.x.x.x/24 brd 172.16.238.255 scope global br-ceph-access
      valid_lft forever preferred_lft forever
      11: bond1: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
      link/ether b2:07:76:18:10:5b brd ff:ff:ff:ff:ff:ff


      So where am I going wrong here? What is the proper way to set mtu with Netplan? Have I discovered a bug that needs to be reported?







      networking network-bridge netplan network-bonding






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 7 at 18:26









      Andre Goree

      113




      113






















          1 Answer
          1






          active

          oldest

          votes


















          0














          I think you want to match devices by MAC address, otherwise it's hard for systemd-networkd to know exactly which devices to apply the MTU to. You should also specify the MTU is 9000 for the bond itself, as its options will be applied to the underlying interfaces when they are added to the bond:



          network:
          version: 2
          renderer: networkd
          ethernets:
          eth2:
          match:
          macaddress: 00:00:aa:bb:cc:dd
          dhcp4: no
          dhcp6: no
          optional: true
          mtu: 9000
          eth3:
          match:
          macaddress: 01:01:aa:bb:cc:de
          dhcp4: no
          dhcp6: no
          optional: true
          mtu: 9000
          bonds:
          bond1:
          mtu: 9000
          interfaces: [ eth2, eth3 ]
          parameters:
          mode: 802.3ad
          mii-monitor-interval: 100
          lacp-rate: fast
          vlans:
          bond1.220:
          id: 220
          link: bond1
          mtu: 9000
          bridges:
          br-ceph-access:
          addresses: [ x.x.x.x/24 ]
          interfaces: [ bond1.220 ]
          parameters:
          forward-delay: 9
          hello-time: 2
          max-age: 12
          stp: false


          Watch out though, matching devices comes with its own set of issues; see https://github.com/CanonicalLtd/netplan/commit/a27122bc8d8e066b1a90a7fd8d65342e8b906a8e






          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%2f1099243%2fnetplan-bond-bridge-mtu-setting-not-being-honored-on-bionic-system%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            I think you want to match devices by MAC address, otherwise it's hard for systemd-networkd to know exactly which devices to apply the MTU to. You should also specify the MTU is 9000 for the bond itself, as its options will be applied to the underlying interfaces when they are added to the bond:



            network:
            version: 2
            renderer: networkd
            ethernets:
            eth2:
            match:
            macaddress: 00:00:aa:bb:cc:dd
            dhcp4: no
            dhcp6: no
            optional: true
            mtu: 9000
            eth3:
            match:
            macaddress: 01:01:aa:bb:cc:de
            dhcp4: no
            dhcp6: no
            optional: true
            mtu: 9000
            bonds:
            bond1:
            mtu: 9000
            interfaces: [ eth2, eth3 ]
            parameters:
            mode: 802.3ad
            mii-monitor-interval: 100
            lacp-rate: fast
            vlans:
            bond1.220:
            id: 220
            link: bond1
            mtu: 9000
            bridges:
            br-ceph-access:
            addresses: [ x.x.x.x/24 ]
            interfaces: [ bond1.220 ]
            parameters:
            forward-delay: 9
            hello-time: 2
            max-age: 12
            stp: false


            Watch out though, matching devices comes with its own set of issues; see https://github.com/CanonicalLtd/netplan/commit/a27122bc8d8e066b1a90a7fd8d65342e8b906a8e






            share|improve this answer




























              0














              I think you want to match devices by MAC address, otherwise it's hard for systemd-networkd to know exactly which devices to apply the MTU to. You should also specify the MTU is 9000 for the bond itself, as its options will be applied to the underlying interfaces when they are added to the bond:



              network:
              version: 2
              renderer: networkd
              ethernets:
              eth2:
              match:
              macaddress: 00:00:aa:bb:cc:dd
              dhcp4: no
              dhcp6: no
              optional: true
              mtu: 9000
              eth3:
              match:
              macaddress: 01:01:aa:bb:cc:de
              dhcp4: no
              dhcp6: no
              optional: true
              mtu: 9000
              bonds:
              bond1:
              mtu: 9000
              interfaces: [ eth2, eth3 ]
              parameters:
              mode: 802.3ad
              mii-monitor-interval: 100
              lacp-rate: fast
              vlans:
              bond1.220:
              id: 220
              link: bond1
              mtu: 9000
              bridges:
              br-ceph-access:
              addresses: [ x.x.x.x/24 ]
              interfaces: [ bond1.220 ]
              parameters:
              forward-delay: 9
              hello-time: 2
              max-age: 12
              stp: false


              Watch out though, matching devices comes with its own set of issues; see https://github.com/CanonicalLtd/netplan/commit/a27122bc8d8e066b1a90a7fd8d65342e8b906a8e






              share|improve this answer


























                0












                0








                0






                I think you want to match devices by MAC address, otherwise it's hard for systemd-networkd to know exactly which devices to apply the MTU to. You should also specify the MTU is 9000 for the bond itself, as its options will be applied to the underlying interfaces when they are added to the bond:



                network:
                version: 2
                renderer: networkd
                ethernets:
                eth2:
                match:
                macaddress: 00:00:aa:bb:cc:dd
                dhcp4: no
                dhcp6: no
                optional: true
                mtu: 9000
                eth3:
                match:
                macaddress: 01:01:aa:bb:cc:de
                dhcp4: no
                dhcp6: no
                optional: true
                mtu: 9000
                bonds:
                bond1:
                mtu: 9000
                interfaces: [ eth2, eth3 ]
                parameters:
                mode: 802.3ad
                mii-monitor-interval: 100
                lacp-rate: fast
                vlans:
                bond1.220:
                id: 220
                link: bond1
                mtu: 9000
                bridges:
                br-ceph-access:
                addresses: [ x.x.x.x/24 ]
                interfaces: [ bond1.220 ]
                parameters:
                forward-delay: 9
                hello-time: 2
                max-age: 12
                stp: false


                Watch out though, matching devices comes with its own set of issues; see https://github.com/CanonicalLtd/netplan/commit/a27122bc8d8e066b1a90a7fd8d65342e8b906a8e






                share|improve this answer














                I think you want to match devices by MAC address, otherwise it's hard for systemd-networkd to know exactly which devices to apply the MTU to. You should also specify the MTU is 9000 for the bond itself, as its options will be applied to the underlying interfaces when they are added to the bond:



                network:
                version: 2
                renderer: networkd
                ethernets:
                eth2:
                match:
                macaddress: 00:00:aa:bb:cc:dd
                dhcp4: no
                dhcp6: no
                optional: true
                mtu: 9000
                eth3:
                match:
                macaddress: 01:01:aa:bb:cc:de
                dhcp4: no
                dhcp6: no
                optional: true
                mtu: 9000
                bonds:
                bond1:
                mtu: 9000
                interfaces: [ eth2, eth3 ]
                parameters:
                mode: 802.3ad
                mii-monitor-interval: 100
                lacp-rate: fast
                vlans:
                bond1.220:
                id: 220
                link: bond1
                mtu: 9000
                bridges:
                br-ceph-access:
                addresses: [ x.x.x.x/24 ]
                interfaces: [ bond1.220 ]
                parameters:
                forward-delay: 9
                hello-time: 2
                max-age: 12
                stp: false


                Watch out though, matching devices comes with its own set of issues; see https://github.com/CanonicalLtd/netplan/commit/a27122bc8d8e066b1a90a7fd8d65342e8b906a8e







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Dec 7 at 19:55

























                answered Dec 7 at 19:16









                Mathieu Trudel-Lapierre

                2,0521131




                2,0521131






























                    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.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • 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%2f1099243%2fnetplan-bond-bridge-mtu-setting-not-being-honored-on-bionic-system%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

                    Quarter-circle Tiles

                    build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

                    Mont Emei