Ask Your Question
0

is it possible to assign a floating IP to a router's external interface?

asked 2014-07-16 14:58:40 -0500

dcbarans gravatar image

So, I'm trying to set up my network to use "http://docs.openstack.org/havana/install-guide/install/yum/content/section_use-cases-tenant-router.html (per-tenant routers with private networks)". I believe this is the standard setup option in the documents.

I'm also trying to be conservative with my IP addresses. Therefore, when a client creates a router it is automatically assigned an IP address. That's fine, but is it possible to ensure that the user will always get the same IP? Sounds like a job for floating IP's maybe? So, is it at all possible to assign a floating IP as the router gateway interface?

Example scenario:

  • Create floating IP
  • Create router and use floating IP as gateway interface
  • Remove router
  • Create router again and use same floating IP as gateway interface
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-07-16 15:28:54 -0500

SamYaple gravatar image

I believe you are talking about a router connected to an external network. My comments that follow are based on that assumption.

As long as that router exist, it will have the same IP address. It never releases it. You can have multiple routers per tenant, and they all get a different address. If you delete a router, there is no way to garuntee that you can get the same ip address back when you create a new one.

What you suggest is useful, but cannot be implemented in the way things are currently laid out with neutron (nothing is impossible, but it is impracticle when there are other alternatives that are better). There is currently lots of trouble with the "external" network design. I have not even seen a great candidate to fix the issue as of yet.

Here is how I handle this. I have an external database tracking users and ips and I run some triggers to automatically update this stuff in the neutron database.

edit flag offensive delete link more

Comments

Hmm, that's not bad. Anywhere I can read up on these hooks you speak of? Thanks!

dcbarans gravatar imagedcbarans ( 2014-07-16 15:54:20 -0500 )edit

I wrote them. I cannot post them due to company policy. My apologies. I can tell you that they are extremely simple. I just triggered on created routers and just did a lookup based on that information to an external table. If the company/tenant had an IP with no associated router, I assigned the new router that IP address. If not, I added the new IP to the table.

It is subject to race conditions when, say, using api calls, but since we only allow creation via a web portal the hassle of fixing those race conditions was not worth it to me.

SamYaple gravatar imageSamYaple ( 2014-07-16 17:44:10 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-07-16 14:58:40 -0500

Seen: 514 times

Last updated: Jul 16 '14