[Neutron] - Floating ip allocation in a specific subnet
Dear all, My network setup includes a single external network (ext_vlan) with 2 subnets: 10.x.x.0/24 and 193.x.x.0/24. Is there a way to setup the allocation logic such as that given a project, all floating ips in the project are always allocated on one of the two subnets unless the subnet is explicited (as it may happen through the Openstack CLI or the admin horizon interface)? The ideal outcome would be, given the project test-project and test-project2 , that running openstack floating ip create —project test-project ext_vlan always allocate the floating ip on the 193.x.x subnet while openstack floating ip create —project test-project2 ext_vlan always allocates the floating ip on the 10.x.x. subnet. Best regards, Michele
Hi Michele, When requesting a floating IPs, how about using the "--subnet" parameter like in this example? openstack floating ip create --project test-project2 --subnet <subnet> ext_vlan Best, Matteo On Tue, Jul 23, 2024 at 12:00 PM MIchele Delli Veneri <michele.delliveneri@na.infn.it> wrote:
Dear all,
My network setup includes a single external network (ext_vlan) with 2 subnets: 10.x.x.0/24 and 193.x.x.0/24. Is there a way to setup the allocation logic such as that given a project, all floating ips in the project are always allocated on one of the two subnets unless the subnet is explicited (as it may happen through the Openstack CLI or the admin horizon interface)?
The ideal outcome would be, given the project test-project and test-project2 , that running openstack floating ip create —project test-project ext_vlan always allocate the floating ip on the 193.x.x subnet while openstack floating ip create —project test-project2 ext_vlan always allocates the floating ip on the 10.x.x. subnet.
Best regards, Michele
Dear Matteo, I know that I can use the —subnet parameter in the CLI, but on Horizon (user interface) it is not possible and also, in our specific deploy scenario, we receive API calls which cannot include the —subnet parameter. That is why we need to setup an allocation logic that (using the project information) allocates ip on the correct subnet by default. Best regards, Michele
On 23 Jul 2024, at 12:12, Matteo Piccinini <matteo.piccinini@gmail.com> wrote:
Hi Michele,
When requesting a floating IPs, how about using the "--subnet" parameter like in this example?
openstack floating ip create --project test-project2 --subnet <subnet> ext_vlan
Best, Matteo
On Tue, Jul 23, 2024 at 12:00 PM MIchele Delli Veneri <michele.delliveneri@na.infn.it> wrote:
Dear all,
My network setup includes a single external network (ext_vlan) with 2 subnets: 10.x.x.0/24 and 193.x.x.0/24. Is there a way to setup the allocation logic such as that given a project, all floating ips in the project are always allocated on one of the two subnets unless the subnet is explicited (as it may happen through the Openstack CLI or the admin horizon interface)?
The ideal outcome would be, given the project test-project and test-project2 , that running openstack floating ip create —project test-project ext_vlan always allocate the floating ip on the 193.x.x subnet while openstack floating ip create —project test-project2 ext_vlan always allocates the floating ip on the 10.x.x. subnet.
Best regards, Michele
Hi, Dnia wtorek, 23 lipca 2024 12:15:40 CEST MIchele Delli Veneri pisze:
Dear Matteo,
I know that I can use the —subnet parameter in the CLI, but on Horizon (user interface) it is not possible and also, in our specific deploy scenario, we receive API calls which cannot include the —subnet parameter. That is why we need to setup an allocation logic that (using the project information) allocates ip on the correct subnet by default.
Best regards, Michele
On 23 Jul 2024, at 12:12, Matteo Piccinini <matteo.piccinini@gmail.com> wrote:
Hi Michele,
When requesting a floating IPs, how about using the "--subnet" parameter like in this example?
openstack floating ip create --project test-project2 --subnet <subnet> ext_vlan
Best, Matteo
On Tue, Jul 23, 2024 at 12:00 PM MIchele Delli Veneri <michele.delliveneri@na.infn.it> wrote:
Dear all,
My network setup includes a single external network (ext_vlan) with 2 subnets: 10.x.x.0/24 and 193.x.x.0/24. Is there a way to setup the allocation logic such as that given a project, all floating ips in the project are always allocated on one of the two subnets unless the subnet is explicited (as it may happen through the Openstack CLI or the admin horizon interface)?
The ideal outcome would be, given the project test-project and test-project2 , that running openstack floating ip create —project test-project ext_vlan always allocate the floating ip on the 193.x.x subnet while openstack floating ip create —project test-project2 ext_vlan always allocates the floating ip on the 10.x.x. subnet.
Best regards, Michele
There is no way to configure allocation based on the project which made request in such case I think (at least not that I am aware of). -- Slawek Kaplonski Principal Software Engineer Red Hat
On Tue, 2024-07-23 at 12:32 +0200, Sławek Kapłoński wrote:
Hi,
Dnia wtorek, 23 lipca 2024 12:15:40 CEST MIchele Delli Veneri pisze:
Dear Matteo,
I know that I can use the —subnet parameter in the CLI, but on Horizon (user interface) it is not possible and also, in our specific deploy scenario, we receive API calls which cannot include the —subnet parameter. That is why we need to setup an allocation logic that (using the project information) allocates ip on the correct subnet by default.
Best regards, Michele
On 23 Jul 2024, at 12:12, Matteo Piccinini <matteo.piccinini@gmail.com> wrote:
Hi Michele,
When requesting a floating IPs, how about using the "--subnet" parameter like in this example?
openstack floating ip create --project test-project2 --subnet <subnet> ext_vlan
Best, Matteo
On Tue, Jul 23, 2024 at 12:00 PM MIchele Delli Veneri <michele.delliveneri@na.infn.it> wrote:
Dear all,
My network setup includes a single external network (ext_vlan) with 2 subnets: 10.x.x.0/24 and 193.x.x.0/24. Is there a way to setup the allocation logic such as that given a project, all floating ips in the project are always allocated on one of the two subnets unless the subnet is explicited (as it may happen through the Openstack CLI or the admin horizon interface)?
The ideal outcome would be, given the project test-project and test-project2 , that running openstack floating ip create —project test-project ext_vlan always allocate the floating ip on the 193.x.x subnet while openstack floating ip create —project test-project2 ext_vlan always allocates the floating ip on the 10.x.x. subnet.
Best regards, Michele
There is no way to configure allocation based on the project which made request in such case I think (at least not that I am aware of). i dont know if you could use a default subnet pool in some way to do that but as an admin i would agree there is no way for you to enfoce that as far as i am aware.
participants (4)
-
Matteo Piccinini
-
MIchele Delli Veneri
-
smooney@redhat.com
-
Sławek Kapłoński