Ask Your Question

Revision history [back]

It depends on what you mean by "assign".

When you launch an instance on a network, Neutron assigns it a free IP address it picks from the subnet of that network. If the network has several subnets, the first subnet is used (I believe this is the subnet that was created first). How it determines the precise IP address is not documented and depends on the implementation.

Normally, the instance then uses DHCP to obtain its IP address. Neutron runs a DHCP server per network (dnsmasq by default). If the instance has cloud-init, I believe it can also be configured to obtain the IP address from the metadata service, but my knowledge about this is rather cloudy (no pun intended).

As far as I know, libvirt is not used for IP address allocation and acquisition, or network management in general.