Ask Your Question
0

Associating dynamic public ip (NAT issue?)

asked 2011-08-24 15:36:29 -0500

islamsh gravatar image

I am using cactus on RHEL 6.1 and following the steps described here:

http://docs.openstack.org/cactus/openstack-compute/admin/content/associating-public-ip.html (http://docs.openstack.org/cactus/open...)

My goal is to have a pool of public ip addresses (which I own and currently free to use) and each instance get these as they boot up. I am using the FlatDHCP mode. I have two NIC:

eth0 is my private network which is in the 172.29 space.

--network_manager=nova.network.manager.FlatDHCPManager --flat_network_dhcp_start=10.0.1.2 --public_interface=eth1 --flat_interface=eth0

ip addr show br100

8: br100: <broadcast,multicast,up,lower_up> mtu 1500 qdisc noqueue state UNKNOWN link/ether e2:1f:f3:22:9c:8c brd ff:ff:ff:ff:ff:ff inet 10.0.1.1/24 brd 10.0.1.255 scope global br100 inet 172.29.200.26/22 brd 172.29.203.255 scope global br100 inet6 fe80::cdaf:99ff:fed7:fabe/64 scope link valid_lft forever preferred_lft forever

I am using these private ips for the vms:

nova-manage network list

network netmask start address DNS
10.0.1.0/24 255.255.255.0 10.0.1.2 8.8.4.4

I have 10 compute nodes where I can create instances and log in with the ssh key. That part is working fine. I can ping outside from these vm and ping the other vms in the 10.0.1.x network.

I have done the following for the public ip ( I am testing this with one ip at the moment).

I picked a free public ip: 149.165.159.xxx

nova-manage floating create 149.165.159.xxx/32

euca-associate-address -i i-00000173 149.165.159.xxx

my route table:

Destination Gateway Genmask Flags Metric Ref Use Iface 10.0.1.0 0.0.0.0 255.255.255.0 U 0 0 0 br100 149.165.146.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0 172.29.200.0 0.0.0.0 255.255.252.0 U 0 0 0 br100 169.254.0.0 0.0.0.0 255.255.0.0 U 1004 0 0 eth1 0.0.0.0 149.165.146.254 0.0.0.0 UG 0 0 0 eth1

I think this is the part, i am not configuring properly:

I tried this:

route add -host 149.165.159.xxx gw 149.165.146.xxx (eth1 address)

I think I maybe missing something here. Can someone clarify the settings for me? As I am using br100 for my vm which is with eth0, how I can get that to work with the public ips (I want these accessible from the outside world?)

thanks.

--s

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2011-08-24 18:55:17 -0500

islamsh gravatar image

ok. I made some progress. My eth1 address was in the 149.165.146.xxx range and I was trying to associate 149.165.159.xxx. When I picked another ip from the 146 subnet, I was able to ping and ssh from outside. I am still trying to figure out how to do this dynamically.

edit flag offensive delete link more
0

answered 2011-08-26 14:48:53 -0500

islamsh gravatar image

I haven't solved this yet but I think i will mark it solved now. As it seems, cactus does not support --auto_assign_floating_ip=true

I haven't had time to test a new diablo2 installation with RHEL 6.1. For the time being, i will probably just create a wrapper that will query the mysql table and assign a free floating ip.

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-08-24 15:36:29 -0500

Seen: 41 times

Last updated: Aug 26 '11