netplan apply does not change the IP addressUbuntu 18.04 Static IP with NetPlan require rebootDomain...

Why doesn't a class having private constructor prevent inheriting from this class? How to control which classes can inherit from a certain base?

Two films in a tank, only one comes out with a development error – why?

What doth I be?

How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?

Can a monk's single staff be considered dual wielded, as per the Dual Wielder feat?

expand `ifthenelse` immediately

Roll the carpet

Is it possible to run Internet Explorer on OS X El Capitan?

Why is 150k or 200k jobs considered good when there's 300k+ births a month?

how to check a propriety using r studio

A case of the sniffles

Which country benefited the most from UN Security Council vetoes?

How to source a part of a file

Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)

Could an aircraft fly or hover using only jets of compressed air?

Theorems that impeded progress

Client team has low performances and low technical skills: we always fix their work and now they stop collaborate with us. How to solve?

Paid for article while in US on F-1 visa?

How to determine what difficulty is right for the game?

Was any UN Security Council vote triple-vetoed?

Is it unprofessional to ask if a job posting on GlassDoor is real?

Does detail obscure or enhance action?

How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?

Can a vampire attack twice with their claws using multiattack?



netplan apply does not change the IP address


Ubuntu 18.04 Static IP with NetPlan require rebootDomain controller IP address changeCan't change IP address to static - interface isn't in /etc/network/interfacesNetplan error, error on nameserverUbuntu 18.04 Network card with two IP addressesNetworking problem on Ubuntu 18.04: no gatewayUnexpected “hidden” additional DHCP addressNetplan error in network definition expected mappingHow do I configure a DNS server for Ubuntu Server 18.04 LTS?Setting a static IP address was failedUbuntu 18.04 Server no remote access






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







1















ok, my file is located at /etc/netplan/50-cloud-init.yaml
I changed the IP address as a static IP address as following:



network:
version: 2

renderer: netwokrd

ethernets:

dhcp4: no
dhcp6: no
addresses: [10.0.2.100/24]
gateway4: 10.0.2.1
nameservers:
addresses: [10.0.2.100]


Then, I typed sudo netplan apply, and there was not any error message.
BUT, when I typed ifconfig, it still remail past IP address on enp0s3.
Do you guys know why this happen?










