[Openstack-operators] Neutron DHCP agent local routes
Neil Jerram
Neil.Jerram at metaswitch.com
Mon Apr 25 16:18:06 UTC 2016
On 22/04/16 12:22, Dan Sneddon wrote:
> Yes, there is an unfortunate possibility of confusion around the word
> 'subnet'. To some, that means a network segment, or VLAN, and to some
> that just means the specific IP subnet. Neutron takes the latter view,
> and treats multiple subnets as multiple IP ranges on the same VLAN
> (which Neutron calls a 'network').
>
> So if you add multiple subnets to a network, then it is assumed that
> means multiple subnets on one physical network, or VLAN (even when
> using VXLAN or GRE, there is an internal VLAN segment ID).
Agreed. Prior to the 'routed networks' work, a Neutron Network by
definition provides L2 adjacency between all the instances that are
attached to that Network. Given that, I think the interpretation is
unavoidable that multiple subnets are just IP ranges that are all
directly connected. And hence the host_routes code that I cited is correct.
> There is ongoing work to address the use case where you have a set of
> networks that belongs to one tenant, but they are different subnets on
> different VLANs with routing between them. See the 'routed networks'
> work by Carl Baldwin et. al. That seems to be what the OP was going for
> by adding multiple subnets to one network.
With routed networks, though, the situation changes. When a Network has
'l2_adjacency = False', instances with IPs from different subnets are
probably not directly connected. Hence, once the l2_adjacency field
exists, I think we will want to conditionalize that code on it, i.e.:
if self.network.l2_adjacency and subnet.ip_version == 4:
host_routes.extend(["%s,0.0.0.0" % (s.cidr) for s in
self.network.subnets
if (s.ip_version == 4 and
s.cidr != subnet.cidr)])
Regards,
Neil
More information about the OpenStack-operators
mailing list