specify IP address when running router-gateway-set

Bug #1188427 reported by yong sheng gong
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Wishlist
Kevin Benton

Bug Description

Short question:
is it possible to control the IP address that is given to a router
by the quantum router-gateway-set command ?
In my setup, I have a physical Provider Network associated to a public (routable) IP address range used at my site (X.Y.Z.0/24).
I have created an ExternalNet network by the CLI commands:

quantum net-create ExternalNet --router:external=True
quantum subnet-create ExternalNet X.Y.Z.0/24 --enable_dhcp=False --gateway_ip=X.Y.Z.254

When I issue the quantum router-gateway-set command, the public interface
of the router gets the first address of the X.Y.Z.0/24 range, i.e. X.Y.Z.1,
which, by pure chance, is not used in my physical network.
My setup seems to work OK, VMs are able to ping any other host
in the external network X.Y.Z.0/24, as well as any other Internet host,
through the physical router X.Y.Z.254.

I wonder if is possible to assign to the "virtual" router implemented in Quantum a given address in the range of addresses associated to the external subnet, e.g. X.Y.Z.33.
This might also be useful in the "Per-tenant Routers with Private Networks" use case.
Many thanks in advance for your replies.
Roberto

Tags: l3-ipam-dhcp
Revision history for this message
yong sheng gong (gongysh) wrote :
Changed in quantum:
importance: Undecided → Medium
Revision history for this message
Mark McClain (markmcclain) wrote :

We have to be careful when implementing this. In certain deployments, it is not desirable to let a tenant specify their router IP.

Changed in quantum:
importance: Medium → Wishlist
tags: added: l3-ipam-dhcp
Changed in quantum:
status: New → Confirmed
Lawrance (jing)
Changed in neutron:
assignee: nobody → Lawrance (jing)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/83664

Changed in neutron:
assignee: Lawrance (jing) → Kevin Benton (kevinbenton)
status: Confirmed → In Progress
Revision history for this message
Carl Baldwin (carl-baldwin) wrote :

So, your router got the .1 address which you don't use on your network. Is the real problem here that the IP address allocation_pool was not defined correctly to exclude that undesirable address from the pool of available addresses?

Revision history for this message
Carl Baldwin (carl-baldwin) wrote :

This is related to, but not the same, as https://blueprints.launchpad.net/neutron/+spec/allow-specific-floating-ip-address. The blueprint could be augmented to include this functionality as well.

By default, don't allow any tenant to set an IP address. See the blueprint implementation for how this was done in that code.

Revision history for this message
Nachi Ueno (nati-ueno) wrote :

I think this is not a bug, but we need to have blueprint.

Kyle Mestery (mestery)
Changed in neutron:
milestone: none → kilo-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/83664
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=66f5eadec0adfa1dc55809fbe52b087a17c8a794
Submitter: Jenkins
Branch: master

commit 66f5eadec0adfa1dc55809fbe52b087a17c8a794
Author: Kevin Benton <email address hidden>
Date: Wed Jun 18 12:03:01 2014 -0700

    Allow setting a tenant router's external IP

    Adds an external_ip option to the router creation
    and update operations to set the IP address the router
    will try to use as its fixed IP on the external network
    it's attached to. By default this is restricted to an
    admin-only operation by policy.json.

    DocImpact
    ApiImpact

    Implements: blueprint specify-router-ext-ip
    Closes-Bug: #1188427
    Change-Id: Iba7c606eea48181fc10e9d0d5dc667e6f48f37de

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-2 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.