Add support to configure policy based routing

Bug #1807297 reported by Giridhar Jayavelu
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Brett Holman

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
    up ip rule add from lookup eth0
    up ip route add dev eth0 table eth0
    up ip route add default via table eth0

auto eth1
iface eth1 inet static
    up ip rule add from lookup eth1
    up ip route add dev eth1 table eth1
    up ip route add default via table eth1

Revision history for this message
Ryan Harper (raharper) wrote :


Thanks for filing the bug. This is a valid scenario.

Changed in cloud-init:
importance: Undecided → High
status: New → Triaged
Brett Holman (holmanb)
Changed in cloud-init:
assignee: nobody → Brett Holman (holmanb)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers