How to translate old 'ip' commands to netplan config for Ubuntu 18.04 on AWS EC2












0















Previously I had a script to apply my second static IP and route on the default NIC on boot like so:



ip addr del 192.168.123.123/32 dev ens5
ip route add 172.25.65.0/24 dev ens5 src 192.168.123.123/32


But since upgrading to Ubuntu 18.04, occasionally the systemd/networking refresh will delete the interface around 7am (and NTPD will log to syslog soon after 'deleteting interface 192.168.123.123/32' sending me on a wild goose chase)



How can I translate the above commands to a netplan config that will play nice with the existing ens5 config that is autogenerated by AWS?



Alternatively I tried adding a second IP in AWS console, but it tells me it must be in 172 range.










share|improve this question



























    0















    Previously I had a script to apply my second static IP and route on the default NIC on boot like so:



    ip addr del 192.168.123.123/32 dev ens5
    ip route add 172.25.65.0/24 dev ens5 src 192.168.123.123/32


    But since upgrading to Ubuntu 18.04, occasionally the systemd/networking refresh will delete the interface around 7am (and NTPD will log to syslog soon after 'deleteting interface 192.168.123.123/32' sending me on a wild goose chase)



    How can I translate the above commands to a netplan config that will play nice with the existing ens5 config that is autogenerated by AWS?



    Alternatively I tried adding a second IP in AWS console, but it tells me it must be in 172 range.










    share|improve this question

























      0












      0








      0








      Previously I had a script to apply my second static IP and route on the default NIC on boot like so:



      ip addr del 192.168.123.123/32 dev ens5
      ip route add 172.25.65.0/24 dev ens5 src 192.168.123.123/32


      But since upgrading to Ubuntu 18.04, occasionally the systemd/networking refresh will delete the interface around 7am (and NTPD will log to syslog soon after 'deleteting interface 192.168.123.123/32' sending me on a wild goose chase)



      How can I translate the above commands to a netplan config that will play nice with the existing ens5 config that is autogenerated by AWS?



      Alternatively I tried adding a second IP in AWS console, but it tells me it must be in 172 range.










      share|improve this question














      Previously I had a script to apply my second static IP and route on the default NIC on boot like so:



      ip addr del 192.168.123.123/32 dev ens5
      ip route add 172.25.65.0/24 dev ens5 src 192.168.123.123/32


      But since upgrading to Ubuntu 18.04, occasionally the systemd/networking refresh will delete the interface around 7am (and NTPD will log to syslog soon after 'deleteting interface 192.168.123.123/32' sending me on a wild goose chase)



      How can I translate the above commands to a netplan config that will play nice with the existing ens5 config that is autogenerated by AWS?



      Alternatively I tried adding a second IP in AWS console, but it tells me it must be in 172 range.







      linux networking amazon-web-services amazon-ec2 netplan






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 15 at 9:22









      user2819573user2819573

      112




      112






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          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%2fsuperuser.com%2fquestions%2f1394424%2fhow-to-translate-old-ip-commands-to-netplan-config-for-ubuntu-18-04-on-aws-ec2%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • 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%2fsuperuser.com%2fquestions%2f1394424%2fhow-to-translate-old-ip-commands-to-netplan-config-for-ubuntu-18-04-on-aws-ec2%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

          How to make a Squid Proxy server?

          Is this a new Fibonacci Identity?

          19世紀