← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1663049] Re: Local routes are not configured correctly in /etc/network/interfaces

 

[Expired for cloud-init because there has been no activity for 60 days.]

** Changed in: cloud-init
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1663049

Title:
  Local routes are not configured correctly in /etc/network/interfaces

Status in cloud-init:
  Expired

Bug description:
  For Debian-based platforms, additional, local routes are not added
  correctly in /etc/network/interfaces.

  For example, I may have interface `eth0` with address 192.168.0.10/24
  but I need to add a *local* route to 192.168.1.0/24 where this subnet
  is available on the same physical network - NOT via a gateway.

  In this case, my route would look like:
  {
      "network": "192.168.1.0",
      "netmask": "255.255.255.0",
      "gateway": "0.0.0.0"
  }

  The gateway of "0.0.0.0" signifies that this is a local route and a
  gateway is not required.

  I would expect that /etc/network/interfaces configuration for this route looks like one of the below:
  ---
  post-up route add -net 192.168.1.0 netmask 255.255.255.0 dev eth0
  post-up ip route add 192.168.1.0/24 dev eth0
  ---

  However, the configuration looks like:
  ---
  post-up route add -net 192.168.1.0 netmask 255.255.255.0 gw 0.0.0.0
  ---

  The `dev eth0` is especially important here as the route table needs
  to know which physical interface the subnet is available on.

  Whilst this may seem like a very unlikely scenario, this sort of
  routing is much more common when the IP addresses are on public
  subnets and it's preferable to have them communicate locally rather
  than via the gateway.

  Additionally, it seems that using OpenStack's DHCP to configure the
  networking instead does achieve the desired behaviour.

  This is working correctly on RHEL-based platforms but I've not tested
  any other distros.

  For reference, the relevant code is in
  `cloudinit.net.eni.Renderer._render_route`

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1663049/+subscriptions


References