&http://www.aliyun.com/zixun/aggregation/37954.html ">NBSP; Implement communication between Linux and host hosts
1.cd/etc/sysconfig/network-scripts/
2.ls-a View all files in the current directory; and cat Ifcfg-eth0 view Ifcfg-eth0 content
3. My ifcfg-eth0 inside only a simple three lines, no IP-related information, so its content for editing, vi Ifcfg-eth0, press insert for editing, edited as follows (the first 3 lines are already there):
Then ESC exits the edit state, shift+: Enter Wq exit
4. Then use ifconfig to view IP or previous information, so you must restart the network card: CD/ETC/RC.D/INIT.D, input./network Restart Restart the network card The following error message appears:
"Pop-up interface eth0 is deciding eth0 IP information ... Failed: No link, check cable? ”
This problem, change the bootproto=dhcp to Bootproto=static, and then repeat the above steps.
5.ifconfig can see the modified IP information
6.ping 192.168.1.100 (host IP), ok!
7. Ping 192.168.1.101 (the IP of the VM) in the host, ok!
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.