Ask Your Question
4

How does Neutron DHCP decide to issue an IP?

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

yijian gravatar image

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

darragh-oreilly gravatar image

This is a continuation of question https://ask.openstack.org/en/question/7220/running-vm-inside-openstack-vm/ .

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
2

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

darragh-oreilly gravatar image

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

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
fa:16:3e:1e:63:66,172-241-0-2.openstacklocal,172.241.0.2
fa:16:3e:27:d6:30,172-241-0-3.openstacklocal,172.241.0.3

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

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

2 followers

Stats

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

Seen: 1,110 times

Last updated: Nov 21 '13