2

When I start instances in openstack, they don't get DHCP leases. When I go into the instance and manually configure the IP that would have been assigned. Network flows fine.

With TCPDump, I can see DHCP Offers, but they seem to be ignored.

030
  • 5,901
  • 13
  • 68
  • 110
Kyle Brandt
  • 83,619
  • 74
  • 305
  • 448

1 Answers1

6

When using the vhost_net module, checksums are not added, so most dhcpclients seem to ignore the DHCP offers. In my case, Ubuntu 12.10 was the host operating system.

You can fix this with a mangle rule in iptables:

iptables -A POSTROUTING -t mangle -p udp --dport 68 -j CHECKSUM --checksum-fill

See: https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Host_Configuration_and_Guest_Installation_Guide/ch11s02.html for more details.

Kyle Brandt
  • 83,619
  • 74
  • 305
  • 448
  • From that link, it sounds like the problem is the dhcp client in the guest. What was the guest operating system that you were running? Also, since the link mentions that the problem doesn't exist with virtio, would setting libvirt_use_virtio_for_bridges=True have resolved the issue? – Lorin Hochstein Nov 14 '12 at 03:04
  • @LorinHochstein: I wasn't getting leases with the Cirros test image or the latest Ubuntu images, so I don't think this is limited to only a obscure guests. I do have libvirt_use_virtio_for_bridges=True so I don't think that would fix it. – Kyle Brandt Nov 14 '12 at 13:16
  • I'm very surprised to hear that this would break with Ubuntu 12.10 and cirros/latest ubuntu images, since I would guess that the Ubuntu packagers would test this scenario first. Can you send me some more details about your setup so I can try to replicate the issue and submit a bug report to the project? – Lorin Hochstein Nov 14 '12 at 16:07
  • @LorinHochstein: Seems to exist already at https://bugs.launchpad.net/nova/+bug/1029430 , someone was asking about this in #openstack too, which was why I posted this. See (https://github.com/mseknibilel/OpenStack-Folsom-Install-guide/issues/14) for more info on my setup. – Kyle Brandt Nov 14 '12 at 16:49
  • @Kyle - Thank you kind sir, my AIO OpenStack install was picking up IPs from my router instead of dnsmasq, took me ages to finally find your post, have +1'd! – Dan Higham Jan 01 '13 at 14:30
  • I hardly think this to be limited to Ubuntu or Cirros Images. Although Cirros has mentioned on their website that there are a few networking related issues when it comes to Virtualization. – dguitarbite May 21 '13 at 10:39