MAAS based on ubuntu18.04, nodes can not connect to the public network











up vote
0
down vote

favorite












MAAS 2.4 is based on Ubuntu 18.04.




  • I have both my master and nodes, connect to the public network and private network.


  • My router provides DHCP on 172.16.199.0/24 (Public Network, Gateway 172.16.199.1, DNS 192.168.111.90).



  • MAAS master provide DHCP on 10.1.1.0/24 (Private Network)



    172.16.199.0/2410.1.1.0/24




Now, I can commission, deploy Ubuntu 18.04 and SSH to my nodes.
But, my nodes can not automatically connect to the public network, I find that all the requests are directed to the private network (10.1.1.100 is my MAAS master).





I must run this command on my nodes to access to the public network:



sh route add default gw 172.16.199.1 


Every time when I reboot my nodes, I have to run that command.










share|improve this question
























  • Welcome to Ask Ubuntu! Could you please post text files, dialogue messages, and program output listings as text, not as images? To achieve the latter two you can either 1) select, copy & paste the dialogue text or terminal content or 2) save the program output to a file and use that. Longer listings (the editor will tell you what’s too long) should be uploaded to a pastie service and linked to in the question. Thanks.
    – David Foerster
    Jun 20 at 20:11















up vote
0
down vote

favorite












MAAS 2.4 is based on Ubuntu 18.04.




  • I have both my master and nodes, connect to the public network and private network.


  • My router provides DHCP on 172.16.199.0/24 (Public Network, Gateway 172.16.199.1, DNS 192.168.111.90).



  • MAAS master provide DHCP on 10.1.1.0/24 (Private Network)



    172.16.199.0/2410.1.1.0/24




Now, I can commission, deploy Ubuntu 18.04 and SSH to my nodes.
But, my nodes can not automatically connect to the public network, I find that all the requests are directed to the private network (10.1.1.100 is my MAAS master).





I must run this command on my nodes to access to the public network:



sh route add default gw 172.16.199.1 


Every time when I reboot my nodes, I have to run that command.










share|improve this question
























  • Welcome to Ask Ubuntu! Could you please post text files, dialogue messages, and program output listings as text, not as images? To achieve the latter two you can either 1) select, copy & paste the dialogue text or terminal content or 2) save the program output to a file and use that. Longer listings (the editor will tell you what’s too long) should be uploaded to a pastie service and linked to in the question. Thanks.
    – David Foerster
    Jun 20 at 20:11













up vote
0
down vote

favorite









up vote
0
down vote

favorite











MAAS 2.4 is based on Ubuntu 18.04.




  • I have both my master and nodes, connect to the public network and private network.


  • My router provides DHCP on 172.16.199.0/24 (Public Network, Gateway 172.16.199.1, DNS 192.168.111.90).



  • MAAS master provide DHCP on 10.1.1.0/24 (Private Network)



    172.16.199.0/2410.1.1.0/24




Now, I can commission, deploy Ubuntu 18.04 and SSH to my nodes.
But, my nodes can not automatically connect to the public network, I find that all the requests are directed to the private network (10.1.1.100 is my MAAS master).





I must run this command on my nodes to access to the public network:



sh route add default gw 172.16.199.1 


Every time when I reboot my nodes, I have to run that command.










share|improve this question















MAAS 2.4 is based on Ubuntu 18.04.




  • I have both my master and nodes, connect to the public network and private network.


  • My router provides DHCP on 172.16.199.0/24 (Public Network, Gateway 172.16.199.1, DNS 192.168.111.90).



  • MAAS master provide DHCP on 10.1.1.0/24 (Private Network)



    172.16.199.0/2410.1.1.0/24




Now, I can commission, deploy Ubuntu 18.04 and SSH to my nodes.
But, my nodes can not automatically connect to the public network, I find that all the requests are directed to the private network (10.1.1.100 is my MAAS master).





I must run this command on my nodes to access to the public network:



sh route add default gw 172.16.199.1 


Every time when I reboot my nodes, I have to run that command.







networking 18.04 maas






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 20 at 20:09









David Foerster

27.3k1363108




27.3k1363108










asked Jun 20 at 17:50









梁昌源

1




