4 Replies Latest reply on Sep 9, 2019 3:50 AM by wohauser

    Host DHCP renewal causes guest network hiccup

    mateid Lurker

      Hi,

       

      I'm using Workstation Player 12.5.2 build-4638234 (latest?) on an Ubuntu 16.04 (4.4.0-57-generic), with an Ubuntu 16.04 (same) guest. The wifi network I'm connecting to has a small (5 mins) DHCP lease time. (This setting is out of my control.) As a result, the host renews the DHCP config quite often (2-5 mins), and every time it does, the guest experiences a small network disconnect. This causes, for instance, a web browser running on the guest to often report pages as unavailable. This is very annoying, and it's something that doesn't happen with a browser running on the host. I'm trying to understand if there's a way to avoid such "hiccups". Specifically, why does the guest network adapter have to go down&up for every such event?? Thanks!

       

      My detailed network settings are below:

       

      - The host uses a wifi connection, managed by NetworkManager, with DHCP.

       

      - The VM has 2 virtual network adapters, one NAT and one host-only. Both are set to use fixed IPs. The host-only adapter has no issues. Here is the config for the NAT adapter:

       

      # /etc/vmware/vmnet8/dhcpd/dhcpd.conf

      allow unknown-clients;
      default-lease-time 1800;                # default is 30 minutes
      max-lease-time 7200;                    # default is 2 hours
      subnet 192.168.71.0 netmask 255.255.255.0 {
              range 192.168.71.128 192.168.71.254;
              option broadcast-address 192.168.71.255;
              option domain-name-servers 192.168.71.2;
              option domain-name localdomain;
              default-lease-time 1800;                # default is 30 minutes
              max-lease-time 7200;                    # default is 2 hours
              option netbios-name-servers 192.168.71.2;
              option routers 192.168.71.2;
      }
      host vmnet8 {
              hardware ethernet 00:50:56:C0:00:08;
              fixed-address 192.168.71.1;
              option domain-name-servers 0.0.0.0;
              option domain-name "";
              option routers 0.0.0.0;
      }

       

      - In the guest, both adapters are set to use static IPs through NetworkManager:

       

      # /etc/NetworkManager/system-connections/NAT\ Network

      ...

      [ipv4]
      address1=192.168.71.10/24,192.168.71.2
      dns=192.168.71.2;
      dns-search=
      method=manual
      ...


      - Here is what I see in syslog during DHCP renewal, apart from other NM-related messages:


      On host:


      Jan  3 10:51:23 daemon.info vmnet-natd: RTM_NEWADDR: index:3, addr:192.168.100.183

      Jan  3 10:53:27 daemon.info vmnet-natd: RTM_NEWADDR: index:3, addr:192.168.100.183
      Jan  3 10:55:52 daemon.info vmnet-natd: RTM_NEWADDR: index:3, addr:192.168.100.183
      Jan  3 10:57:56 daemon.info vmnet-natd: RTM_NEWADDR
      : index:3, addr:192.168.100.183


      On guest:


      Jan  3 10:51:25 kern.info kernel:[286522.503468] e1000: ens33 NIC Link is Down
      Jan  3 10:51:31 kern.info kernel:[286528.515317] e1000: ens33 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
      Jan  3 10:53:29 kern.info kernel:[286646.747963] e1000: ens33 NIC Link is Down
      Jan  3 10:53:33 kern.info kernel:[286650.756319] e1000: ens33 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
      Jan  3 10:55:53 kern.info kernel:[286791.025117] e1000: ens33 NIC Link is Down
      Jan  3 10:55:57 kern.info kernel:[286795.059015] e1000: ens33 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
      Jan  3 10:57:57 kern.info kernel:[286915.279562] e1000: ens33 NIC Link is Down
      Jan  3 10:58:01 kern.info kernel:[286919.287363] e1000: ens33 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None



        • 1. Re: Host DHCP renewal causes guest network hiccup
          rpiercey Lurker

          I have the same issue with VMware Workstation 12.5.2 on OpenSuse 42.1. Host.

           

          When the host renews it's dhcp the guest vm connection drops:

           

          Feb 08 09:53:57 Linux NetworkManager[977]: <info>address 192.168.0.6
          Feb 08 09:53:57 Linux NetworkManager[977]: <info>plen 24 (255.255.255.0)
          Feb 08 09:53:57 Linux NetworkManager[977]: <info>gateway 192.168.0.1
          Feb 08 09:53:57 Linux NetworkManager[977]: <info>server identifier 192.168.0.1
          Feb 08 09:53:57 Linux NetworkManager[977]: <info>lease time 3600
          Feb 08 09:53:57 Linux NetworkManager[977]: <info>nameserver '24.222.0.94'
          Feb 08 09:53:57 Linux NetworkManager[977]: <info>nameserver '24.222.0.95'

          Feb 08 09:53:57 Linux NetworkManager[977]: <info>  (eth0): DHCPv4 state changed bound -> bound

          Feb 08 09:53:57 Linux vmnet-natd[1756]: RTM_NEWADDR: index:2, addr:192.168.0.6

          Feb 08 09:53:57 Linux dbus[849]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'

          Feb 08 09:53:57 Linux systemd[1]: Starting Network Manager Script Dispatcher Service...

          Feb 08 09:53:57 Linux dbus[849]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'

          Feb 08 09:53:57 Linux systemd[1]: Started Network Manager Script Dispatcher Service.

          Feb 08 09:53:57 Linux nm-dispatcher[8268]: Dispatching action 'dhcp4-change' for eth0

          Feb 08 09:53:57 Linux kernel: userif-3: sent link down event.

          Feb 08 09:53:57 Linux kernel: userif-3: sent link up event.

          Feb 08 09:54:04 Linux vmnet-dhcpd[1764]: DHCPREQUEST for 192.168.54.129 from 00:50:56:2f:04:66 via vmnet8

          Feb 08 09:54:04 Linux vmnet-dhcpd[1764]: DHCPACK on 192.168.54.129 to 00:50:56:2f:04:66 via vmnet8

           

          I have had to switch my IP to Static to get around this issue. My VPN connection on the Host doesn't drop when the IP is renewed.

           

          This has become an issue in later releases of Workstation/Player and Linux. I used to be able to run my VM for days and never had an issue. I just don't know which update caused the problem.

          • 2. Re: Host DHCP renewal causes guest network hiccup
            Gregarious Lurker

            I have a similar / same issue with eth0 connectivity on a Debian Jessie host c/w 3.16.0-4-amd64.

             

            eth0 network drops out every ten minutes when a new DHCP lease is started for vmnet8 (NAT).

            This occurs on both of my virtual machines - Linux Mint 17.3 'Rosa' using xfce 32-bit and a Windows 7 Ultimate VM.

            Downgrading from VMWare Workstation 12.5.5 to 12.5.0 build-4352439 did not resolve the issue.

            Neither did manually modifying the lease times in /etc/vmware/vmnet8/dhcpd/dhcpd.conf file (not recommended in any case).

             

            I have had no major issues with VMWare Workstation since my first purchase of Workstation 10 in January 2013.

            However, this issue may be a game changer for me.

             

            I would recommend to any party not to assume that VMWare Workstation 12 Pro is any better than an open source product (i.e. VirtualBox or KVM) just because it is a commercial product.

            • 3. Re: Host DHCP renewal causes guest network hiccup
              Hico Novice

              Issue still there as of 12.5.7

              AFAICT, DHCP renewal of the current IP, when the IP stays the same, should go without disturbing anything on the system. Instead we get

              NetworkManager[924]: <info>  [1507704323.1752] dhcp4 (enp0s31f6): state changed bound -> bound

              The "change from bound to bound" should be a dummy operation, yet it is not - vmplayer drops and renegotiates its guest connections.

              As RENEW happens at half expiry, on networks with 10m or even 1h leases this gets really bad.

              • 4. Re: Host DHCP renewal causes guest network hiccup
                wohauser Lurker

                Had some similar problems, when starting a docker image while running a VM in VMware workstation at the same time.

                 

                This solved my problems.

                Fixing VMWare Player on Linux when using DHCP addresses

                 

                Anyway, this should be fixed in VMware player and workstation!