UBUNTU 18.04 Server: multiple netplan route-policy rules, but only one works












0















UBUNTU SERVER 18.04 LTS with 2 GE NICs



eno1: 172.22.1.1/20
eno2: 10.11.1.34/30



netplan yaml:



network:
version: 2
renderer: networkd
ethernets:
eno1:
addresses: [ 172.22.1.1/20 ]
gateway4: 172.22.0.1
nameservers:
addresses:
- "172.22.0.53"
routing-policy:
- to: 172.22.224.0/19
table: 211
priority: 10
- to: 192.168.201.0/24
table: 200
priority: 20
routes:
- to: 0.0.0.0/0
via: 172.22.0.254
table: 211
- to: 0.0.0.0/0
via: 172.22.0.1
table: 200

eno2:
addresses: [ 10.11.1.34/30 ]
routing-policy:
- from: 10.11.1.34
table: 222
priority: 8
- to: 10.128.0.0/16
table: 222
priority: 5
routes:
- to: 0.0.0.0/0
via: 10.11.1.33
table: 222


When I apply the configuration, restart the networking or use netplan apply, only one of these routing-policies works:



When I use netplan apply:



For eno1:
First time, only the first routing-policy works.
Second time, only the second routing-policy works.
Third time, only the first routing-policy works.



For eno2:
Every time, only the second routing-policy works.



I wrote the yaml file as the netplan.io examples told.









share







New contributor




TerryR01 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    UBUNTU SERVER 18.04 LTS with 2 GE NICs



    eno1: 172.22.1.1/20
    eno2: 10.11.1.34/30



    netplan yaml:



    network:
    version: 2
    renderer: networkd
    ethernets:
    eno1:
    addresses: [ 172.22.1.1/20 ]
    gateway4: 172.22.0.1
    nameservers:
    addresses:
    - "172.22.0.53"
    routing-policy:
    - to: 172.22.224.0/19
    table: 211
    priority: 10
    - to: 192.168.201.0/24
    table: 200
    priority: 20
    routes:
    - to: 0.0.0.0/0
    via: 172.22.0.254
    table: 211
    - to: 0.0.0.0/0
    via: 172.22.0.1
    table: 200

    eno2:
    addresses: [ 10.11.1.34/30 ]
    routing-policy:
    - from: 10.11.1.34
    table: 222
    priority: 8
    - to: 10.128.0.0/16
    table: 222
    priority: 5
    routes:
    - to: 0.0.0.0/0
    via: 10.11.1.33
    table: 222


    When I apply the configuration, restart the networking or use netplan apply, only one of these routing-policies works:



    When I use netplan apply:



    For eno1:
    First time, only the first routing-policy works.
    Second time, only the second routing-policy works.
    Third time, only the first routing-policy works.



    For eno2:
    Every time, only the second routing-policy works.



    I wrote the yaml file as the netplan.io examples told.









    share







    New contributor




    TerryR01 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      UBUNTU SERVER 18.04 LTS with 2 GE NICs



      eno1: 172.22.1.1/20
      eno2: 10.11.1.34/30



      netplan yaml:



      network:
      version: 2
      renderer: networkd
      ethernets:
      eno1:
      addresses: [ 172.22.1.1/20 ]
      gateway4: 172.22.0.1
      nameservers:
      addresses:
      - "172.22.0.53"
      routing-policy:
      - to: 172.22.224.0/19
      table: 211
      priority: 10
      - to: 192.168.201.0/24
      table: 200
      priority: 20
      routes:
      - to: 0.0.0.0/0
      via: 172.22.0.254
      table: 211
      - to: 0.0.0.0/0
      via: 172.22.0.1
      table: 200

      eno2:
      addresses: [ 10.11.1.34/30 ]
      routing-policy:
      - from: 10.11.1.34
      table: 222
      priority: 8
      - to: 10.128.0.0/16
      table: 222
      priority: 5
      routes:
      - to: 0.0.0.0/0
      via: 10.11.1.33
      table: 222


      When I apply the configuration, restart the networking or use netplan apply, only one of these routing-policies works:



      When I use netplan apply:



      For eno1:
      First time, only the first routing-policy works.
      Second time, only the second routing-policy works.
      Third time, only the first routing-policy works.



      For eno2:
      Every time, only the second routing-policy works.



      I wrote the yaml file as the netplan.io examples told.









      share







      New contributor




      TerryR01 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      UBUNTU SERVER 18.04 LTS with 2 GE NICs



      eno1: 172.22.1.1/20
      eno2: 10.11.1.34/30



      netplan yaml:



      network:
      version: 2
      renderer: networkd
      ethernets:
      eno1:
      addresses: [ 172.22.1.1/20 ]
      gateway4: 172.22.0.1
      nameservers:
      addresses:
      - "172.22.0.53"
      routing-policy:
      - to: 172.22.224.0/19
      table: 211
      priority: 10
      - to: 192.168.201.0/24
      table: 200
      priority: 20
      routes:
      - to: 0.0.0.0/0
      via: 172.22.0.254
      table: 211
      - to: 0.0.0.0/0
      via: 172.22.0.1
      table: 200

      eno2:
      addresses: [ 10.11.1.34/30 ]
      routing-policy:
      - from: 10.11.1.34
      table: 222
      priority: 8
      - to: 10.128.0.0/16
      table: 222
      priority: 5
      routes:
      - to: 0.0.0.0/0
      via: 10.11.1.33
      table: 222


      When I apply the configuration, restart the networking or use netplan apply, only one of these routing-policies works:



      When I use netplan apply:



      For eno1:
      First time, only the first routing-policy works.
      Second time, only the second routing-policy works.
      Third time, only the first routing-policy works.



      For eno2:
      Every time, only the second routing-policy works.



      I wrote the yaml file as the netplan.io examples told.







      networking server netplan





      share







      New contributor




      TerryR01 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      TerryR01 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      TerryR01 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 1 min ago









      TerryR01TerryR01

      13




      13




      New contributor




      TerryR01 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      TerryR01 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      TerryR01 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes











          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
          });


          }
          });






          TerryR01 is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1117580%2fubuntu-18-04-server-multiple-netplan-route-policy-rules-but-only-one-works%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








          TerryR01 is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          TerryR01 is a new contributor. Be nice, and check out our Code of Conduct.













          TerryR01 is a new contributor. Be nice, and check out our Code of Conduct.












          TerryR01 is a new contributor. Be nice, and check out our Code of Conduct.
















          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%2f1117580%2fubuntu-18-04-server-multiple-netplan-route-policy-rules-but-only-one-works%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

          GameSpot

          connect to host localhost port 22: Connection refused

          Getting a Wifi WPA2 wifi connection