CentOS 6.5 Configuration network under VMware virtual machines

Source: Internet
Author: User

Using NAT mode

The virtual Machine network connection uses NAT mode, and the physical Machine network connection uses VMNET8.

Virtual machine settings inside--Network adapter, network connection Select NAT mode. (The IP address used to share the host)

Virtual Machine Menu Bar-edit-Virtual network editor, select Vmnet8 Nat mode,

1. On the bottom subnet, set the IP to 192.168.20.0 Subnet Mask 255.255.255.0

2. NAT setting inside Gateway IP is 192.168.20.2

3. Assigning IP addresses to virtual machines using the local DHCP service does not tick

Click Apply to exit when the settings are complete.

Physical machine network connection VMNET8 manually set the IP address 192.168.20.1 subnet mask 255.255.255.0

Gateway and DNS address 192.168.20.2 (that is, gateway address for Virtual machine NAT)

Edit the configuration file for the Linux NIC Eth0

#vi/etc/sysconfig/network-scripts/ifcfg-eth0

Enter the above command after entering, open the configuration file, use the arrow keys to move the cursor to the last line, press the letter key "O", enter the edit mode, input the following content:

ipaddr=192.168.20.3

netmask=255.255.255.0

gateway=192.168.20.2

In addition, the cursor moves to the line "Onboot=no" and changes to Onboot=yes

"Bootproto=dhcp", Change to Bootproto=none

When you're done, press the ESC key in the upper-left corner of the keyboard, enter: Wq in the lower left of the screen, enter to save the configuration file.

Set DNS address, Run command #vi/etc/resolv.conf

Move cursor to blank line, press "O" key, enter nameserver 192.168.20.2 exit Press ESC, enter: WQ carriage return to save profile.

Restart Network Service #service networks restart

After reboot #ifconfig view the configured IP address, the physical machine ping this address test is able to pass.

CentOS 6.5 Configuration network under VMware virtual machines

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.