Two subnets under same network context.
zigo at debian.org
Mon Aug 3 07:14:19 UTC 2020
On 8/1/20 11:36 PM, Anil Jangam wrote:
> I have observed that one can create two subnets under the same network
> scope. See below an example of the use case.
> Screen Shot 2020-08-01 at 2.22.15 PM.png
> Upon checking the data structures, I saw that the segment type (vlan)
> and segment id (55) is associated with the "network" object and not with
> the "subnet" (I was under impression that the segment type (vlan) and
> segment id (55) would be allocated to the "subnet").
> When I create the VM instances, they always pick the IP address from the
> SUBNET1-2 IP range. If the segment (vlan 55) is associated with
> "network" then what is the reason two "subnets" are allowed under it?
> Does it mean that VM instances from both these subnets would be
> configured under the same VLAN?
If you want to use segments, with a different address range depending on
where a compute is physically located (for example, a rack...), then you
should first set a different name for the physical network of your
nodes. This is done by tweaking these:
flat_networks = rack-number-1
network_vlan_ranges = rack-number-1
Then you can:
1/ create a network scope
2/ create a network using that scope, a vlan and
"--provider-physical-network rack-number-1" and --provider-segment
3/ create a subnet pool using the network scope created above
4/ create a subnet attached to the subnet pool and network segment
Then you can create more network segment + subnet couples addressing
different location. Once you're done, VMs will get a different range
depending on the rack they are in.
Thomas Goirand (zigo)
More information about the openstack-discuss