Description
Set up Floating IPs with OpenStack
Setup
Make sure that nova is configured with the correct public network interface. The default is eth0, but you can change it in /etc/nova/nova.conf
.
$> sudo bash -c 'echo "--public_interface=em1" >> /etc/nova/nova.conf' $> sudo service openstack-nova-network restart
How to test
Carve out a block of addresses to use for instances:
$> sudo nova-manage floating create 10.0.0.224/28
Allocate an address to use for an instance:
$> euca-allocate-address ADDRESS 10.0.0.224
Associate the allocated address with a running instance:
$> euca-associate-address -i i-00000006 10.0.0.224 ADDRESS 10.0.0.224 i-00000006
Expected Results
Verify that you can now ssh into the instance using the newly assigned address:
$> cd ~/novacreds $> ssh -i nova_key.priv root@10.0.0.224
If you would like, you can now disassociate and release the address assigned for testing.
$> euca-disassociate-address 10.0.0.224 ADDRESS 10.0.0.224 $> euca-release-address 10.0.0.224 ADDRESS 10.0.0.224