Assigning public ip address to instance

Asked by Bryan Walker

Hi,

     I have a nova setup on a single server with VLAN Network mode. I followed the online instructions for setup and opened port 22 for the nova network. I can start a new instance and ssh into it through it's private ip just fine. I have a block of 10 public ip addresses and added them to the floating ip list with no errors. I start a new virtual instance and associate one of the public addresses to the new instance. If I try to ssh into the instance through the public address, I get a 'no route to host' error. Accessing the instance through the private ip still works as normal. I can't find anything unusual in syslog. I'm guessing that I'm missing a simple step. Is this the proper way to have my instances accessible (with public ips) outside the private nova network on VLAN network mode?

Would flat networking mode work better for this, or is there a simple way to have my public ip addresses dynamically assigned to instances using the 'nova-manage network create' command? Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Bryan Walker
Solved:
Last query:
Last reply:
Revision history for this message
Vish Ishaya (vishvananda) said :
#1

Where are you trying to ssh from? Nova uses NAT for public ips, so if you are on the network host, it will skip the NAT table. Since you are running everything on one host you won't be able to ssh to the public ip from that host. You'll need to be on another host on the same network to access the instance via its public ip.

On Feb 1, 2011, at 9:51 PM, Bryan Walker wrote:

> New question #143760 on OpenStack Compute (nova):
> https://answers.launchpad.net/nova/+question/143760
>
> Hi,
>
> I have a nova setup on a single server with VLAN Network mode. I followed the online instructions for setup and opened port 22 for the nova network. I can start a new instance and ssh into it through it's private ip just fine. I have a block of 10 public ip addresses and added them to the floating ip list with no errors. I start a new virtual instance and associate one of the public addresses to the new instance. If I try to ssh into the instance through the public address, I get a 'no route to host' error. Accessing the instance through the private ip still works as normal. I can't find anything unusual in syslog. I'm guessing that I'm missing a simple step. Is this the proper way to have my instances accessible (with public ips) outside the private nova network on VLAN network mode?
>
> Would flat networking mode work better for this, or is there a simple way to have my public ip addresses dynamically assigned to instances using the 'nova-manage network create' command? Thanks!
>
>
>
>
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
Bryan Walker (bwalker7125) said :
#2

Hi Vish,

      I moved my key to another host and my network and tried to ssh into the virtual machine through the public ip address and still got the no route to host error (port 22 is open on both hosts). However, more research has led me to believe that this could be a routing issue in my setup. My openstack host is on the 170.252.179.xxx space, while the floating ip is in the 170.252.178.xxx space. thus, I don't think the host even listens to the broadcast space for the floating public ip. Does this sound like a reasonable hypothesis? I'll assign a new address to my host and let you know what happens. Thanks!

Revision history for this message
Bryan Walker (bwalker7125) said :
#3

Nope, I changed the address of the host to the 178 range, and I'm still having the same issue.

Revision history for this message
Bryan Walker (bwalker7125) said :
#4

I figured it out. I needed to add '--public_interface=vlan100' in nova.conf. thanks.