← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1807297] [NEW] Add support to configure policy based routing

 

Public bug reported:

When there are multiple interfaces with their own default gateways, this
could result in asymmetric routing. In order to solve this, policy based
routing would have to be configured.

- There is already support to configure routes in cloud-init, but it misses ability to specify routing table.
- Need ability to create routing table entries in /etc/iproute2/rt_tables
- Configure routing table lookup for a given network.

Here is a sample configuration:
echo "100 eth0" >> /etc/iproute2/rt_tables
echo "101 eth1" >> /etc/iproute2/rt_tables

auto eth0
iface eth0 inet static
    address 10.172.142.37/24
    dns-nameservers 10.172.40.1
    gateway 10.172.142.253
    up ip rule add from 10.172.142.0/24 lookup eth0
    up ip route add 10.172.142.0/24 dev eth0 table eth0
    up ip route add default via 10.172.142.253 table eth0

auto eth1
iface eth1 inet static
    address 10.172.144.56/24
    dns-nameservers 10.172.40.1
    gateway 10.172.144.253
    up ip rule add from 10.172.144.0/24 lookup eth1
    up ip route add 10.172.144.0/24 dev eth1 table eth1
    up ip route add default via 10.172.144.253 table eth1

** Affects: cloud-init
     Importance: Undecided
         Status: New

-- 
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/1807297

Title:
  Add support to configure policy based routing

Status in cloud-init:
  New

Bug description:
  When there are multiple interfaces with their own default gateways,
  this could result in asymmetric routing. In order to solve this,
  policy based routing would have to be configured.

  - There is already support to configure routes in cloud-init, but it misses ability to specify routing table.
  - Need ability to create routing table entries in /etc/iproute2/rt_tables
  - Configure routing table lookup for a given network.

  Here is a sample configuration:
  echo "100 eth0" >> /etc/iproute2/rt_tables
  echo "101 eth1" >> /etc/iproute2/rt_tables

  auto eth0
  iface eth0 inet static
      address 10.172.142.37/24
      dns-nameservers 10.172.40.1
      gateway 10.172.142.253
      up ip rule add from 10.172.142.0/24 lookup eth0
      up ip route add 10.172.142.0/24 dev eth0 table eth0
      up ip route add default via 10.172.142.253 table eth0

  auto eth1
  iface eth1 inet static
      address 10.172.144.56/24
      dns-nameservers 10.172.40.1
      gateway 10.172.144.253
      up ip rule add from 10.172.144.0/24 lookup eth1
      up ip route add 10.172.144.0/24 dev eth1 table eth1
      up ip route add default via 10.172.144.253 table eth1

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


Follow ups