Troubleshoot virtual machine networking issues Linux VMware eth0

Source: Internet
Author: User

Virtual machine bad n more back, really let me installed to vomit blood, after two days of tossing finally figure out how to configure the static IP of the virtual machine.

Method:

1. Turn the virtual machine,--> Open edit, click Virtual Network Map, and click Restore Defaults in the lower-left corner of VMnet8

Wait for your network segment to be seen after the restore is complete

OK, finish.

2. Virtual machine settings, enter the virtual machine to open the terminal

cd/etc/sysconfig/net/network-scripts/

ll

Enter the above two command to see the diagram of the red box configuration, the following figure is my successful operation of the directory, before the Ifcfg-eth0 this file.

If you do not have that file, you can copy the Ifcfg-lo file, modify it, and Ifcfg-lo is the configuration of the local loopback IP

sudo cp Ifcfg-lo Ifcfg-eth0

sudo vim Ifcfg-eth0

Enter Eth0 to modify

255.255.255.0 is a subnet mask, and I don't know what to do, but I've been setting this up.

After Setup is complete, restart the network

Service Network restart

Ping www.baidu.com

See if the network is ping, ping

Set the hostname of Linux

sudo vim/etc/sysconfig/network

Set up virtual network mappings

sudo vim/etc/hosts

3. Configure the network map on Windows to set the Hosts file on Windows

C:\Windows\System32\drivers\etc\hosts

Open the Hosts file and add the static IP and host name to the last side

================================================================================

The 2nd step on the virtual machine settings can also use the mouse action () Right click on the small computer)

Follow the above steps to complete the setup, restart the network

Troubleshoot virtual machine networking issues Linux VMware eth0

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.