CENTOS7 network configuration and ping in VMware virtual machines

Source: Internet
Author: User

After installing the VMware Virtual machine and installing the CENTOS7 system, we need to configure the network.

Because of the experimental environment, the need for fixed IP to facilitate the use of various environments.

We can use VMware's net mode for network configuration.

Below, we enter the configuration process:


One, configure VMware's net network mode

1. Close the virtual machines that currently require configuration changes.

2. Click Edit virtual machine settings-Network adapter--nat mode (N): Used to share the Jurassic IP address, OK.

650) this.width=650; "Src=" Https://s5.51cto.com/oss/201710/28/ad445bbf2b48f883895df60fdb60a742.png-wh_500x0-wm_3 -wmp_4-s_4022650243.png "title=" Tim20171028182824.png "alt=" Ad445bbf2b48f883895df60fdb60a742.png-wh_ "/>

3. In the VMware virtual machine taskbar--edit (E)--The Virtual network editor--vmnet8--uncheck the use of local DHCP service to assign IP addresses to virtual machines #因为我们需要固定IP, so you cannot directly assign a virtual machine to the ip--subnet IP instead: 192.168.137.0 #因为此网段为window分配给VMnet8的网段--Determine

650) this.width=650; "Src=" Https://s2.51cto.com/oss/201710/28/f1bd8d7724e8bb08fcd3ab442437c531.png-wh_500x0-wm_3 -wmp_4-s_144411794.png "title=" Tim20171028184534.png "alt=" F1bd8d7724e8bb08fcd3ab442437c531.png-wh_ "/>


Second, configure the Windows Internet Connection Sharing

1, My Computer--blank right Button Properties--Control Panel home--Network and internet--network and Sharing Center--Change adapter settings--Ethernet (or local network) right-click Properties--Share--Select Home network Connection (H): VMware Networks Adapter vmnet8--check: Allow other network users to connect through this computer's Internet connection--determine

650) this.width=650; "Src=" Https://s2.51cto.com/oss/201710/28/1e57b5f7066c0accf566b0bbbb4d5d04.png-wh_500x0-wm_3 -wmp_4-s_768567238.png "title=" Tim20171028183810.png "alt=" 1e57b5f7066c0accf566b0bbbb4d5d04.png-wh_ "/>



Third, manually configure the network configuration in the CENTOS7 system

Cd/etc/sysconfig/network-scriptsls #找到当前网络配置文件为ifcfg-ens32sudo Vim ifcfg-ens32# Modify the following network configuration Bootproto=static # Obtain the ipipaddr=192.168.137.7 #IP地址为192 statically. 168.137.7 (within the 192.168.137.0 segment) netmask=255.255.255.0gateway=192.168.137.1 # The gateway needs to be dns1=192.168.137.1onboot=yes with IP within a network segment #开机启动网卡: Wq #保存退出

650) this.width=650; "Src=" Https://s3.51cto.com/oss/201710/28/b93bc0a0446a87c0857848467a900468.png-wh_500x0-wm_3 -wmp_4-s_841934748.png "title=" Tim20171028185548.png "alt=" B93bc0a0446a87c0857848467a900468.png-wh_ "/>

sudo systemctl restart network #重启网卡sudo systemctl Enable network #开机启动网卡


Iv. Testing

Ifconfig #查看网卡信息ping www.baidu.com #能PING通就是联网成功

650) this.width=650; "Src=" Https://s2.51cto.com/oss/201710/28/a05712486f23dc5b5781dbc29136864a.png-wh_500x0-wm_3 -wmp_4-s_950996265.png "title=" Tim20171028185841.png "alt=" A05712486f23dc5b5781dbc29136864a.png-wh_ "/>


Five, frequently asked questions

1, occasionally window host, enter the CENTOS7 can not network

Bestlope: You can try to share the network--Allow other network users to connect through the computer's Internet connection to cancel the check after confirmation, check again, basically CENTOS7 will be able to network.

Specifically why, at present I do not know.

650) this.width=650; "Src=" Https://s2.51cto.com/oss/201710/28/1e57b5f7066c0accf566b0bbbb4d5d04.png-wh_500x0-wm_3 -wmp_4-s_768567238.png "title=" Tim20171028183810.png "alt=" 1e57b5f7066c0accf566b0bbbb4d5d04.png-wh_ "/>

CENTOS7 network configuration and ping in VMware virtual machines

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.