{"id":127663,"date":"2020-06-16T01:19:20","date_gmt":"2020-06-15T17:19:20","guid":{"rendered":"http:\/\/4563.org\/?p=127663"},"modified":"2020-06-16T01:19:20","modified_gmt":"2020-06-15T17:19:20","slug":"vmware-fusion-nat-%e6%97%a0%e6%b3%95%e8%bf%9e%e7%bd%91%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=127663","title":{"rendered":"VMware Fusion NAT \u65e0\u6cd5\u8fde\u7f51\u89e3\u51b3\u65b9\u6848"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  VMware Fusion NAT \u65e0\u6cd5\u8fde\u7f51\u89e3\u51b3\u65b9\u6848               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wsgzao <\/span>  <span><i><\/i> 8<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<h2>\u524d\u8a00<\/h2>\n<p>\u56e0\u4e3a\u5728 macOS \u4e0b\u5b9e\u5728\u4ecd\u53d7\u4e0d\u4e86 VirtualBox \u7684\u5404\u79cd Bug \u548c\u4f4e\u6027\u80fd\uff0c\u8f6c\u6295\u719f\u6089\u7684 VMware Fusion \u540e\u672c\u6765\u4e00\u76f4\u90fd\u633a\u7a33\u5b9a\u7684\uff0c\u4f46\u5728\u4e00\u6b21 Linked Clone \u94fe\u63a5\u514b\u9686\u4e2d\u53d1\u73b0 NAT \u7f51\u7edc\u4e0b VM \u53ef\u4ee5\u8bbf\u95ee\u5916\u7f51\u4f46\u5bbf\u4e3b\u673a\u548c\u865a\u62df\u673a\u4e4b\u95f4\u7684\u7f51\u7edc\u5374\u65e0\u6cd5 ping \u901a\uff0c\u67e5\u9605\u4e86\u975e\u5e38\u591a\u7684\u8d44\u6599\u4ecd\u7136\u65e0\u89e3\u5dee\u70b9\u5c31\u8981\u66b4\u529b\u9009\u62e9\u6dfb\u52a0\u4e00\u5757\u65b0\u7f51\u5361\u505a host-only\uff0c\u6700\u540e\u53d1\u73b0\u91cd\u542f\u4e0b VMware Fusion \u7f51\u7edc\u5c31\u6062\u590d\u4e86\uff0c\u8fd9\u5927\u6982\u5c31\u662f\u4f20\u8bf4\u4e2d\u7684\u65e0\u8111\u91cd\u542f\u89e3\u51b3\u4e00\u5207\u95ee\u9898\u3002<\/p>\n<h2>\u66f4\u65b0\u5386\u53f2<\/h2>\n<p>2020 \u5e74 06 \u6708 16 \u65e5 &#8211; \u521d\u7a3f<\/p>\n<p>\u9605\u8bfb\u539f\u6587 &#8211; https:\/\/wsgzao.github.io\/post\/vmware-fusion\/<\/p>\n<h2>\u95ee\u9898\u63cf\u8ff0<\/h2>\n<ol>\n<li>\u521b\u5efa 1 \u53f0 NAT \u7f51\u7edc\u7c7b\u578b\u7684 CentOS \u865a\u62df\u673a\uff0cIP \u4e3a\u9ed8\u8ba4 DHCP \u6bb5\u7684 192.168.184.128 \uff0c\u5bbf\u4e3b\u673a\u548c\u865a\u62df\u673a\u7f51\u7edc\u4e92\u901a\uff0c\u865a\u62df\u673a\u53ef\u4ee5\u6b63\u5e38\u8bbf\u95ee\u5916\u7f51<\/li>\n<li>\u521b\u5efa 1 \u53f0 Linked Clone \u94fe\u63a5\u514b\u9686 CentOS \u865a\u62df\u673a\uff0cIP \u4e3a 192.168.184.129 \uff0c\u5bbf\u4e3b\u673a\u548c\u865a\u62df\u673a\u7f51\u7edc\u65e0\u6cd5\u4e92\u901a\uff0c\u865a\u62df\u673a\u53ef\u4ee5\u6b63\u5e38\u8bbf\u95ee\u5916\u7f51<\/li>\n<\/ol>\n<h2>\u89e3\u51b3\u65b9\u6848<\/h2>\n<p>\u7f51\u4e0a\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n<ol>\n<li>\u68c0\u67e5 macOS \u662f\u5426\u8054\u7f51<\/li>\n<li>\u68c0\u67e5 macOS \u662f\u5426\u7ed9\u4e88 VMware \u6743\u9650<\/li>\n<li>\u91cd\u542f\u865a\u62df\u673a<\/li>\n<li>\u91cd\u542f VMware<\/li>\n<li>\u91cd\u542f macOS<\/li>\n<\/ol>\n<blockquote>\n<p>\u4ee5\u4e0a\u65b9\u6cd5\u901a\u901a\u65e0\u6548<\/p>\n<\/blockquote>\n<pre><code># \u91cd\u542f vmware network \u670d\u52a1\u89e3\u51b3\u95ee\u9898 sudo \/Applications\/VMware Fusion.app\/Contents\/Library\/vmnet-cli --stop sudo \/Applications\/VMware Fusion.app\/Contents\/Library\/vmnet-cli --start  <\/code><\/pre>\n<h2>\u4fee\u6539 VMware Fusion networking<\/h2>\n<h3>\u914d\u7f6e VMware Fusion \u865a\u62df\u7f51\u7edc\u914d\u7f6e<\/h3>\n<p>VMware Fusion \u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f1a\u5728 macOS \u4e2d\u65b0\u5efa\u4e24\u4e2a\u7f51\u5361\uff1avmnet1 \u4ee5\u53ca vmnet8 \uff08\u5728 <code>\/Library\/Preferences\/VMware Fusion<\/code> \u4e0b\u53ef\u4ee5\u770b\u5230\uff09<\/p>\n<ol>\n<li>vmnet1 \u662f Host-only \u6a21\u5f0f<\/li>\n<li>vmnet8 \u662f NAT \u6a21\u5f0f<\/li>\n<\/ol>\n<p>\u8fd9\u91cc\u4ec5\u5bf9\u7f51\u5361 vmnet8 \u8fdb\u884c\u4fee\u6539\uff08\u4fee\u6539\u8fc7\u7a0b\u4e2d\u9700\u5173\u95ed VMWare Fusion \uff09<\/p>\n<pre><code>sudo vi \/Library\/Preferences\/VMware Fusion\/networking  VERSION=1,0 answer VNET_1_DHCP yes answer VNET_1_DHCP_CFG_HASH E805FD2F642680617F0D09147C8D5C5ED962ED29 answer VNET_1_HOSTONLY_NETMASK 255.255.255.0 answer VNET_1_HOSTONLY_SUBNET 172.16.131.0 answer VNET_1_VIRTUAL_ADAPTER yes answer VNET_8_DHCP yes answer VNET_8_DHCP_CFG_HASH ABBB4D6B9DEC5639F2756A1991B197986AB5597E answer VNET_8_HOSTONLY_NETMASK 255.255.255.0 answer VNET_8_HOSTONLY_SUBNET 192.168.184.0 answer VNET_8_NAT yes answer VNET_8_VIRTUAL_ADAPTER yes add_bridge_mapping en0 2 <\/code><\/pre>\n<ol>\n<li>\u5c06 DHCP \u8bbe\u7f6e\u4e3a no\uff0c \u5373\u4f7f\u7528\u9759\u6001 IP \u3002 \u5c06 SUBNET \u4fee\u6539\u4e3a\u81ea\u5df1\u60f3\u7528\u7684\u7f51\u6bb5\uff0c\u6bd4\u5982\u81ea\u5b9a\u4e49 192.168.111.0 \u7f51\u6bb5<\/li>\n<li>\u4fdd\u5b58\u9000\u51fa<\/li>\n<\/ol>\n<p>\u6ce8\u610f\uff1a\u53ea\u4fee\u6539 vmnet8 \u7684\u914d\u7f6e\uff0c \u4e0d\u8981\u4fee\u6539 vmnet1 \u7684\u914d\u7f6e\u3002<\/p>\n<pre><code>sudo vi \/Library\/Preferences\/VMware Fusion\/vmnet8\/nat.conf  # VMware NAT configuration file # Manual editing of this file is not recommended. Using UI is preferred.  [host]  # NAT gateway address ip = 192.168.184.2 netmask = 255.255.255.0  # VMnet device if not specified on command line device = vmnet8  # Allow PORT\/EPRT FTP commands (they need incoming TCP stream ...) activeFTP = 1  # Allows the source to have any OUI.  Turn this on if you change the OUI # in the MAC address of your virtual machines. allowAnyOUI = 1  # Controls if (TCP) connections should be reset when the adapter they are # bound to goes down resetConnectionOnLinkDown = 1  # Controls if (TCP) connection should be reset when guest packet's destination # is NAT's IP address resetConnectionOnDestLocalHost = 1  # Controls if enable nat ipv6 natIp6Enable = 0  # Controls if enable nat ipv6 natIp6Prefix = fd15:4ba5:5a2b:1008::\/64  [tcp]  # Value of timeout in TCP TIME_WAIT state, in seconds timeWaitTimeout = 30  [udp]  # Timeout in seconds. Dynamically-created UDP mappings will purged if # idle for this duration of time 0 = no timeout, default = 60; real # value might be up to 100% longer timeout = 60  [netbios] # Timeout for NBNS queries. nbnsTimeout = 2  # Number of retries for each NBNS query. nbnsRetries = 3  # Timeout for NBDS queries. nbdsTimeout = 3  [incomingtcp]  # Use these with care - anyone can enter into your VM through these... # The format and example are as follows: #&lt;external port number&gt; = &lt;VM's IP address&gt;:&lt;VM's port number&gt; #8080 = 172.16.3.128:80  [incomingudp]  # UDP port forwarding example #6000 = 172.16.3.0:6001 <\/code><\/pre>\n<p>\u8bbe\u7f6e\u7f51\u5173\u4e3a 192.168.111.2\uff0c\u7f51\u5173\u7684 IP \u8981\u548c\u4e0a\u4e00\u6b65\u4e2d\u7684 IP \u4fdd\u6301\u7f51\u5173\u4e00\u81f4\uff0c\u81f3\u6b64 VMware Fusion \u7684\u914d\u7f6e\u5b8c\u6bd5\u3002<\/p>\n<h3>\u914d\u7f6e\u865a\u62df\u673a<\/h3>\n<ol>\n<li>\u5c06\u865a\u62df\u673a\u7f51\u7edc\u5207\u6362\u5230 NAT \u6a21\u5f0f<\/li>\n<li>\u6253\u5f00\u865a\u62df\u673a\uff0c\u914d\u7f6e\u865a\u62df\u673a\u7f51\u7edc\u914d\u7f6e\u4fe1\u606f<\/li>\n<\/ol>\n<p>vi \/etc\/sysconfig\/network-scripts\/ifcfg-ens33<\/p>\n<pre><code>TYPE=Ethernet BOOTPROTO=static DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=no NAME=ens33 DEVICE=ens33 ONBOOT=yes IPADDR=192.168.111.100 \u00a0 \u00a0 \u00a0\/\/ \u81ea\u5b9a\u4e49\u7684\u865a\u62df\u673a IP\uff0c \u9700\u4e0e VMware Fusion \u914d\u7f6e\u7684 IP \u5728\u540c\u4e00\u4e2a\u7f51\u6bb5\u4e0a GATEWAY=192.168.111.2 \u00a0 \u00a0 \u00a0 \/\/ \u914d\u7f6e\u7684\u7f51\u5173\u5730\u5740 NETMASK=255.255.255.0 \u00a0 \u00a0 \u00a0 \/\/ \u914d\u7f6e\u7684\u63a9\u7801 DNS1=114.114.114.114 \u00a0 \u00a0 \u00a0 \u00a0\/\/ macOS \u672c\u673a\u7684 DNS \u5730\u5740\u3002 \u7cfb\u7edf\u504f\u597d\u8bbe\u7f6e-&gt; \u7f51\u7edc -&gt; \u5728\u5de6\u4fa7\u9009\u62e9\u5f53\u524d\u4f7f\u7528\u7684\u7f51\u7edc\uff0c\u70b9\u51fb\u53f3\u4e0b\u89d2\u7684\u201c\u9ad8\u7ea7\u201d\u6309\u94ae -&gt; \u5207\u6362 Tab \u9875\uff0c\u53ef\u627e\u5230 DNS \u5730\u5740\u3002 DNS2=8.8.8.8 \u00a0 \u00a0 \u00a0 \u00a0        \/\/ \u540c\u4e0a  # \u4fdd\u5b58\u9000\u51fa\uff0c\u91cd\u542f\u7f51\u7edc\u670d\u52a1 systemctl restart network  <\/code><\/pre>\n<h2>\u53c2\u8003\u6587\u7ae0<\/h2>\n<p>Troubleshooting networking and internet connection issues in VMware Fusion (1016466)<\/p>\n<p>VMware Fusion \u4e2d\u7684\u7f51\u7edc\u548c Internet \u8fde\u63a5\u95ee\u9898\u6545\u969c\u6392\u9664 (1016466)<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>0<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>VMware Fusion NAT&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/127663"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=127663"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/127663\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=127663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=127663"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=127663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}