標籤:documents ip地址 網路連接 互連網 虛擬機器
2.NAT模式(網路位址轉譯模式)
NAT模式:使用NAT模式,就是讓虛擬系統藉助NAT(網路位址轉譯)功能,通過宿主機器所在的網路來訪問公網。也就是說使用NAT模式可以實現在虛擬系統裡訪問互連網。
例子:
①虛擬機器中編輯網路模式,選擇NAT模式:
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/47/CD/wKiom1P_zqzCp89cAAI3J8Xopj8692.jpg" title="z111111111111111.jpg" width="400" height="360" border="0" hspace="0" vspace="0" style="width:400px;height:360px;" alt="wKiom1P_zqzCp89cAAI3J8Xopj8692.jpg" />
②虛擬機器中設定為網路連接的IP地址設定為自動獲得:
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M01/47/CF/wKioL1P_0QHRtcEMAAFkN9QYX-c581.jpg" title="z1111111111111111.jpg" width="400" height="440" border="0" hspace="0" vspace="0" style="width:400px;height:440px;" alt="wKioL1P_0QHRtcEMAAFkN9QYX-c581.jpg" />
③宿主機的VMnet8的網路連接IP設定為:
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/47/CF/wKioL1P_0oCTWxcYAAIIl3iaBJU171.jpg" title="z.jpg" width="300" height="370" border="0" hspace="0" vspace="0" style="width:300px;height:370px;" alt="wKioL1P_0oCTWxcYAAIIl3iaBJU171.jpg" />
④網路拓撲圖:
虛擬機器通過VMnet8網卡與宿主機進行通訊,在VMnet8的兩端宿主機與虛擬機器在同一網段。
虛擬機器想要與外界網路進行通訊,通過VMnet8先與宿主機進行通訊,宿主機通過本地串連網卡 將訊息傳遞出去,保證了虛擬機器可以與外界進行通訊。
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/47/CD/wKiom1P_0vKA9Q_fAADvCw8pPZA553.jpg" title="n.jpg" width="400" height="263" border="0" hspace="0" vspace="0" style="width:400px;height:263px;" alt="wKiom1P_0vKA9Q_fAADvCw8pPZA553.jpg" />
⑤測試:
在虛擬機器中ping宿主機:
C:\Documents and Settings\Administrator>ping 192.168.188.1Pinging 192.168.188.1 with 32 bytes of data:Reply from 192.168.188.1: bytes=32 time<1ms TTL=64Reply from 192.168.188.1: bytes=32 time<1ms TTL=64Reply from 192.168.188.1: bytes=32 time<1ms TTL=64Reply from 192.168.188.1: bytes=32 time<1ms TTL=64Ping statistics for 192.168.188.1: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms
在虛擬中ping外界網路:
C:\Documents and Settings\Administrator>ping 172.16.1.32Pinging 172.16.1.32 with 32 bytes of data:Reply from 172.16.1.32: bytes=32 time=3ms TTL=128Reply from 172.16.1.32: bytes=32 time=1ms TTL=128Reply from 172.16.1.32: bytes=32 time=1ms TTL=128Reply from 172.16.1.32: bytes=32 time=1ms TTL=128Ping statistics for 172.16.1.32: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 1ms, Maximum = 3ms, Average = 1ms
本文出自 “李雲娜----IT女將” 部落格,請務必保留此出處http://liyunna.blog.51cto.com/9151125/1546400
VMware中的三種網路模式-----NAT模式