VMware Funsion 修改vmnet1/vmnet8默认网络地址及DHCP地址

VMware Funsion 修改vmnet1/vmnet8默认网络地址及DHCP地址

 

 

http://blog.csdn.net/force_eagle/article/details/48418085

vmnet1 & vmnet8 的配置文件位于 "/Applications/Vmware Fusion.app/Contents/Library" , 可修改默认地址也,vmnet8 还可以添加映射端口。

VMware Funsion 版本为 8.

 

view plaincopy

 

  1. # cd /Library/Preferences/VMware\ Fusion  
  2. # cat networking  
  3. VERSION=1,0  
  4. answer VNET_1_DHCP yes  
  5. answer VNET_1_DHCP_CFG_HASH 6345810A7A91B075370FF0B472FA9334687AEB5A  
  6. answer VNET_1_HOSTONLY_NETMASK 255.255.255.0  
  7. answer VNET_1_HOSTONLY_SUBNET 192.168.173.0  
  8. answer VNET_1_VIRTUAL_ADAPTER yes  
  9. answer VNET_8_DHCP yes  
  10. answer VNET_8_DHCP_CFG_HASH 42662E369263BA0C7E405795C5A7F90C25D878FD  
  11. answer VNET_8_HOSTONLY_NETMASK 255.255.255.0  
  12. answer VNET_8_HOSTONLY_SUBNET 192.168.73.0  
  13. answer VNET_8_NAT yes  
  14. answer VNET_8_VIRTUAL_ADAPTER yes  
  15.   
  16. # cat vmnet1/dhcpd.conf  
  17. # Configuration file for ISC 2.0 vmnet-dhcpd operating on vmnet1.  
  18. #  
  19. # This file was automatically generated by the VMware configuration program.  
  20. # See Instructions below if you want to modify it.  
  21. #  
  22. # We set domain-name-servers to make some DHCP clients happy  
  23. # (dhclient as configured in SuSE, TurboLinux, etc.).  
  24. # We also supply a domain name to make pump (Red Hat 6.x) happy.  
  25. #  
  26.   
  27.   
  28.   
  29.   
  30. ###### VMNET DHCP Configuration. Start of "DO NOT MODIFY SECTION" #####  
  31. # Modification Instructions: This section of the configuration file contains  
  32. # information generated by the configuration program. Do not modify this  
  33. # section.  
  34. # You are free to modify everything else. Also, this section must start  
  35. # on a new line  
  36. # This file will get backed up with a different name in the same directory  
  37. # if this section is edited and you try to configure DHCP again.  
  38.   
  39.   
  40. # Written at: 09/12/2015 09:53:53  
  41. allow unknown-clients;  
  42. default-lease-time 1800;                # default is 30 minutes  
  43. max-lease-time 7200;                    # default is 2 hours  
  44.   
  45.   
  46. subnet 192.168.173.0 netmask 255.255.255.0 {  
  47.         range 192.168.173.128 192.168.173.254;  
  48.         option broadcast-address 192.168.173.255;  
  49.         option domain-name-servers 192.168.173.1;  
  50.         option domain-name localdomain;  
  51.         default-lease-time 1800;                # default is 30 minutes  
  52.         max-lease-time 7200;                    # default is 2 hours  
  53. }  
  54. host vmnet1 {  
  55.         hardware ethernet 00:50:56:C0:00:01;  
  56.         fixed-address 192.168.173.1;  
  57.         option domain-name-servers 0.0.0.0;  
  58.         option domain-name "";  
  59. }  
  60. ####### VMNET DHCP Configuration. End of "DO NOT MODIFY SECTION" #######  
  61.   
  62.   
  63. # cat vmnet8/dhcpd.conf  
  64. # Configuration file for ISC 2.0 vmnet-dhcpd operating on vmnet8.  
  65. #  
  66. # This file was automatically generated by the VMware configuration program.  
  67. # See Instructions below if you want to modify it.  
  68. #  
  69. # We set domain-name-servers to make some DHCP clients happy  
  70. # (dhclient as configured in SuSE, TurboLinux, etc.).  
  71. # We also supply a domain name to make pump (Red Hat 6.x) happy.  
  72. #  
  73.   
  74.   
  75.   
  76.   
  77. ###### VMNET DHCP Configuration. Start of "DO NOT MODIFY SECTION" #####  
  78. # Modification Instructions: This section of the configuration file contains  
  79. # information generated by the configuration program. Do not modify this  
  80. # section.  
  81. # You are free to modify everything else. Also, this section must start  
  82. # on a new line  
  83. # This file will get backed up with a different name in the same directory  
  84. # if this section is edited and you try to configure DHCP again.  
  85.   
  86.   
  87. # Written at: 09/12/2015 09:53:53  
  88. allow unknown-clients;  
  89. default-lease-time 1800;                # default is 30 minutes  
  90. max-lease-time 7200;                    # default is 2 hours  
  91.   
  92.   
  93. subnet 192.168.73.0 netmask 255.255.255.0 {  
  94.         range 192.168.73.128 192.168.73.254;  
  95.         option broadcast-address 192.168.73.255;  
  96.         option domain-name-servers 192.168.73.2;  
  97.         option domain-name localdomain;  
  98.         default-lease-time 1800;                # default is 30 minutes  
  99.         max-lease-time 7200;                    # default is 2 hours  
  100.         option netbios-name-servers 192.168.73.2;  
  101.         option routers 192.168.73.2;  
  102. }  
  103. host vmnet8 {  
  104.         hardware ethernet 00:50:56:C0:00:08;  
  105.         fixed-address 192.168.73.1;  
  106.         option domain-name-servers 0.0.0.0;  
  107.         option domain-name "";  
  108.         option routers 0.0.0.0;  
  109. }  
  110. ####### VMNET DHCP Configuration. End of "DO NOT MODIFY SECTION" #######  
  111.   
  112.   
  113.   
  114.   
  115. # cat vmnet8/nat.conf  
  116. # VMware NAT configuration file  
  117.   
  118.   
  119. [host]  
  120.   
  121.   
  122. # NAT gateway address  
  123. ip = 192.168.73.2  
  124. netmask = 255.255.255.0  
  125.   
  126. # VMnet device if not specified on command line  
  127. device = vmnet8  
  128.   
  129.   
  130. # Allow PORT/EPRT FTP commands (they need incoming TCP stream ...)  
  131. activeFTP = 1  
  132.   
  133.   
  134. # Allows the source to have any OUI.  Turn this on if you change the OUI  
  135. # in the MAC address of your virtual machines.  
  136. allowAnyOUI = 1  
  137.   
  138.   
  139. # Controls if (TCP) connections should be reset when the adapter they are  
  140. # bound to goes down  
  141. resetConnectionOnLinkDown = 1  
  142.   
  143.   
  144. # Controls if (TCP) connection should be reset when guest packet's destination  
  145. # is NAT's IP address  
  146. resetConnectionOnDestLocalHost = 1  
  147.   
  148.   
  149. # Controls if enable nat ipv6  
  150. natIp6Enable = 0  
  151.   
  152.   
  153. # Controls if enable nat ipv6  
  154. natIp6Prefix = fd15:4ba5:5a2b:1008::/64  
  155.   
  156.   
  157. [tcp]  
  158.   
  159.   
  160. # Value of timeout in TCP TIME_WAIT state, in seconds  
  161. timeWaitTimeout = 30  
  162.   
  163.   
  164. [udp]  
  165.   
  166.   
  167. # Timeout in seconds. Dynamically-created UDP mappings will purged if  
  168. # idle for this duration of time 0 = no timeout, default = 60; real  
  169. # value might be up to 100% longer  
  170. timeout = 60  
  171.   
  172.   
  173. [netbios]  
  174. # Timeout for NBNS queries.  
  175. nbnsTimeout = 2  
  176.   
  177.   
  178. # Number of retries for each NBNS query.  
  179. nbnsRetries = 3  
  180.   
  181.   
  182. # Timeout for NBDS queries.  
  183. nbdsTimeout = 3  
  184.   
  185.   
  186. [incomingtcp]  
  187.   
  188. # TCP 端口映射  
  189. # Use these with care - anyone can enter into your VM through these...  
  190. # The format and example are as follows:  
  191. #<external port number> = <VM's IP address>:<VM's port number>  
  192. #8080 = 172.16.3.128:80  
  193.   
  194.   
  195. [incomingudp]  
  196.   
  197. # UDP 端口映射  
  198. # UDP port forwarding example  
  199. #6000 = 172.16.3.0:6001  

 

修改后重启VMware Funsion网络即可

view plaincopy

 

  1. # /Applications/Vmware\ Fusion.app/Contents/Library/vmnet-cli -c  
  2. # /Applications/Vmware\ Fusion.app/Contents/Library/vmnet-cli -start  

 

posted on 2017-12-11 12:50  我是达菲君呀  阅读(2167)  评论(0编辑  收藏  举报

导航