VMware Communities
bld
Contributor
Contributor

Permanently increase default and max DHCP lease times?

/Library/Preferences/VMware Fusion/vmnet8/dhcpd.conf

contains settings for default-lease-time and max-lease-time that are set to 1800 and 7200 seconds respectively.

On my Windows 7 VM, DHCP lease expirations cause enough of a network interruption to cause game connections to get lost and other problems. I'd like to significantly increase the lease times to mitigate the issue.

Whenever I try to modify the settings (yes. there is a big warning not to modify them), they get changed right back whenever I restart Fusion.

How can I make these changes permanent?

Tags (3)
0 Kudos
3 Replies
AKostur
Hot Shot
Hot Shot

Something else is going wrong here.  Under normal operations, the lease time is renewed at 1/2 way through the lease, so it should never expire.

0 Kudos
bld
Contributor
Contributor

Okay here is what I am seeing in the Windows event logs when this happens:

"The browser has forced an election on network \Device\NetBT_Tcpip_{...} because a master browser was stopped."

Most Googling around indicates the router firmware might be at fault -- but in this case, the router is VMWare Fusion itself, since I am using NAT networking.

0 Kudos
mudaltsov
Expert
Expert

Please take a look at Everytime my host network access changes, Fusion restarts the NAT guest networks - if your NAT network is getting reset too often because one of the host interface connections changes, you may want to disable the NAT link state propagation (although that may have other side effects since the guest will think it's always connected).

I didn't see this post until I already posted my reply on your other thread, Fusion 2.0.2/Win XP guest keeps dropping network connection but I figured it might be useful to post the same information about DHCP lease times in case other people look for it in the future (it matches the subject of this thread better):

The configuration files inside the vmnet8 and vmnet1 directories will get re-generated automatically using the settings in the /Library/Preferences/VMware Fusion/networking file. There is a command-line utility to modify the file, although it's not very well documented. Here are the commands that should be able to change the DHCP default and maximum lease times for vmnet8:

sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cfgcli setdhcpparam vmnet8 defleasetime <seconds>

sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cfgcli setdhcpparam vmnet8 maxleasetime <seconds>

Similarly, you can read the configuration parameters:

sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cfgcli getdhcpparam vmnet8 defleasetime

sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cfgcli getdhcpparam vmnet8 maxleasetime


The new configuration should take effect the next time Fusion is launched, or you can also manually apply it:

sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --configure

Afterwards, check the contents of vmnet8/dhcpd.conf to make sure the values were set accordingly.

0 Kudos