Providing IP to VMs in Openstack

asked 2019-01-31 06:47:19 -0600

Vysakh-SN gravatar image


This could be a silly question, but I didnt get an accurate answer in Google. So, my question is how to assign public IP address to a VM in Openstack? I need to know end to end process for the same. Let's say I have a set of public IP addresses from ISP, what all should be the next processes.? This is one scenario.

Another scenario is: I want to connect to these VM's using their private IP which is our corporate network range. I have registered an IP address with MAC in our physical router, but still not able to ping/SSH the VM with that private IP. I am missing something on the networking. Can someone please help me on these 2 scenarios ASAP.

Any help would really be appreciated.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-01-31 20:32:58 -0600

I assume the most common case: You are using tenant networks. This means that instances are attached to Neutron's virtual networks. These virtual networks are then attached to a router, which connects them to a Neutron external network. This external network corresponds to a physical network or VLAN in the datacenter.

Instances have IP addresses that are normally not accessible from outside. To access an instance from outside, you associate a floating IP with it. This is an address from the physical network to which the cloud is connected. The above-mentioned router performs DNAT to translate the floating IP to the instance's internal address.

If the physical network is an intranet, the floating IP is obviously an intranet address. If you also want this instance to be accessible from the internet, you will have to put a mechanism in place to translate an internet address to the floating IP. This is done outside of the cloud.

You can't access the instance via its internal IP because there is no route to it. Which is the usual case, as said above. In order to help you create a route, I would have to know details of your physical networking and of the Neutron networking configuration. Since I am far from being a networking expert, it is likely that you will have to talk to somebody else though.

edit flag offensive delete link more


Thanks @Bernd Bausch. Do you have any networking diagram explaining this which you can point me to.? I am also not a networking expert, but has to get this done soon.

Vysakh-SN gravatar imageVysakh-SN ( 2019-01-31 23:32:39 -0600 )edit

You can generate one yourself. Check out the Network Topology screen in Horizon.


Two tenant networks, net01 and net02, are connected to an external network, ext-net, via myrouter.

Bernd Bausch gravatar imageBernd Bausch ( 2019-02-01 03:17:06 -0600 )edit

One instance is connected to each network. Notice their IP addresses: They are not routable and can't be reached from outside. To reach inst01, you have to associate a floating IP from one of the ext-net subnet ranges, e.g. 213.151...., to inst01.

Bernd Bausch gravatar imageBernd Bausch ( 2019-02-01 03:19:42 -0600 )edit

When you send traffic to that floating IP, myrouter translates its destination address to, so that traffic reaches inst01.

Bernd Bausch gravatar imageBernd Bausch ( 2019-02-01 03:20:35 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2019-01-31 06:47:19 -0600

Seen: 336 times

Last updated: Jan 31 '19