Dagmawi Biru
2017-Oct-30 00:26 UTC
[libvirt-users] libvirt/dnsmasq is not adhering to static DHCP assignments
Given the following network configuration: ==========<network> <name>osc_mgmt</name> <uuid>d93fe709-14ae-4a0e-8989-aeaa8c76c513</uuid> <forward mode='route'/> <bridge name='osc_mgmt' stp='on' delay='0'/> <mac address='52:54:00:3f:fe:10'/> <ip address='192.168.80.254' netmask='255.255.255.0'> <dhcp> <range start='192.168.80.1' end='192.168.80.200'/> <host mac='52:54:00:2c:85:92' name='openstack-controller-00' ip='192.168.80.1'/> <host mac='52:54:00:e2:4b:25' name='openstack-database-00' ip='192.168.80.2'/> <host mac='52:54:00:50:91:04' name='openstack-keystone-00' ip='192.168.80.3'/> <host mac='52:54:00:fe:5b:36' name='openstack-rabbitmq-00' ip='192.168.80.7'/> <host mac='52:54:00:95:ca:bd' name='openstack-glance-00' ip='192.168.80.5'/> </dhcp> </ip> </network> When attempting to bring up the relevant interface in the virtual machine, I get an incorrect IP address assigned, different from the one I statically set up per the XML above. As you can see, the device with MAC '52:54:00:e2:4b:25' should really be getting 192.168.80.2, but what happens when we bring this interface up is this: ==========root@openstack-database-00:/home/osc# ifup ens11 Internet Systems Consortium DHCP Client 4.3.3 Copyright 2004-2015 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ Listening on LPF/ens11/... Sending on LPF/ens11/... Sending on Socket/fallback DHCPDISCOVER on ens11 to 255.255.255.255 port 67 interval 3 (xid=0x6769e42a) DHCPREQUEST of 192.168.80.27 on ens11 to 255.255.255.255 port 67 (xid=0x2ae46967) DHCPOFFER of 192.168.80.27 from 192.168.80.254 DHCPACK of 192.168.80.27 from 192.168.80.254 bound to 192.168.80.27 -- renewal in 1407 seconds. Some additional info about the VM and network it's attached to ========== [root@dragon dnsmasq]# virsh domiflist openstack-database-00 Interface Type Source Model MAC ------------------------------------------------------- vnet12 bridge br20 virtio 52:54:00:6c:ce:b9 vnet13 network VM_MGMT rtl8139 52:54:00:7d:ca:87 vnet14 network osc_mgmt rtl8139 52:54:00:e2:4b:25 [root@dragon dnsmasq]# virsh net-info osc_mgmt Name: osc_mgmt UUID: d93fe709-14ae-4a0e-8989-aeaa8c76c513 Active: yes Persistent: yes Autostart: yes Bridge: osc_mgmt ========== What's strange is that the first VM seems to work correctly and gets an assigned address of 192.168.80.1, but for some reason the others don't. Any ideas?
Yalan Zhang
2017-Oct-30 10:21 UTC
Re: [libvirt-users] libvirt/dnsmasq is not adhering to static DHCP assignments
Please check the dnsmasq hostsfile, should have all the records there: # cat /var/lib/libvirt/dnsmasq/osc_mgmt.hostsfile 52:54:00:2c:85:92,192.168.80.1,openstack-controller-00 52:54:00:e2:4b:25,192.168.80.2,openstack-database-00 52:54:00:50:91:04,192.168.80.3,openstack-keystone-00 52:54:00:fe:5b:36,192.168.80.7,openstack-rabbitmq-00 52:54:00:95:ca:bd,192.168.80.5,openstack-glance-00 ------- Best Regards, Yalan Zhang IRC: yalzhang Internal phone: 8389413 On Mon, Oct 30, 2017 at 8:26 AM, Dagmawi Biru <admin@dbvoid.com> wrote:> Given the following network configuration: > ==========> <network> > <name>osc_mgmt</name> > <uuid>d93fe709-14ae-4a0e-8989-aeaa8c76c513</uuid> > <forward mode='route'/> > <bridge name='osc_mgmt' stp='on' delay='0'/> > <mac address='52:54:00:3f:fe:10'/> > <ip address='192.168.80.254' netmask='255.255.255.0'> > <dhcp> > <range start='192.168.80.1' end='192.168.80.200'/> > <host mac='52:54:00:2c:85:92' name='openstack-controller-00' > ip='192.168.80.1'/> > <host mac='52:54:00:e2:4b:25' name='openstack-database-00' > ip='192.168.80.2'/> > <host mac='52:54:00:50:91:04' name='openstack-keystone-00' > ip='192.168.80.3'/> > <host mac='52:54:00:fe:5b:36' name='openstack-rabbitmq-00' > ip='192.168.80.7'/> > <host mac='52:54:00:95:ca:bd' name='openstack-glance-00' > ip='192.168.80.5'/> > </dhcp> > </ip> > </network> > > When attempting to bring up the relevant interface in the virtual machine, > I get an incorrect IP address assigned, different from the one I statically > set up per the XML above. As you can see, the device with MAC > '52:54:00:e2:4b:25' should really be getting 192.168.80.2, but what happens > when we bring this interface up is this: > > ==========> root@openstack-database-00:/home/osc# ifup ens11 > Internet Systems Consortium DHCP Client 4.3.3 > Copyright 2004-2015 Internet Systems Consortium. > All rights reserved. > For info, please visit https://www.isc.org/software/dhcp/ > > Listening on LPF/ens11/... > Sending on LPF/ens11/... > Sending on Socket/fallback > DHCPDISCOVER on ens11 to 255.255.255.255 port 67 interval 3 > (xid=0x6769e42a) > DHCPREQUEST of 192.168.80.27 on ens11 to 255.255.255.255 port 67 > (xid=0x2ae46967) > DHCPOFFER of 192.168.80.27 from 192.168.80.254 > DHCPACK of 192.168.80.27 from 192.168.80.254 > bound to 192.168.80.27 -- renewal in 1407 seconds. > > > Some additional info about the VM and network it's attached to > ==========> > [root@dragon dnsmasq]# virsh domiflist openstack-database-00 > Interface Type Source Model MAC > ------------------------------------------------------- > vnet12 bridge br20 virtio 52:54:00:6c:ce:b9 > vnet13 network VM_MGMT rtl8139 52:54:00:7d:ca:87 > vnet14 network osc_mgmt rtl8139 52:54:00:e2:4b:25 > > [root@dragon dnsmasq]# virsh net-info osc_mgmt > Name: osc_mgmt > UUID: d93fe709-14ae-4a0e-8989-aeaa8c76c513 > Active: yes > Persistent: yes > Autostart: yes > Bridge: osc_mgmt > ==========> > > What's strange is that the first VM seems to work correctly and gets an > assigned address of 192.168.80.1, but for some reason the others don't. Any > ideas? > > > > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users >
Dagmawi Biru
2017-Oct-31 05:27 UTC
Re: [libvirt-users] libvirt/dnsmasq is not adhering to static DHCP assignments
Hi, It looks like that's the issue: # cat /var/lib/libvirt/dnsmasq/osc_mgmt.hostsfile 52:54:00:2c:85:92,192.168.80.1,openstack-controller-00 But it makes me wonder...libvirt should be generating and managing this file right? Do I need to edit this myself or should libvirt be updating this file? If so then why isn't it? On Mon, Oct 30, 2017 at 5:21 AM, Yalan Zhang <yalzhang@redhat.com> wrote:> Please check the dnsmasq hostsfile, should have all the records there: > > # cat /var/lib/libvirt/dnsmasq/osc_mgmt.hostsfile > 52:54:00:2c:85:92,192.168.80.1,openstack-controller-00 > 52:54:00:e2:4b:25,192.168.80.2,openstack-database-00 > 52:54:00:50:91:04,192.168.80.3,openstack-keystone-00 > 52:54:00:fe:5b:36,192.168.80.7,openstack-rabbitmq-00 > 52:54:00:95:ca:bd,192.168.80.5,openstack-glance-00 > > > > > > ------- > Best Regards, > Yalan Zhang > IRC: yalzhang > Internal phone: 8389413 > > On Mon, Oct 30, 2017 at 8:26 AM, Dagmawi Biru <admin@dbvoid.com> wrote: > >> Given the following network configuration: >> ==========>> <network> >> <name>osc_mgmt</name> >> <uuid>d93fe709-14ae-4a0e-8989-aeaa8c76c513</uuid> >> <forward mode='route'/> >> <bridge name='osc_mgmt' stp='on' delay='0'/> >> <mac address='52:54:00:3f:fe:10'/> >> <ip address='192.168.80.254' netmask='255.255.255.0'> >> <dhcp> >> <range start='192.168.80.1' end='192.168.80.200'/> >> <host mac='52:54:00:2c:85:92' name='openstack-controller-00' >> ip='192.168.80.1'/> >> <host mac='52:54:00:e2:4b:25' name='openstack-database-00' >> ip='192.168.80.2'/> >> <host mac='52:54:00:50:91:04' name='openstack-keystone-00' >> ip='192.168.80.3'/> >> <host mac='52:54:00:fe:5b:36' name='openstack-rabbitmq-00' >> ip='192.168.80.7'/> >> <host mac='52:54:00:95:ca:bd' name='openstack-glance-00' >> ip='192.168.80.5'/> >> </dhcp> >> </ip> >> </network> >> >> When attempting to bring up the relevant interface in the virtual >> machine, I get an incorrect IP address assigned, different from the one I >> statically set up per the XML above. As you can see, the device with MAC >> '52:54:00:e2:4b:25' should really be getting 192.168.80.2, but what happens >> when we bring this interface up is this: >> >> ==========>> root@openstack-database-00:/home/osc# ifup ens11 >> Internet Systems Consortium DHCP Client 4.3.3 >> Copyright 2004-2015 Internet Systems Consortium. >> All rights reserved. >> For info, please visit https://www.isc.org/software/dhcp/ >> >> Listening on LPF/ens11/... >> Sending on LPF/ens11/... >> Sending on Socket/fallback >> DHCPDISCOVER on ens11 to 255.255.255.255 port 67 interval 3 >> (xid=0x6769e42a) >> DHCPREQUEST of 192.168.80.27 on ens11 to 255.255.255.255 port 67 >> (xid=0x2ae46967) >> DHCPOFFER of 192.168.80.27 from 192.168.80.254 >> DHCPACK of 192.168.80.27 from 192.168.80.254 >> bound to 192.168.80.27 -- renewal in 1407 seconds. >> >> >> Some additional info about the VM and network it's attached to >> ==========>> >> [root@dragon dnsmasq]# virsh domiflist openstack-database-00 >> Interface Type Source Model MAC >> ------------------------------------------------------- >> vnet12 bridge br20 virtio 52:54:00:6c:ce:b9 >> vnet13 network VM_MGMT rtl8139 52:54:00:7d:ca:87 >> vnet14 network osc_mgmt rtl8139 52:54:00:e2:4b:25 >> >> [root@dragon dnsmasq]# virsh net-info osc_mgmt >> Name: osc_mgmt >> UUID: d93fe709-14ae-4a0e-8989-aeaa8c76c513 >> Active: yes >> Persistent: yes >> Autostart: yes >> Bridge: osc_mgmt >> ==========>> >> >> What's strange is that the first VM seems to work correctly and gets an >> assigned address of 192.168.80.1, but for some reason the others don't. Any >> ideas? >> >> >> >> >> _______________________________________________ >> libvirt-users mailing list >> libvirt-users@redhat.com >> https://www.redhat.com/mailman/listinfo/libvirt-users >> > >
Reasonably Related Threads
- Re: libvirt/dnsmasq is not adhering to static DHCP assignments
- Re: libvirt/dnsmasq is not adhering to static DHCP assignments
- [PATCH net-next v12 5/5] virtio_net: Extend virtio to use VF datapath when available
- KVM Network (NetworkManager) broken
- wget: unable to resolve host address “xxxxx”