Ask Your Question
0

Why does my instance not receive a DHCP address? [closed]

asked 2014-08-25 08:19:24 -0500

mickt gravatar image

updated 2014-08-25 11:53:19 -0500

dbaxps gravatar image

I created a CentOS6.4 image and launched an instance from it. The instance did not receive an IP address via DHCP though it did show an IP against the instance in the dashboard. What do I need to set up for DHCP to work? I configured a static IP, 172.16.100.2 on the instance and have external connectivity so the network is good.

OpenStack Icehouse on Ubuntu 14.04 LTS

qa-openstack01~# nova-manage service list
Binary           Host                                 Zone             Status     State Updated_At
nova-consoleauth qa-openstack01                       internal         enabled    :-)   2014-08-25 13:11:47
nova-conductor   qa-openstack01                       internal         enabled    :-)   2014-08-25 13:11:51
nova-network     qa-openstack01                       internal         enabled    :-)   2014-08-25 13:11:55
nova-cert        qa-openstack01                       internal         enabled    :-)   2014-08-25 13:11:48
nova-scheduler   qa-openstack01                       internal         enabled    :-)   2014-08-25 13:11:48
nova-compute     qa-openstack01                       nova             enabled    :-)   2014-08-25 13:11:47

qa-openstack01~# nova-manage network list
id      IPv4                    IPv6            start address   DNS1            DNS2            VlanID         project          uuid
1       172.16.100.0/24         None            172.16.100.2    8.8.4.4         None            None           None             73d38e7c-1ef1-4d1a-b287-0d684643a928

qa-openstack01~# ifconfig
br100     Link encap:Ethernet  HWaddr 00:22:64:9b:38:46
          inet addr:172.16.100.1  Bcast:172.16.100.255  Mask:255.255.255.0
          inet6 addr: fe80::b0a6:27ff:fefa:1ece/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:24336 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12717 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1643645 (1.6 MB)  TX bytes:1772781 (1.7 MB)

eth0      Link encap:Ethernet  HWaddr 00:22:64:9b:38:46
          inet6 addr: fe80::222:64ff:fe9b:3846/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14997576 errors:0 dropped:135 overruns:0 frame:0
          TX packets:1496071 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:22699079975 (22.6 GB)  TX bytes:108407007 (108.4 MB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1256344 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1256344 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:21614240521 (21.6 GB)  TX bytes:21614240521 (21.6 GB)

virbr0    Link encap:Ethernet  HWaddr ce:54:db:b2:ae:07
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

vnet0     Link encap:Ethernet  HWaddr fe:16:3e:32:54:3d
          inet6 addr: fe80::fc16:3eff:fe32:543d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:428 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13829 errors:0 ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by mickt
close date 2014-09-01 04:24:41.483974

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-09-01 04:17:16 -0500

mickt gravatar image

I figured out what the issue was; a simple user error as it turned out. I am installing a custom OS for our S/W and it does not include dhcp client as we do not install what we don't require or use. I include the dhclient RPM and it is fine.

edit flag offensive delete link more
1

answered 2014-08-26 01:40:33 -0500

This could be because of multiple issues:

  1. The VLAN range does not match the VLAN assigned to the VM.
  2. The security groups rules are filtering out all DHCP responses to the VM.
  3. If compute node and controller (where the DHCP server is running) are two separate machines, communication between them via the data link might be broken for whatever reasons.

To solve this, I suggest you run tcpdump on all interfaces from the VM to the physical port and see where the DHCP packet is being dropped. This should give us some clue on what could be the reason.

Also, please paste the contents of /etc/neutron/plugin.ini here. Would need to verify if the VLAN ranges are correct.

edit flag offensive delete link more

Comments

/etc/neutron/plugin.ini does not exist on the host.

I have configured three rules to allow all ICMP, TCP & UDP.

I created another instance so now there is one on each host. The IPs shown in the dashboard 172.16.100.2 & 172.16.100.3 but neither instance has DHCP assigned IP.

mickt gravatar imagemickt ( 2014-08-26 08:05:22 -0500 )edit

control node: root@qa-openstack01:~/.ssh# ps -ef |grep dhcp nobody 2897 1 0 09:56 ? 00:00:00 /usr/sbin/dnsmasq --strict-order --bind-interfaces --conf-file=/etc/nova/dnsmasq-nova.conf --pid-file=/var/lib/nova/networks/nova-br100.pid --listen-address=172.16.100.1 --except-interface=lo

mickt gravatar imagemickt ( 2014-08-26 08:05:59 -0500 )edit

I see no DHCP on any interface, host or instance.

mickt gravatar imagemickt ( 2014-08-26 08:49:16 -0500 )edit

Do you see the neutron-dhcp-agent running on the controller?

mithilarun gravatar imagemithilarun ( 2014-08-26 11:31:17 -0500 )edit

No, as far as I'm aware I'm using nova not neutron. I've only just started with openstack so I'm muddling my way through it so I could be mistaken. I listed the running nova services at the top. How can I configure neutron?

mickt gravatar imagemickt ( 2014-08-27 02:55:38 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-08-25 08:19:24 -0500

Seen: 1,941 times

Last updated: Sep 01 '14