[Bug 1766527] Re: [ubuntu 18.04][netplan] Machine network goes down when second gateway is configured

Andrew Cloke andrew.cloke at canonical.com
Mon May 21 13:53:47 UTC 2018


** No longer affects: netplan

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to netplan.io in Ubuntu.
Matching subscriptions: foundations-bugs
https://bugs.launchpad.net/bugs/1766527

Title:
  [ubuntu 18.04][netplan] Machine network goes down when second gateway
  is configured

Status in The Ubuntu-power-systems project:
  Triaged
Status in netplan.io package in Ubuntu:
  New

Bug description:
  ---Problem Description---
  Machine network goes down (not sshable/pingable) when gateway is configured for second interface.
   
  ---uname output---
  Linux ltciofvtr-bostonlc2 4.15.0-13-generic #14-Ubuntu SMP Sat Mar 17 13:43:15 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux
   
  Machine Type = BostonLC bare-metal 
   
  ---System Hang---
   Remove the gateway from second interface and machine is accessible again
    
  ---Steps to Reproduce---
  I have 2 interfaces configured on my machine, 
  1. enP2p1s0f0 having public IP 9.40.xx.xx with default gateway 9.40.xx.1 
  2. second enP2p1s0f2 having private connections IP 40.1.xx.x with out gateway

  # cat /etc/netplan/01-netcfg.yaml
  network:
    version: 2
    renderer: networkd
    ethernets:
      enP2p1s0f0:
        addresses: [ 9.40.xxx.xx/24 ]
        gateway4: 9.xx.xx.1
        nameservers:
          search: [ xx.xx.ibm.com ]
          addresses:
                  - 9.x.1.x
            
      enP2p1s0f2:
              dhcp4: no
              dhcp6: no
              addresses: [ 40.1.1.12/24 ]

  
  # route  -n
  Kernel IP routing table
  Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  0.0.0.0         9.40.xx.1      0.0.0.0         UG    0      0        0 enP2p1s0f0
  9.40.xx.0      0.0.0.0         255.255.255.0   U     0      0        0 enP2p1s0f0
  40.1.1.0        0.0.0.0         255.255.255.0   U     0      0        0 enP2p1s0f2
  192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0

  I see both the interfaces are pinging works fine.

  But when I add gateway to the second interface i.e

  # cat /etc/netplan/01-netcfg.yaml
  network:
    version: 2
    renderer: networkd
    ethernets:
      enP2p1s0f0:
        addresses: [ 9.40.xxx.xx/24 ]
        gateway4: 9.xx.xx.1
        nameservers:
          search: [ xx.xx.ibm.com ]
          addresses:
                  - 9.x.1.x

     enP2p1s0f2:
              dhcp4: no
              dhcp6: no
              addresses: [ 40.1.1.12/24 ]
              gateway4: 40.1.1.1

  # route  -n
  Kernel IP routing table
  Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  0.0.0.0         40.1.1.1        0.0.0.0         UG    0      0        0 enP2p1s0f2           <<<<<< second gateway
  0.0.0.0         9.40.xx.1      0.0.0.0         UG    0      0        0 enP2p1s0f0
  9.40.xx.0      0.0.0.0         255.255.255.0   U     0      0        0 enP2p1s0f0
  40.1.1.0        0.0.0.0         255.255.255.0   U     0      0        0 enP2p1s0f2
  192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0

  run 'netplan apply'

  After this I see both the interfaces are not pingable, machine is not
  sshable.

  I see a similar issue and workaround being reported here :
  https://bugs.launchpad.net/netplan/+bug/1724666

  == Comment: #2 - Pradeep Satyanarayana <pradeep at us.ibm.com> - 2018-04-23 14:10:46 ==
  One requires what is known as "Policy Based Routing" to address this issue. The workaround that is described in the bug that you mention: 

  https://bugs.launchpad.net/netplan/+bug/1724666

  limits your options.

  The complete solution to a setup that you have is well illustrated in:

  http://www.microhowto.info/howto/ensure_symmetric_routing_on_a_server_with_multiple_default_gateways.html

  If that does not work, then that would  be a Linux Networking bug.

  This appears to be a netplan limitation and you should consider
  mirroring the bug to Ubuntu and asking them to fix it. Googling around
  it appears that Netplan may not yet support "Policy Based Routing".
  Hence folks are suggesting workarounds to this problem.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-power-systems/+bug/1766527/+subscriptions



More information about the foundations-bugs mailing list