How does Neutron DHCP decide to issue an IP?

asked 2013-11-20 08:06:29 -0600

yijian gravatar image

updated 2013-11-21 03:43:36 -0600

darragh-oreilly gravatar image

This is a continuation of question .

So on top of OpenStack, I'm running debian. Inside debian, I'm trying to run a UML (user mode linux) based machine. Say the debian machine has multiple ethernet devices and UML::eth0 is bridged to debian::eth1. The problem I'm having is that UML::eth0 cannot get IP address. I can see that it's sending DHCP DISCOVERY but there is no response. If UML isn't running, eth1 gets a perfectly good IP so I know there are some DHCP server (the OpenStack v-switch) listening on the other side.

How does the DHCP server in OpenStack decide to issue IP or not?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-11-21 03:37:23 -0600

darragh-oreilly gravatar image

updated 2013-11-21 03:45:53 -0600

A mac and ip address is allocated to a neutron port when it is created. On the node running the neutron-dhcp-agent, there is a dnsmasq process for each neutron network, try: ps -ef | grep dnsmasq. You will see a path to a host file in the parameters. This file has the mac/ip pairs, eg:

root@netnode:/# cat /var/lib/quantum/dhcp/6b71dbb8-e91c-47f0-92c4-47882007115d/host

So dnsmasq uses the mac address of the dhcp request and this file to determine what ip address to hand out. If there is no mac in the file for the request, then it won't reply.

Your UML::eth0 probably has a different mac address than debian::eth1. Maybe you could try changing its mac to be the same as debian::eth1.

Also beware that implicit firewall rules only allow egress traffic with the neutron port's mac and ip addresses - run iptables-save on the compute node. You can run tcpdump -eni iface-name on the various interfaces in the path to see the mac addresses in the headers.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2013-11-20 08:06:29 -0600

Seen: 1,330 times

Last updated: Nov 21 '13