1












  • Welcome to Ask Ubuntu! Could you please post text files, dialogue messages, and program output listings as text, not as images? To achieve the latter two you can either 1) select, copy & paste the dialogue text or terminal content or 2) save the program output to a file and use that. Longer listings (the editor will tell you what’s too long) should be uploaded to a pastie service and linked to in the question. Thanks.
    – David Foerster
    Jun 20 at 20:11


















  • Welcome to Ask Ubuntu! Could you please post text files, dialogue messages, and program output listings as text, not as images? To achieve the latter two you can either 1) select, copy & paste the dialogue text or terminal content or 2) save the program output to a file and use that. Longer listings (the editor will tell you what’s too long) should be uploaded to a pastie service and linked to in the question. Thanks.
    – David Foerster
    Jun 20 at 20:11
















Welcome to Ask Ubuntu! Could you please post text files, dialogue messages, and program output listings as text, not as images? To achieve the latter two you can either 1) select, copy & paste the dialogue text or terminal content or 2) save the program output to a file and use that. Longer listings (the editor will tell you what’s too long) should be uploaded to a pastie service and linked to in the question. Thanks.
– David Foerster
Jun 20 at 20:11




Welcome to Ask Ubuntu! Could you please post text files, dialogue messages, and program output listings as text, not as images? To achieve the latter two you can either 1) select, copy & paste the dialogue text or terminal content or 2) save the program output to a file and use that. Longer listings (the editor will tell you what’s too long) should be uploaded to a pastie service and linked to in the question. Thanks.
– David Foerster
Jun 20 at 20:11










2 Answers
2






active

oldest

votes

















up vote
0
down vote













what is the gw on your 10.0.0.x network used for ?
As declaring a gw on both interface will create 2 routes for 0.0.0.0 on your machines.



Try to remove the gw on the 10.0.0.x network and this should work.
If you need to reach specific network via the 10.0.0.x then create the static routes for them.



Cheers






share|improve this answer




























    up vote
    0
    down vote













    I have solved that problem by:



        sudo maas login username
    maas username interface set-default-gateway nodeID TheInterfaceID





    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: 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%2f1048280%2fmaas-based-on-ubuntu18-04-nodes-can-not-connect-to-the-public-network%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








      up vote
      0
      down vote













      what is the gw on your 10.0.0.x network used for ?
      As declaring a gw on both interface will create 2 routes for 0.0.0.0 on your machines.



      Try to remove the gw on the 10.0.0.x network and this should work.
      If you need to reach specific network via the 10.0.0.x then create the static routes for them.



      Cheers






      share|improve this answer

























        up vote
        0
        down vote













        what is the gw on your 10.0.0.x network used for ?
        As declaring a gw on both interface will create 2 routes for 0.0.0.0 on your machines.



        Try to remove the gw on the 10.0.0.x network and this should work.
        If you need to reach specific network via the 10.0.0.x then create the static routes for them.



        Cheers






        share|improve this answer























          up vote
          0
          down vote










          up vote
          0
          down vote









          what is the gw on your 10.0.0.x network used for ?
          As declaring a gw on both interface will create 2 routes for 0.0.0.0 on your machines.



          Try to remove the gw on the 10.0.0.x network and this should work.
          If you need to reach specific network via the 10.0.0.x then create the static routes for them.



          Cheers






          share|improve this answer












          what is the gw on your 10.0.0.x network used for ?
          As declaring a gw on both interface will create 2 routes for 0.0.0.0 on your machines.



          Try to remove the gw on the 10.0.0.x network and this should work.
          If you need to reach specific network via the 10.0.0.x then create the static routes for them.



          Cheers







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jul 4 at 13:21









          David R.

          1




          1
























              up vote
              0
              down vote













              I have solved that problem by:



                  sudo maas login username
              maas username interface set-default-gateway nodeID TheInterfaceID





              share|improve this answer

























                up vote
                0
                down vote













                I have solved that problem by:



                    sudo maas login username
                maas username interface set-default-gateway nodeID TheInterfaceID





                share|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  I have solved that problem by:



                      sudo maas login username
                  maas username interface set-default-gateway nodeID TheInterfaceID





                  share|improve this answer












                  I have solved that problem by:



                      sudo maas login username
                  maas username interface set-default-gateway nodeID TheInterfaceID






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 19 at 16:40









                  梁昌源

                  1




                  1






























                       

                      draft saved


                      draft discarded



















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1048280%2fmaas-based-on-ubuntu18-04-nodes-can-not-connect-to-the-public-network%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

                      Ellipse (mathématiques)

                      Quarter-circle Tiles

                      Mont Emei