VMware to configure the CentOS virtual machine as Host-only network mode

Source: Internet
Author: User
Tags centos
VMware To configure the CentOS virtual machine as Host-only network mode

Today suddenly want to host-only mode configuration process record down, also convenient to have the need of friends reference. This blog post is my first blog, poorly written and I hope you will forgive me.

Many of the host-only configuration tutorials on the Web are not very detailed, and I will present the entire configuration process in as much detail as possible.

The environment is:Win8.1 host +centos 6.7 virtual machines (VMware).


The first step is to configure the virtual NIC VMnet1 under VMware:

Windows system to open the network connection, you can see that there are two VMware-related virtual cards, one is VMnet1, one is VMnet8. VMnet8 is not used in Host-only network mode, so this network card can not be ignored. We should note that VMnet1 this network card, the virtual machine in the host-only mode, mainly rely on it to communicate with host hosts, so you must ensure that the network card is enabled.


Let's talk about configuration.

First we look at this computer's IP, that is, the computer's physical network card IP:


As you can see, my IP is 172.29.36.51, and the subnet mask is 255.255.255.0. We need to set the IP address of VMnet1 with the physical network card is not the same segment, because the host-only mode, host and virtual machine is completely independent, their connection can be imagined to rely on twisted pair connection, this step must be the main, If the VMNET1 is set to the same network segment as the physical network card of the host, the virtual machine is unable to ping the Tongsou host, which shows that the host is unable to reach and the packet loss rate is 100%.

As for some people do not know exactly how to distinguish the same network segment, I will be in the next Bovenri in detail. Today is a simple example: whether the same network segment requires both IP and subnet mask to determine, For example, my current IP is 172.29.36.51, the subnet mask is 255.255.255.0, the subnet mask is converted into binary number, the number of the front 1 indicates that the corresponding bit in IP is OK, and the number of 0 represents the variable number of digits. 255.255.255.0, there is a 0 below, which means that 51 paragraphs in IP172.29.36.51 are variable and the range is 0-255. In other words, 51 of this section has changed, still in the same network segment.

Next, open the VMnet1 property configuration:


You can see that I set its IP to 172.29.3.190, which is not in the same network segment as the physical NIC, or it can be set to other, not on the same network segment. As for DNS can not be filled out. When you are finished, click OK to complete the first step.


Step Two: Configure the virtual machine network

Switch to root before you do it, and then go to the network configuration file, as shown below:



Can see some configuration information, the following figure is I have configured, the main thing here is the back 5 lines.


IPADDR is set to any IP address in the same network segment as VMnet1

Netmask set to be consistent with VMnet1

Gateway set to VMNET1 IP address

Dns1,dns2 set to match the host physical network card

Bootproto if it is DHCP, change it to none or static to

Save the file after configuration, restart Network services can: Service network restart, so, the second step is completed, the virtual machine can ping with host, but could not ping Baidu.



The third step, open the network connection under Windows, the local physical network card to share to VMnet1, click OK, back to the virtual machine ping Baidu, found that can ping, so the third step to complete.




Well, host-only mode of configuration even if the finished, if there are no successful configuration of friends, you can leave a message below, I will reply as soon as possible.



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.