Solve the unable to ping under win-CentOS VM virtual machine system


Description: company moves to new offices, computers after using xshell failed to connect to the CentOS VM system is always connected, and taking into account thecompany moved to the situation, I first suspected IP issues, and then execute ifconfig to find CentOS VM IP, get Windows to execute the ping command in the Middle,and sure enough, ping does not work.
Analysis reasons: because I contact Linux not many, usually also on development of when, took to Dang test with, so, face this problem, I himself is can’t analysis out reasons of, then, Baidu about, users to out of reasons is: IP variable has zhihou, VM of IP and Windows of IP may no in with a network paragraph Shang, so led to connection failed.
Solution: know why IP is not on the same network segment after solution is simple,it can be configured on the same network segment. For example my CentOS IP is192.168.1.110 and Windows IP is, I modify the CentOS IP is 192.168.10.X (x represents the number 0-255) on the line.
Windows execute ipconfig to find the IP of the Windows below, and then perform VI/etc/sysconfig/network-scripts/ifcfg-eth0 modifying VM network adapter related configuration, saved out and implement new network adapter configuration service network restart to take effect, and then execute the ping command into Windows again, test was successful.