VMware sets up centos Virtual Machine NAT networking

Source: Internet
Author: User

Author: Zhu MahaI/Category: FAQ font size: l m s

We installed hearbeat on the VMWare virtual host today. To use the latest version, we chose to compile and install it. During the compilation process, if you need to connect to a website with a wall to download files, you can only use VPN, but I am using a bridging network, so I cannot use the VPN of the real host, so I switched to Nat Network instead, some problems encountered during the setup process are recorded.
Real host settings:
I Installed VMware 8.0.1 in English.
1. First, check the VM Nat settings.
Open Vm, open edit-> Virtual Network editor in the menu, select vmnet8 in the pop-up window, and check whether DHCP is enabled and the subnet address and subnet mask are set,

2. Set the network mode of the VM to Nat.
3. Set the VMware network adapter vmnet8 Nic to automatically obtain the IP address and DNS.
4. Check whether the VMware DHCP service and VMWare NAT service of the real host are enabled.
Centos VM settings:
First, obtain the information of the VMware network adapter vmnet8 Nic In the real host. For example, run ipconfig in cmd in windows,

As shown in the figure, the IP address is 192.168.79.1 and the mask is 255.255.255.0. Therefore, we set the virtual machine's gateway to 192.168.79.2 and the subnet mask to 255.255.0.
Set the vm nic:

  1. VI/etc/sysconfig/network-script/ifcfg-eth0

Set:

  1. Bootproto = DHCP
  2. Gateway = 192.168.79.2
  3. Netmask = 255.255.255.0
  4. Onboot = Yes

Then restart the NIC:

  1. Service Network restart

Reprinted please indicate the source of the article: http://www.centos.bz/2012/02/vmware-deploy-centos-virtual-nat-connect/

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.