Hello,

I have a problem which is that some of my VMs are loosing there IP addresses from time to time. What I saw in the log is when this VM loose its IP address there are DHCPREQUEST send from the VM by dhclient and the server responded only 50 minutes later !

Any help, advise on how to debug would be welcome.

Thanks in advance
Patrick

Here after is an extract from the log

July 1st 2016, 05:08:46.156dnsmasq-dhcp
DHCPREQUEST(virbr1) 10.10.0.10 52:54:10:7d:3a:3f
10.10.0.10

July 1st 2016, 05:08:46.156dnsmasq-dhcp
DHCPACK(virbr1) 10.10.0.10 52:54:10:7d:3a:3f mail
10.10.0.10

July 1st 2016, 05:08:32.003
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:08:18.274
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:08:03.793
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:07:54.504
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:07:40.642
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:07:22.978
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:07:04.180
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:06:45.233
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:06:30.417
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:06:15.304
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:06:02.203
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:05:55.780
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:05:38.227
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:05:27.970
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:05:15.183
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:05:04.425
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:04:56.008
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:04:39.227
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:04:24.531
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:04:10.306
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:03:56.149
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:03:45.917
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:03:34.480
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:03:24.189
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:03:07.038
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:02:51.557
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:02:40.088
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:02:29.963
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:02:11.446
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:01:53.245
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:01:32.646
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:01:23.725
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:01:12.691
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:00:53.537
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:00:32.797
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:00:18.520
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 05:00:11.831
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:59:53.649
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:59:45.510
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:59:38.236
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:59:18.089
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:58:59.930
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:58:52.521
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:58:37.193
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:58:18.742
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:58:05.088
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:57:53.879
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:57:36.308
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:57:16.716
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:57:07.594
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:56:54.607
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:56:34.286
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:56:24.307
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:56:10.593
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:55:56.460
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:55:37.165
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:55:28.171
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:55:18.719
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:55:01.360
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:54:44.150
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:54:37.490
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:54:26.746
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:54:12.103
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:53:54.381
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:53:42.322
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:53:30.937
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:53:14.144
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:52:55.999
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:52:47.948
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:52:39.143
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:52:28.188
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:52:07.857
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:51:53.381
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:51:39.750
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:51:27.260
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:51:06.864
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:50:53.216
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:50:36.366
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:50:27.696
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:50:07.898
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:49:46.721
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:49:37.941
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:49:27.940
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:49:17.156
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:18:02.398
dhclient
bound to 10.10.0.10 -- renewal in 1614 seconds.
10.10.0.10

July 1st 2016, 04:18:02.260
dhclient
DHCPACK from 10.10.0.1 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 04:18:02.260dnsmasq-dhcp
DHCPACK(virbr1) 10.10.0.10 52:54:10:7d:3a:3f mail
10.10.0.10

July 1st 2016, 03:55:03.644
dhclient
bound to 10.10.0.10 -- renewal in 1379 seconds.
10.10.0.10

July 1st 2016, 03:55:02.777dnsmasq-dhcp
DHCPREQUEST(virbr1) 10.10.0.10 52:54:10:7d:3a:3f
10.10.0.10

July 1st 2016, 03:55:02.777
dhclient
DHCPACK from 10.10.0.1 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 03:55:02.777dnsmasq-dhcp
DHCPACK(virbr1) 10.10.0.10 52:54:10:7d:3a:3f mail
10.10.0.10

July 1st 2016, 03:55:02.776
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 03:31:20.065
dhclient
bound to 10.10.0.10 -- renewal in 1422 seconds.
10.10.0.10

July 1st 2016, 03:31:16.303
dhclient
DHCPACK from 10.10.0.1 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 03:31:16.225dnsmasq-dhcp
DHCPREQUEST(virbr1) 10.10.0.10 52:54:10:7d:3a:3f
10.10.0.10

July 1st 2016, 03:31:16.225
dhclient
DHCPREQUEST on eth0 to 10.10.0.1 port 67 (xid=0x3d60085a)
10.10.0.1

July 1st 2016, 03:31:16.225dnsmasq-dhcp
DHCPACK(virbr1) 10.10.0.10 52:54:10:7d:3a:3f mail
10.10.0.10





My setup is as followed


- Fedora 24 / Kernel 4.5.7
libvirt-daemon-driver-qemu-1.3.3.1-4.fc24.x86_64
libvirt-daemon-driver-nodedev-1.3.3.1-4.fc24.x86_64
libvirt-daemon-driver-secret-1.3.3.1-4.fc24.x86_64
libvirt-daemon-1.3.3.1-4.fc24.x86_64
libvirt-daemon-driver-storage-1.3.3.1-4.fc24.x86_64
libvirt-daemon-kvm-1.3.3.1-4.fc24.x86_64
libvirt-client-1.3.3.1-4.fc24.x86_64
libvirt-daemon-driver-interface-1.3.3.1-4.fc24.x86_64
libvirt-daemon-driver-nwfilter-1.3.3.1-4.fc24.x86_64
libvirt-daemon-config-network-1.3.3.1-4.fc24.x86_64
libvirt-daemon-driver-network-1.3.3.1-4.fc24.x86_64
libvirt-daemon-config-nwfilter-1.3.3.1-4.fc24.x86_64

