Three modes of network configuration under VMware

Source: Internet
Author: User

Errors and solutions in directory one network configuration
Introduction to the three modes of network configuration under two VMware
1. Bridging mode (bridged)
2. Network address conversion Mode (NAT)
3. Errors and solutions in host-only mode (HOST-ONLY) network configuration
  错误1: 安装好虚拟机之后一切正常,等过了一天再使用时发现获取不到IP地址。        错误分析:考虑虚拟机配置了NAT模式、Bridged模式和host-only模式。

The TCP/IP configuration information for the virtual system in NAT mode is provided by the DHCP server of the VMNET8 (NAT) virtual network, which cannot be modified manually, and the IP address of the virtual machine must be set to get automatically. That is, the host computer is the equivalent of a DHCP-enabled router, and the virtual machine is a real host in the intranet, through the router (host computer) DHCP dynamic access to network parameters. This speculation is related to the services of the host computer.
Resolution process: Task Manager--Details--services--turn on related services
Solution Result: guess correctly, after executing the above procedure, enter the virtual machine query Ip,ip address normal get.
Diagram Process:

Figure 1


Figure 2

Figure 3

Figure 4
Error 2: Actually still the same, I also want to know why the IP address is always with me, right, it is not normal to obtain the IP address @ [email protected]
Error analysis: With the last error experience, I thought again DHCP and other services did not open, excitedly want to point a few to return to normal. However, this is not the problem, Meng Circle. But, or to solve, I analyzed a few situations:
1, the suspicion of virtual network configuration problems, view the virtual network configuration of VMware, everything is OK, there is no such problem, negative.
2.

Introduction to three modes of network configuration under VMware
   因为学习需要安装了虚拟机,但却不懂网络的配置,导致出现了一些错误,在此总结网络配置的三种模式。   VMware提供了三种工作模式,分别为:桥接模式(Bridged)、网络地址转换模式(NAT)、仅主机模式(host-only)。安装好虚拟机以后,在网络连接里我们可以看到多了两块网卡。。

Figure 11 Bridging Mode(bridged) 1, Mode introduction
   桥接网络是指本地物理网卡和虚拟网卡通过VMnet0虚拟交换机进行桥接,物理网卡和虚拟网卡在拓扑图上处于同等地位,那么物理网卡和虚拟网卡就相当于处于同一个网段,虚拟交换机就相当于一台现实网络中的交换机,所以两个网卡的IP地址也要设置为同一网段。
2. Working principle
   配置成桥接网络连接模式的虚拟机就当作主机所在以太网的一部分,虚拟系统和宿主机器的关系,就像连接在同一个集线器(Hub)上的两台电脑,可以像主机一样访问以太网中的所有共享资源和网络连接,可以直接共享主机网络的互联网或接入线路访问互联网。主机与虚拟机之间,以及各虚拟机之间都可以互访。各虚拟机通过默认的VMnet0网卡与主机以太网连接,虚拟机间的虚拟网络为VMnet0,此时虚拟机就像局域网中的一个独立的物理机一样。   在这种模式下,VMWare虚拟出来的操作系统就像是局域网中的一台独立的主机,它可以访问网内任何一台机器。在桥接模式下,我们需要手工为虚拟系统配置IP地址、子网掩码,而且还要和宿主机器处于同一网段,这样虚拟系统才能和宿主机器进行通信。同时,由于这个虚拟系统是局域网中的一个独立的主机系统,那么就可以手工配置它的TCP/IP配置信息,以实现通过局域网的网关或路由器访问互联网。
3. Bridge mode diagram
Figure 22 Network Address Conversion Mode (NAT)1. Introduction to the Model
   NAT,是Network Address Translation的缩写,意即网络地址转换。NAT模式也是VMware创建虚拟机的默认网络连接模式。使用NAT模式网络连接时,VMware会在主机上建立单独的专用网络,用以在主机和虚拟机之间相互通信。虚拟机向外部网络发送的请求数据包裹,都会交由NAT网络适配器加上特殊标记并以主机的名义转发出去,外部网络返回的响应数据包裹,也是先由主机接收,然后交由NAT网络适配器根据特殊标记进行识别并转发给对应的虚拟机,因此,虚拟机在外部网络中不必具有自己的IP地址。从外部网络来看,虚拟机和主机在共享一个IP地址,默认情况下,外部网络终端也无法访问到虚拟机。   此外,在一台主机上只允许有一个NAT模式的虚拟网络。因此,同一台主机上的多个采用NAT模式网络连接的虚拟机也是可以相互访问的。
2. Working principle
   使用NAT模式,就是让虚拟系统借助NAT(网络地址转换)功能,通过宿主机器所在的网络来访问公网。NAT模式下的虚拟系统的TCP/IP配置信息是由VMnet8(NAT)虚拟网络的DHCP服务器提供的,无法进行手工修改,因此虚拟系统也就无法和本局域网中的其他真实主机进行通讯。         实际上,VMware Network Adepter VMnet8虚拟网卡的作用就是为主机和虚拟机的通信提供一个接口,即使主机的物理网卡被关闭,虚拟机仍然可以连接到Internet,但是主机和虚拟机之间就不能互访了。         在NAT模式下,宿主计算机相当于一台开启了DHCP功能的路由器,而虚拟机则是内网中的一台真实主机,通过路由器(宿主计算机)DHCP动态获得网络参数。因此在NAT模式下,虚拟机可以访问外部网络,但外部网络不可以访问虚拟机,因为虚拟机属于内网。
3, network address conversion mode diagram
Figure 33 host mode only (Host-only)1. Introduction to the Model
   仅主机模式,是一种比NAT模式更加封闭的的网络连接模式,它将创建完全包含在主机中的专用网络。仅主机模式的虚拟网络适配器仅对主机可见,并在虚拟机和主机系统之间提供网络连接。相对于NAT模式而言,仅主机模式不具备NAT功能,因此在默认情况下,使用仅主机模式网络连接的虚拟机无法连接到Internet。
2. Working principle
   在host-only模式中,所有的虚拟系统是可以相互通信的,但虚拟系统和真实的网络是被隔离开的。

In host-only mode, the virtual system and the host machine system can communicate with each other, which is equivalent to the two machines connected by twisted pair.
In host-only mode, the TCP/IP configuration information (such as IP address, gateway address, DNS server, etc.) of the virtual system is dynamically allocated by the DHCP server of the VMNET1 (host-only) virtual network.

3, only the host mode diagram


Figure 4

Three modes of network configuration under VMware

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.