0

We've created a few instances on our MAAS+Juju+Openstack cloud. All these instances have been assigned private IPs but can access the internet via NAT. Only our MAAS cluster controller node has a public IP. Now how should we access these instances from the outside world?. Should we assign separate unique public IP address to each of these instances or is it possible to access them all without public IPs via NAT?

I understand there is a concept of associating a floating IP to an instance from a pool of IPs. But where shall I get the IP addresses that are required to be added to the pool?

1 Answer 1

1

Something like this will give you 5 floating ips to choose from, increase seq if you need more

neutron net-create --router:external=True --shared ext-net
neutron subnet-create --name ext-subnet --gateway 10.0.3.1 --allocation-pool start=10.0.3.200,end=10.0.3.254 --disable-dhcp ext-net 10.0.3.0/24

# create vm network
neutron net-create ubuntu-net

# if no router subnet pre-exists, we nat 10.0.4.x network here
neutron subnet-create --name ubuntu-subnet --gateway 10.0.4.1 --dns-nameserver 10.0.3.1 ubuntu-net 10.0.4.0/24
neutron router-create ubuntu-router
neutron router-interface-add ubuntu-router ubuntu-subnet
neutron router-gateway-set ubuntu-router ext-net
# create pool of floating ips
i=0
while [ $i -ne 5 ]; do
    neutron floatingip-create ext-net
i=$((i + 1))
done

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.