Describes how to implement communication between Linux and host machines.

Source: Internet
Author: User

Although many people are using Linux, many users may not be able to solve the Linux problem. Communication between Linux and the host machine is still quite common. So I studied the communication between Linux and the host machine and shared it with you here. I hope it will be useful to you.

1. cd/etc/sysconfig/network-scripts/

2. ls-a to view all files under the current directory; and catifcfg-eth0 to view ifcfg-eth0 content

3. there are only three simple lines in my ifcfg-eth0, there is no ip-related information, so edit its content, viifcfg-eth0, edit by insert, edit the content as follows the first three lines are originally there ):
DEVICE = eth0 ONBOOT = yesBOOTPROTO = dhcp IPADDR = 192.168.1.101
NETMASK = 255.255.255.0
NETWORK = 192.168.1.0
BROADCAST = 192.168.1.255
GATEWAY = 192.168.1.1
# GATEWAYDEV = eth0
Then ESC exits the editing status, shift: Enter wq to exit

4. in this case, you must restart the NIC: cd/etc/rc. d/init. d. Enter. /networkrestart: the following error message is displayed when you restart the NIC: "eth0 is deciding the ip address of eth0 on the pop-up page... failed: no link. Check the cable?" In this case, you can change BOOTPROTO = dhcp to BOOTPROTO = static, and then repeat the above steps.

5. ifconfig: the modified ip address is displayed.

6. ping192.168.1.100 (host machine ip address), OK!

7. Under the host machine, ping192.168.1.101 (VM ip address), OK!

In this way, you can implement communication between Linux and the host machine.

  1. How to configure an Open Suse Linux Server
  2. Comprehensive Analysis of Suse Linux passed the sun Test
  3. Preschool guidance: SUSE Linux
  4. Follow the summer project of Open Suse and Google Programming
  5. Describe how to install Jdk and mysql in Open SUSE

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.