如何理解VMware虚拟机下网络
很多朋友都用vmware来测试不同的系统,我结合自己的经验谈一下对网络设置的理解,不对的地方请指正。 bridge: screen。width*0。7) {this。resized=true; this。 width=screen。width*0。7; this。style。cursor='hand'; this。alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this。 resized) {return true;} else {window。open('/l...全部
很多朋友都用vmware来测试不同的系统,我结合自己的经验谈一下对网络设置的理解,不对的地方请指正。 bridge: screen。width*0。7) {this。resized=true; this。
width=screen。width*0。7; this。style。cursor='hand'; this。alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this。
resized) {return true;} else {window。open('/linux/Files/2007-9/14/1013456554。gif');}" src="/linux/Files/2007-9/14/1013456554。
gif" onload="if(this。width>screen。width*0。7) {this。resized=true; this。width=screen。width*0。7; this。
alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 这种方式最简单,直接将虚拟网卡桥接到一个物理网卡上面,和linux下一个网卡 绑定两个不同地址类似,实际上是将网卡设置为混杂模式,从而达到侦听多个IP的能力。
在此种模式下,虚拟机内部的网卡(例如linux下的eth0)直接连到了物理网卡所在的网络上,可以想象为虚拟机和host机处于对等的地位,在网络关系上是平等的,没有谁在谁后面的问题。 使用这种方式很简单,前提是你可以得到1个以上的地址。
对于想进行种种网络实验的朋友 不太适合,因为你无法对虚拟机的网络进行控制,它直接出去了。 nat方式: screen。width*0。7) {this。resized=true; this。
width=screen。width*0。7; this。style。cursor='hand'; this。alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this。
resized) {return true;} else {window。open('/linux/Files/2007-9/14/1013458916。gif');}" src="/linux/Files/2007-9/14/1013458916。
gif" onload="if(this。width>screen。width*0。7) {this。resized=true; this。width=screen。width*0。7; this。
alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" border=0> 这种方式下host内部出现了一个虚拟的网卡vmnet8(默认情况下),如果你有过 做nat服务器的经验,这里的vmnet8就相当于连接到内网的网卡,而虚拟机本身则相当于运 行在内网上的机器,虚拟机内的网卡(eth0)则独立于vmnet8。
你会发现在这种方式下,vmware自带的dhcp会默认地加载到vmnet8界面上,这样虚拟机就可以使用dhcp服务。更为重要的是,vmware自带了nat服务,提供了从vmnet8到外网的地址转 换,所以这种情况是一个实实在在的nat服务器在运行,只不过是供虚拟机用的。
很显然,如果你只有一个外网地址,此种方式很合适。
完成 丢弃。收起