Ask Your Question

Instance is not getting a static IP

asked 2013-07-28 10:57:53 -0500

nilanjan-r gravatar image


I have installed openstack grizzly with quantum as the networking. I have one controller and one compute node. The controller has all the quantum services running (openvswitch,l3,dhcp,metadata). I have created two networks (VLAN) one NET1 with a dhcp enabled subnet and one NET2 with a dhcp disabled subnet. So - NET1 -> subnet1 , dhcp_enabled=True NET2-> subnet2,dhcp_enabled=false Now my intention is to create a fedora instance which will be having two NICs - one in each network. To accomplish this I have created a port in NET2's subnet2 using following command

quantum port-create --fixed_ip subnet_id=<subnet2 id="">,ip_address= --name=<port name=""> <net2's id=""> and stored the port id in port_id variable.

Then I started the one instance with following command

nova boot --image <image_id> --flavor 2 --nic net-id=<net1 id=""> --nic port-id=<port id="" &gt;="" <vm="" name="">

After the booting process the instance has two NICs - eth0 and eth1. eth0 got the dhcp IP but eth1 did not get the fixed IP. In dashboard it shows both the IPs and

I am not sure why eth1 is not getting an IP. Can anybody help on this regard?

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted

answered 2013-07-30 07:10:49 -0500

nilanjan-r gravatar image

Hi Akhiro,

Thanks for your inputs. It is working now after enabling DHCP for subnet2. That solves my query.

edit flag offensive delete link more

answered 2013-07-30 07:11:33 -0500

nilanjan-r gravatar image

Thanks Akihiro Motoki, that solved my question.

edit flag offensive delete link more

answered 2013-07-29 04:25:45 -0500

aji-zqfan gravatar image

i'm not familar with fedora os, but for ubuntu os, the problem is same, and in my case the /etc/network/interfaces file not active the eth1, so you can check your os nic setting, if eth1 is not avtive, then active it and restart the network.

edit flag offensive delete link more

answered 2013-07-29 11:18:18 -0500

amotoki gravatar image

The reason that eth1 is not getting an IP is because DHCP is disable for subnet2.

"port-create" assigned an IP address for the quantum port at the database level. This means the port has a right to use the assigned IP address.

The same thing applied to Dashboard. Dashboard show what IP addresses are assigned at the database on Quantum (or Nova). It does not check if the IP address is configured inside VMs.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2013-07-28 10:57:53 -0500

Seen: 400 times

Last updated: Jul 30 '13