- dnsmasq / 2.75-4



- Setup Network - hypervisor side.

There is a bridge configuration, as I have one VM listening to the Internet as well.

ifconfig
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9000
        net my ip address  netmask 255.255.255.0  broadcast my ip address
        inet6 fe80::d6ae:52ff:fec7:6694  prefixlen 64  scopeid 0x20<link>
        ether d4:ae:52:c7:66:94  txqueuelen 1000  (Ethernet)
        RX packets 1395299  bytes 291328394 (277.8 MiB)
        RX errors 0  dropped 66  overruns 0  frame 0
        TX packets 629001  bytes 777811458 (741.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9000
        inet6 fe80::d6ae:52ff:fec7:6694  prefixlen 64  scopeid 0x20<link>
        ether d4:ae:52:c7:66:94  txqueuelen 1000  (Ethernet)
        RX packets 7254272  bytes 2658859144 (2.4 GiB)
        RX errors 0  dropped 4923  overruns 0  frame 0
        TX packets 7302074  bytes 6556766298 (6.1 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


sudo iptables-save
[sudo] password for support:
# Generated by iptables-save v1.4.21 on Fri Jul  1 10:50:45 2016
*mangle
:PREROUTING ACCEPT [313661:46683942]
:INPUT ACCEPT [312868:46455263]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [204754:109339610]
:POSTROUTING ACCEPT [204754:109339610]
-A POSTROUTING -o virbr1 -p udp -m udp --dport 68 -j CHECKSUM --checksum-fill
COMMIT
# Completed on Fri Jul  1 10:50:45 2016
# Generated by iptables-save v1.4.21 on Fri Jul  1 10:50:45 2016
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [204361:109206834]
-A INPUT -i virbr1 -p udp -m udp --dport 53 -j ACCEPT
-A INPUT -i virbr1 -p tcp -m tcp --dport 53 -j ACCEPT
-A INPUT -i virbr1 -p udp -m udp --dport 67 -j ACCEPT
-A INPUT -i virbr1 -p tcp -m tcp --dport 67 -j ACCEPT
-A INPUT -i br0 -m set --match-set banned src -j DROP
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -i br0 -p tcp -m state --state NEW -m tcp --dport 23 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -i virbr1 -o virbr1 -j ACCEPT
-A FORWARD -o virbr1 -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -i virbr1 -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -m physdev --physdev-is-bridged -j ACCEPT
-A FORWARD -m set --match-set banned src -j DROP
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A OUTPUT -o virbr1 -p udp -m udp --dport 68 -j ACCEPT
COMMIT
# Completed on Fri Jul  1 10:50:45 2016

<network>
  <name>prd-private-lan</name>
  <uuid>255083f4-05a1-4a24-bc66-d3a3a9ab0724</uuid>
  <bridge name='virbr1' stp='off' delay='0'/>
  <mac address='52:54:00:08:1e:d8'/>
  <domain name='prd.pipiche.net'/>
  <dns>
    <forwarder addr='8.8.4.4'/>
    <forwarder addr='8.8.8.8'/>
  </dns>
  <ip address='10.10.0.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='10.10.0.128' end='10.10.0.254'/>
      <host mac='52:54:10:b6:35:ca' name='svc.prd.pipiche.net' ip='10.10.0.3'/>
      <host mac='52:54:10:32:88:ac' name='admin.prd.pipiche.net' ip='10.10.0.5'/>
      <host mac='52:54:10:5f:92:05' name='frontend.prd.pipiche.net' ip='10.10.0.7'/>
      <host mac='52:54:10:7d:3a:3f' name='mail.prd.pipiche.net' ip='10.10.0.10'/>
      <host mac='52:54:10:30:93:56' name='blog.prd.pipiche.net' ip='10.10.0.21'/>
      <host mac='52:54:10:78:c1:c2' name='cloud.prd.pipiche.net' ip='10.10.0.22'/>
      <host mac='52:54:10:64:00:21' name='web.prd.pipiche.net' ip='10.10.0.25'/>
      <host mac='52:54:10:5a:5f:63' name='dcroche.prd.pipiche.net' ip='10.10.0.26'/>
      <host mac='52:54:10:4c:b2:61' name='trac.prd.pipiche.net' ip='10.10.0.27'/>
      <host mac='52:54:10:62:de:5f' name='git.prd.pipiche.net' ip='10.10.0.62'/>
    </dhcp>
  </ip>
</network>


On the VM side, I’m using NetworkManager


ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.10.0.10  netmask 255.255.255.0  broadcast 10.10.0.255
        inet6 fe80::5054:10ff:fe7d:3a3f  prefixlen 64  scopeid 0x20<link>
        ether 52:54:10:7d:3a:3f  txqueuelen 1000  (Ethernet)
        RX packets 1368559  bytes 304901897 (290.7 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1219893  bytes 2157040102 (2.0 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


 sudo cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Generated by dracut initrd
HWADDR="52:54:10:7d:3a:3f"
DEVICE="eth0"
NAME="eth0"
ONBOOT=yes
NETBOOT=yes
IPV6INIT=no
BOOTPROTO=dhcp
TYPE=Ethernet
DNS1=10.10.0.1
DNS2=8.8.8.8
DNS3=8.8.4.4