Solution to ping the vmvm CentOS System in win

Source: Internet
Author: User

Solution to ping the vmvm CentOS System in win
Incident Description: The company migrated the new site. After the computer was taken over, the centos system connected to the vm using xshell always failed to connect. Then, considering the new site migration situation, I first suspected that it was an ip address problem, then, execute ifconfig In the vm to find the centos ip address and run the ping command in the middle of windows. If you do not, the ping will fail.
Cause Analysis: because I don't have much access to linux, I usually use it for testing. Therefore, in the face of this problem, I cannot analyze the cause myself, baidu: After the ip address is changed, the vm ip address and windows ip address may not be in the same network segment, which leads to connection failure.
Solution: The cause is that the ip address is not in the same CIDR block, and the solution is simple. configure it to the same CIDR block. For example, if my centos ip address is 192.168.1.110 and windows ip address is 192.168.10.11, then I can change the centos ip address to 192.168.10.X (X represents a number ranging from 0.
RunIpconfigFind the windows ip address and executeVi/etc/sysconfig/network-scripts/ifcfg-eth0Modify the NIC configurations. Save and exit, and runService network restartThe new Nic configuration takes effect. Then, run the ping command again in windows to test the configuration.

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.