Network solution not connected in VMware CentOS NAT mode

Source: Internet
Author: User

To put it simply, when you create a virtual machine, VMware gives you a virtual three ways to access the network: Bridge connection, NAT, using the host network, VMware 10 in the default corresponding vmnet0,vmnet1,vmnet8.

When the bridge connection mode is selected, the virtual machine at this time is equivalent to a separate computer on the network, which is equivalent to the physical machine, has an independent IP, can communicate with other hosts on the network, and can also be accessed by other hosts; When using a NAT connection, it can be understood that the virtual machine has established a private network through the physical machine. While the virtual machine is in this private network, the virtual machine can access other hosts or networks on the network through the physical machine one-way, but other hosts cannot access the virtual machine, and when the host network is used, the virtual machine can only interconnect with the virtual machine or physical machine, and the other hosts on the network cannot exchange visits.

Well, understanding how NAT works in VMware makes it easy to configure the network.

First you need to make sure that your virtual machine is using a NAT connection:
Network adapter->nat mode, settings, virtual machine

Using NAT, the general use of the automatic acquisition of IP mode, so only in the virtual machine to set the network to DHCP mode, if your physical machine is connected to the network, the virtual machine can be online.

However, because of the need to use a fixed IP for the virtual machine, set the following:
First you need to know the network number of the private network that VMware assigns to you,
Vmware-> Editor, Virtual network editor

All the current network connections in VMware will appear after the point is opened, the default in VMware newer version is WMnet8 NAT mode, check, the mode will appear, click Nat Settings

There are subnets, subnet masks, gateways and other information, it is best not to modify, direct use of the good, and then according to these to configure the virtual machine in the IP, subnet mask, gateway and other parameters. When configuring, be aware that the IP of the virtual machine is in the same network segment as the IP in WMnet8, such as the virtual machine IP can be configured to 192.168.239.10, the subnet mask, and the gateway is the same as in WMnet8.

When the virtual machine uses static IP, you need to configure DNS, if you know that the physical machine's DNS can be directly configured in the virtual machine, if you do not know, you can use Google public dns:8.8.8.8 or 8.8.4.4, insurance, can also be equipped with dual DNS or three DNS

Cases:
ipaddr=192.168.239.10
netmask=255.255.255.0
gateway=192.168.239.2
dns1=8.8.4.4
#DNS2 =8.8.8.8


Configure the parameters and restart the network.
/etc/rc.d/init.d/network restart

Network solution not connected in VMware CentOS NAT mode

Related Article

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.