share|improve this question































    1















    ok, my file is located at /etc/netplan/50-cloud-init.yaml
    I changed the IP address as a static IP address as following:



    network:
    version: 2

    renderer: netwokrd

    ethernets:

    dhcp4: no
    dhcp6: no
    addresses: [10.0.2.100/24]
    gateway4: 10.0.2.1
    nameservers:
    addresses: [10.0.2.100]


    Then, I typed sudo netplan apply, and there was not any error message.
    BUT, when I typed ifconfig, it still remail past IP address on enp0s3.
    Do you guys know why this happen?










    share|improve this question



























      1












      1








      1








      ok, my file is located at /etc/netplan/50-cloud-init.yaml
      I changed the IP address as a static IP address as following:



      network:
      version: 2

      renderer: netwokrd

      ethernets:

      dhcp4: no
      dhcp6: no
      addresses: [10.0.2.100/24]
      gateway4: 10.0.2.1
      nameservers:
      addresses: [10.0.2.100]


      Then, I typed sudo netplan apply, and there was not any error message.
      BUT, when I typed ifconfig, it still remail past IP address on enp0s3.
      Do you guys know why this happen?










      share|improve this question
















      ok, my file is located at /etc/netplan/50-cloud-init.yaml
      I changed the IP address as a static IP address as following:



      network:
      version: 2

      renderer: netwokrd

      ethernets:

      dhcp4: no
      dhcp6: no
      addresses: [10.0.2.100/24]
      gateway4: 10.0.2.1
      nameservers:
      addresses: [10.0.2.100]


      Then, I typed sudo netplan apply, and there was not any error message.
      BUT, when I typed ifconfig, it still remail past IP address on enp0s3.
      Do you guys know why this happen?







      networking server netplan






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 13 '18 at 14:05









      chili555

      39k55280




      39k55280










      asked Oct 13 '18 at 6:04









      강찬희강찬희

      364




      364






















          2 Answers
          2






          active

          oldest

          votes


















          2














          Netplan is fussy about how .yaml files are formatted. Don't try to "pretty-fy" them.



          Is 50-cloud-init.yaml the only .yaml file in /etc/netplan?



          So edit your .yaml file to look like this...



          network:
          version: 2
          renderer: networkd <-- note the correct spelling
          ethernets:
          enp0s3: <-- identify the proper interface
          dhcp4: no
          dhcp6: no
          addresses: [10.0.2.100/24]
          gateway4: 10.0.2.1
          nameservers:
          addresses: [10.0.2.100] <-- this is probably the wrong address
          addresses: [8.8.8.8, 8.8.4.4] <-- use something like this instead


          then do:



          sudo netplan --debug generate  # generate the config files
          sudo netplan apply # apply the new configuration
          reboot # reboot the computer


          and recheck your ifconfig output.



          Note: if it was me, I'd let NetworkManager manage this interface, and set the static address information into the "Wired Connection" profile.



          network:
          version: 2
          renderer: NetworkManager


          then do:



          sudo netplan --debug generate  # generate the config files
          sudo netplan apply # apply the new configuration
          reboot # reboot the computer





          share|improve this answer


























          • since the netplan config is in /etc/netplan/50-cloud-init.yaml it is likely this is a cloud image which has no NetworkManager installed.

            – slangasek
            Oct 25 '18 at 5:20






          • 1





            Why do you must reboot? Is there any other way?

            – Nimitack
            Dec 17 '18 at 9:19











          • @Nimitack technically, the sudo netplan -debug generate and sudo netplan apply commands should do it, but I've seen cases where it didn't, and a reboot will actually start with the netplan configuration you've set, and you can confirm that it's working as expected.

            – heynnema
            Dec 17 '18 at 13:29






          • 1





            I see this issue on vmware machine and on virtual box.. when I install ubuntu 18.04... I really need this to NOT reboot.. I couldn't find anything about this on the web.. this is pretty basic stuff, static IP. I don't understand why to reset it.. it's not hardware or so..., Linux is all about NOT rebooting right?

            – Nimitack
            Dec 18 '18 at 12:48











          • @Nimitack I'm confused. I indicated that a reboot is not mandatory, however, it MAY be required if the sudo netplan apply doesn't do it.

            – heynnema
            Dec 18 '18 at 14:30



















          -1














          someone please unfuck linux networking






          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%2f1083390%2fnetplan-apply-does-not-change-the-ip-address%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









            2














            Netplan is fussy about how .yaml files are formatted. Don't try to "pretty-fy" them.



            Is 50-cloud-init.yaml the only .yaml file in /etc/netplan?



            So edit your .yaml file to look like this...



            network:
            version: 2
            renderer: networkd <-- note the correct spelling
            ethernets:
            enp0s3: <-- identify the proper interface
            dhcp4: no
            dhcp6: no
            addresses: [10.0.2.100/24]
            gateway4: 10.0.2.1
            nameservers:
            addresses: [10.0.2.100] <-- this is probably the wrong address
            addresses: [8.8.8.8, 8.8.4.4] <-- use something like this instead


            then do:



            sudo netplan --debug generate  # generate the config files
            sudo netplan apply # apply the new configuration
            reboot # reboot the computer


            and recheck your ifconfig output.



            Note: if it was me, I'd let NetworkManager manage this interface, and set the static address information into the "Wired Connection" profile.



            network:
            version: 2
            renderer: NetworkManager


            then do:



            sudo netplan --debug generate  # generate the config files
            sudo netplan apply # apply the new configuration
            reboot # reboot the computer





            share|improve this answer


























            • since the netplan config is in /etc/netplan/50-cloud-init.yaml it is likely this is a cloud image which has no NetworkManager installed.

              – slangasek
              Oct 25 '18 at 5:20






            • 1





              Why do you must reboot? Is there any other way?

              – Nimitack
              Dec 17 '18 at 9:19











            • @Nimitack technically, the sudo netplan -debug generate and sudo netplan apply commands should do it, but I've seen cases where it didn't, and a reboot will actually start with the netplan configuration you've set, and you can confirm that it's working as expected.

              – heynnema
              Dec 17 '18 at 13:29






            • 1





              I see this issue on vmware machine and on virtual box.. when I install ubuntu 18.04... I really need this to NOT reboot.. I couldn't find anything about this on the web.. this is pretty basic stuff, static IP. I don't understand why to reset it.. it's not hardware or so..., Linux is all about NOT rebooting right?

              – Nimitack
              Dec 18 '18 at 12:48











            • @Nimitack I'm confused. I indicated that a reboot is not mandatory, however, it MAY be required if the sudo netplan apply doesn't do it.

              – heynnema
              Dec 18 '18 at 14:30
















            2














            Netplan is fussy about how .yaml files are formatted. Don't try to "pretty-fy" them.



            Is 50-cloud-init.yaml the only .yaml file in /etc/netplan?



            So edit your .yaml file to look like this...



            network:
            version: 2
            renderer: networkd <-- note the correct spelling
            ethernets:
            enp0s3: <-- identify the proper interface
            dhcp4: no
            dhcp6: no
            addresses: [10.0.2.100/24]
            gateway4: 10.0.2.1
            nameservers:
            addresses: [10.0.2.100] <-- this is probably the wrong address
            addresses: [8.8.8.8, 8.8.4.4] <-- use something like this instead


            then do:



            sudo netplan --debug generate  # generate the config files
            sudo netplan apply # apply the new configuration
            reboot # reboot the computer


            and recheck your ifconfig output.



            Note: if it was me, I'd let NetworkManager manage this interface, and set the static address information into the "Wired Connection" profile.



            network:
            version: 2
            renderer: NetworkManager


            then do:



            sudo netplan --debug generate  # generate the config files
            sudo netplan apply # apply the new configuration
            reboot # reboot the computer





            share|improve this answer


























            • since the netplan config is in /etc/netplan/50-cloud-init.yaml it is likely this is a cloud image which has no NetworkManager installed.

              – slangasek
              Oct 25 '18 at 5:20






            • 1





              Why do you must reboot? Is there any other way?

              – Nimitack
              Dec 17 '18 at 9:19











            • @Nimitack technically, the sudo netplan -debug generate and sudo netplan apply commands should do it, but I've seen cases where it didn't, and a reboot will actually start with the netplan configuration you've set, and you can confirm that it's working as expected.

              – heynnema
              Dec 17 '18 at 13:29






            • 1





              I see this issue on vmware machine and on virtual box.. when I install ubuntu 18.04... I really need this to NOT reboot.. I couldn't find anything about this on the web.. this is pretty basic stuff, static IP. I don't understand why to reset it.. it's not hardware or so..., Linux is all about NOT rebooting right?

              – Nimitack
              Dec 18 '18 at 12:48











            • @Nimitack I'm confused. I indicated that a reboot is not mandatory, however, it MAY be required if the sudo netplan apply doesn't do it.

              – heynnema
              Dec 18 '18 at 14:30














            2












            2








            2







            Netplan is fussy about how .yaml files are formatted. Don't try to "pretty-fy" them.



            Is 50-cloud-init.yaml the only .yaml file in /etc/netplan?



            So edit your .yaml file to look like this...



            network:
            version: 2
            renderer: networkd <-- note the correct spelling
            ethernets:
            enp0s3: <-- identify the proper interface
            dhcp4: no
            dhcp6: no
            addresses: [10.0.2.100/24]
            gateway4: 10.0.2.1
            nameservers:
            addresses: [10.0.2.100] <-- this is probably the wrong address
            addresses: [8.8.8.8, 8.8.4.4] <-- use something like this instead


            then do:



            sudo netplan --debug generate  # generate the config files
            sudo netplan apply # apply the new configuration
            reboot # reboot the computer


            and recheck your ifconfig output.



            Note: if it was me, I'd let NetworkManager manage this interface, and set the static address information into the "Wired Connection" profile.



            network:
            version: 2
            renderer: NetworkManager


            then do:



            sudo netplan --debug generate  # generate the config files
            sudo netplan apply # apply the new configuration
            reboot # reboot the computer





            share|improve this answer















            Netplan is fussy about how .yaml files are formatted. Don't try to "pretty-fy" them.



            Is 50-cloud-init.yaml the only .yaml file in /etc/netplan?



            So edit your .yaml file to look like this...



            network:
            version: 2
            renderer: networkd <-- note the correct spelling
            ethernets:
            enp0s3: <-- identify the proper interface
            dhcp4: no
            dhcp6: no
            addresses: [10.0.2.100/24]
            gateway4: 10.0.2.1
            nameservers:
            addresses: [10.0.2.100] <-- this is probably the wrong address
            addresses: [8.8.8.8, 8.8.4.4] <-- use something like this instead


            then do:



            sudo netplan --debug generate  # generate the config files
            sudo netplan apply # apply the new configuration
            reboot # reboot the computer


            and recheck your ifconfig output.



            Note: if it was me, I'd let NetworkManager manage this interface, and set the static address information into the "Wired Connection" profile.



            network:
            version: 2
            renderer: NetworkManager


            then do:



            sudo netplan --debug generate  # generate the config files
            sudo netplan apply # apply the new configuration
            reboot # reboot the computer






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Feb 2 at 4:23

























            answered Oct 13 '18 at 15:37









            heynnemaheynnema

            21.3k22360




            21.3k22360













            • since the netplan config is in /etc/netplan/50-cloud-init.yaml it is likely this is a cloud image which has no NetworkManager installed.

              – slangasek
              Oct 25 '18 at 5:20






            • 1





              Why do you must reboot? Is there any other way?

              – Nimitack
              Dec 17 '18 at 9:19











            • @Nimitack technically, the sudo netplan -debug generate and sudo netplan apply commands should do it, but I've seen cases where it didn't, and a reboot will actually start with the netplan configuration you've set, and you can confirm that it's working as expected.

              – heynnema
              Dec 17 '18 at 13:29






            • 1





              I see this issue on vmware machine and on virtual box.. when I install ubuntu 18.04... I really need this to NOT reboot.. I couldn't find anything about this on the web.. this is pretty basic stuff, static IP. I don't understand why to reset it.. it's not hardware or so..., Linux is all about NOT rebooting right?

              – Nimitack
              Dec 18 '18 at 12:48











            • @Nimitack I'm confused. I indicated that a reboot is not mandatory, however, it MAY be required if the sudo netplan apply doesn't do it.

              – heynnema
              Dec 18 '18 at 14:30



















            • since the netplan config is in /etc/netplan/50-cloud-init.yaml it is likely this is a cloud image which has no NetworkManager installed.

              – slangasek
              Oct 25 '18 at 5:20






            • 1





              Why do you must reboot? Is there any other way?

              – Nimitack
              Dec 17 '18 at 9:19











            • @Nimitack technically, the sudo netplan -debug generate and sudo netplan apply commands should do it, but I've seen cases where it didn't, and a reboot will actually start with the netplan configuration you've set, and you can confirm that it's working as expected.

              – heynnema
              Dec 17 '18 at 13:29






            • 1





              I see this issue on vmware machine and on virtual box.. when I install ubuntu 18.04... I really need this to NOT reboot.. I couldn't find anything about this on the web.. this is pretty basic stuff, static IP. I don't understand why to reset it.. it's not hardware or so..., Linux is all about NOT rebooting right?

              – Nimitack
              Dec 18 '18 at 12:48











            • @Nimitack I'm confused. I indicated that a reboot is not mandatory, however, it MAY be required if the sudo netplan apply doesn't do it.

              – heynnema
              Dec 18 '18 at 14:30

















            since the netplan config is in /etc/netplan/50-cloud-init.yaml it is likely this is a cloud image which has no NetworkManager installed.

            – slangasek
            Oct 25 '18 at 5:20





            since the netplan config is in /etc/netplan/50-cloud-init.yaml it is likely this is a cloud image which has no NetworkManager installed.

            – slangasek
            Oct 25 '18 at 5:20




            1




            1





            Why do you must reboot? Is there any other way?

            – Nimitack
            Dec 17 '18 at 9:19





            Why do you must reboot? Is there any other way?

            – Nimitack
            Dec 17 '18 at 9:19













            @Nimitack technically, the sudo netplan -debug generate and sudo netplan apply commands should do it, but I've seen cases where it didn't, and a reboot will actually start with the netplan configuration you've set, and you can confirm that it's working as expected.

            – heynnema
            Dec 17 '18 at 13:29





            @Nimitack technically, the sudo netplan -debug generate and sudo netplan apply commands should do it, but I've seen cases where it didn't, and a reboot will actually start with the netplan configuration you've set, and you can confirm that it's working as expected.

            – heynnema
            Dec 17 '18 at 13:29




            1




            1





            I see this issue on vmware machine and on virtual box.. when I install ubuntu 18.04... I really need this to NOT reboot.. I couldn't find anything about this on the web.. this is pretty basic stuff, static IP. I don't understand why to reset it.. it's not hardware or so..., Linux is all about NOT rebooting right?

            – Nimitack
            Dec 18 '18 at 12:48





            I see this issue on vmware machine and on virtual box.. when I install ubuntu 18.04... I really need this to NOT reboot.. I couldn't find anything about this on the web.. this is pretty basic stuff, static IP. I don't understand why to reset it.. it's not hardware or so..., Linux is all about NOT rebooting right?

            – Nimitack
            Dec 18 '18 at 12:48













            @Nimitack I'm confused. I indicated that a reboot is not mandatory, however, it MAY be required if the sudo netplan apply doesn't do it.

            – heynnema
            Dec 18 '18 at 14:30





            @Nimitack I'm confused. I indicated that a reboot is not mandatory, however, it MAY be required if the sudo netplan apply doesn't do it.

            – heynnema
            Dec 18 '18 at 14:30













            -1














            someone please unfuck linux networking






            share|improve this answer




























              -1














              someone please unfuck linux networking






              share|improve this answer


























                -1












                -1








                -1







                someone please unfuck linux networking






                share|improve this answer













                someone please unfuck linux networking







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 55 mins ago









                Bill WestrupBill Westrup

                93




                93






























                    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%2f1083390%2fnetplan-apply-does-not-change-the-ip-address%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

                    List of shipwrecks in 1808...

                    Is there a lightweight tool to crop images quickly?Cropping Images using Command Line Tools OnlyHow to crop...

                    Unit packagekit.service is masked Announcing the arrival of Valued Associate #679: Cesar...