Learn about linux network settings under vm

Source: Internet
Author: User
Learn about linux network settings under vm-general Linux technology-Linux technology and application information. The following is a detailed description. Today, I learned how to set up a linux network on a virtual machine. I'm very happy. The following is my Method
First, check all network connections in windows XP. In addition to the original Nic, you should find that there are more Vmnet1 and Vmnet8. If you read the instruction, you should know that vmnet1 is the hostonly interface, while Vmnet8 is the NAT network interface. Here, we do not want to use the DHCP provided by VMWARE or its NAT, so we are concerned about VMnet1.
Before proceeding, let's talk about idea:
We will use the hostonly network interface to connect the VM and host, and then use the internet Connection Sharing in windows Xp (actually a simple route NAT) to allow the VM to access the Internet through the original Nic.
OK, let's go
(1) view the attributes of your Nic connected to the Internet, select the "advanced" tab, set to allow sharing, and set the allowed network interface to vmnet1.

(2) Check the attributes of your VMnet1 instance and the settings of the TCP/IP protocol. You can see that it has been automatically set to 192.168.0.1/255.255.255.0.

(3) The settings in windows are completed and transferred to the virtual machine running linux. Set the IP address of your eth0 to static (if no static IP address is selected during installation)

(4) The settings in windows are completed and transferred to the virtual machine running linux. Set the IP address of your eth0 to static (if static IP address is not selected during installation ).
Press the Red Hat icon-> system settings-> network (or other methods you know)
Ip: 192.168.0.2 (or other addresses on this network segment)
Netmask: 255.255.255.0
Default gateway: 192.168.0.1
Dns: enter your own DNS
Save settings. If you have not set the Host Name:
Cd/etc/sysconfig
Vi network
Edit HOSTNAME
Cd/etc
Vi hosts
Join:
192.168.0.2 yourhostname
Restart the service
Su
/Sbin/service network restart
(4) test
Gateway: ping 192.168.0.1
Dns: ping dnsserver

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.