This article is original. For more information, see the source.
Centos Nic configuration Summary
After downloading and installing centos6.5 and customizing the web server type, we started our centos journey. Why do we give up ubuntu? The reason is simple. After all, ubuntu is suitable for personal use, the server level is better than the red hat, and the ubuntu graphic interface is better than linux. Entertainment performance cannot be compared with windows. Besides, the use of graphic interfaces in linux also affects learning.
Analyze problems
After installing the system, first determine whether my VM can be connected to centos externally, and then use ifconfig to determine the ip address.
No Nic such as eth0 or eth1 is found.
After simple analysis and network search and consultation, the problem is identified as a nic.
Solve the problem
First, you need to change the NIC configuration to bridging.
In this way, the ip address in the virtual machine is separated from the ip address of the local machine.
Then you modify the configuration file for the NIC/etc/sysconfig/network-scripts // ifcfg-eth0
The modified ones are posted below.
The reason why eth1 is used here is that the network adapter is the second wireless network adapter.
From the perspective of windows ipconfig, the ip address of the local machine is 192.168.1.108, so our centos cannot be consistent with this.
Then, restart the network service.
Service network restart
Then you can ping it!