how does dhcp-agent work?

Asked by Lingxian Kong

Hi all:

in Folsom, when a port is created, I saw an ip address is allocated from subnet of the network(assume that there is only a subnet on the network) on which the port is created.

When an instance is created with this port, nova-compute driver(e.g. LibvertDriver) use its ip address directly to create *.xml for the instance, as below:
"
    <interface type="bridge">
      <mac address="fa:16:3e:ea:01:ed"/>
      <model type="virtio"/>
      <source bridge="qbre0a0b269-53"/>
      <filterref filter="nova-instance-instance-0000000d-fa163eea01ed">
        <parameter name="IP" value="10.10.11.5"/>
        <parameter name="DHCPSERVER" value="10.10.11.2"/>
        <parameter name="PROJNET" value="10.10.11.0"/>
        <parameter name="PROJMASK" value="255.255.255.0"/>
      </filterref>
    </interface>
"

what I want to know is how does the dhcp-agent work in creation process of instances? I cannot see there is any connection between the creation of instance and work of dhcp-agent.

Looking forward for answers, thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
neutron Edit question
Assignee:
No assignee Edit question
Solved by:
yong sheng gong
Solved:
Last query:
Last reply:
Revision history for this message
Best yong sheng gong (gongysh) said :
#1
Revision history for this message
Lingxian Kong (kong) said :
#2

to gong yong sheng :

thanks very much, I got it!

Revision history for this message
Lingxian Kong (kong) said :
#3

Thanks yong sheng gong, that solved my question.