Ask Your Question
0

Assigning public ip address to instance

asked 2011-02-02 05:51:42 -0600

bwalker7125 gravatar image

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!

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
1

answered 2011-02-02 06:24:48 -0600

vishvananda gravatar image

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/+q...

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).

edit flag offensive delete link more
0

answered 2011-02-02 21:14:43 -0600

bwalker7125 gravatar image

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

edit flag offensive delete link more
0

answered 2011-02-02 19:31:22 -0600

bwalker7125 gravatar image

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!
edit flag offensive delete link more
0

answered 2011-02-02 23:53:33 -0600

bwalker7125 gravatar image

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

edit flag offensive delete link more

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: 2011-02-02 05:51:42 -0600

Seen: 561 times

Last updated: Feb 02 '11