[RFE] Create host-routes for routed networks (segments)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Wishlist
|
Harald Jensås |
Bug Description
When using routed networks[1] on an instance connected to multiple networks the traffic from a segment_a to segment_b within a L3 network might be routed via a different network if the default router/gateway is not on the interface connecting to the routed network.
It would be good to (at-least have an option to) automatically configure host_routes on the subnets in a routed L3 network. In such a way that traffic with a destination on a different segment within the same L3 network is routed via the instance interface connecting to the same L3 network.
Example:
instance_a:
- port_a: some_net, segmentX, some_net_subnet <-- default gateway
- port_b: net1, segmentA, subnetA
instance_b:
- port_a: other_net, segmentY, other_net_subnet <-- default gateway
- port_b: net1, segmentB, subnetB
Unless a host-route is in place, traffic from instance_a to instance_b will use some/other-net, not net1 which both is connected to.
This RFE is to have the host_routes property on the subnets withing net1 populated, so that clients are aware of neighbour L3 networks.
An example configuration:
-------
First Create some_net and other_net:
~~~~~~~
$ openstack network create \
--provider-
--provider-
$ openstack network create \
--provider-
--provider-
$ SOME_NET_
$ OTHER_NET_
$ openstack subnet create \
--network-segment $SOME_NET_
--network some_net \
--ip-version 4 \
--subnet-range 192.168.20.0/24 \
--dhcp \
--gateway 192.168.20.1 \
some_net_subnet
$ openstack subnet create \
--network-segment $OTHER_
--network other_net \
--ip-version 4 \
--subnet-range 192.168.30.0/24 \
--dhcp \
--gateway 192.168.30.1 \
other_net_subnet
Create net1, with two segment (segmentA and segmentB):
~~~~~~~
$ openstack network create \
--provider-
--provider-
net1
$ NET1_SEGMENTA_
$ openstack network segment set --name net1_segmentA $NET1_SEGMENTA_ID
$ openstack network segment create \
--network-type flat \
--physical-
--network net1 \
net1_segmentB
Create two subnets associated with different segments on net1:
~~~~~~~
$ openstack subnet create \
--network-segment net1_segmentA \
--network net1 \
--ip-version 4 \
--subnet-range 192.168.100.0/25 \
--dhcp \
subnetA
$ openstack subnet create \
--network-segment net1_segmentB \
--network net1 \
--ip-version 4 \
--subnet-range 192.168.100.128/25 \
--dhcp \
subnetB
<pseudo-command> $ openstack server create \
<pseudo-command> $ openstack server create \
NOTE: Assume instance_a is scheduled on a compute with bridge mapping to physical network net1_segmentA, and instance_b is scheduled to a compute with bridge mapping to physical network net1_segmentB.
What we end up with is traffic within net1 (the routed network) is routed via the default gateway on some_net/other_net.
The cloud user most likely does not know that net1 is a routed network, and expect traffic within net1 _not to be_ routed via some/other-net.
To solve this problem neutron should do the equivalent of:
~~~~~~~
$ openstack subnet set \
--host-route destination=
subnetA
$ openstack subnet set \
--host-route destination=
subnetB
^^ Would make DHCP agents advertise the routes within net1 to clients, making traffic destined for other segments on net1 take a path via a route within net1 (within the routed network).
I believe it would make sense to automate this, so that when additional subnets on additional segments are added the new destination is appended to the host routes.
[1] https:/
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
Changed in neutron: | |
importance: | Undecided → Wishlist |
I am wondering if it is intended to have net1 in segmentA on instance_a and net1 in segmentB on instances_b.
I would like to ask few questions:
- is subnet0 the same for all some_net, other_net and net1 nets?
- is net1/subnet0 a connected route for instances?
- is it correct that traffic between instances will be exchanged over segmentA in prior to net1? does it it mean that segment takes priority over network?
- does it mean that instances should be aware about routing things? i.e via DHCP agent
- how to configure mentioned example? would you like to provide example set of command, please?