Access to the Internet in a Linux system under a virtual machine

Source: Internet
Author: User
Article Title: accessing the Internet in a Linux system under a virtual machine. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Originally, there was a bridge in the school, and adsl was used to access the internet at home. It took me one morning to get started. I used vista, so I had to worry about it every time.

Information I am looking:

1. view the attributes of the NIC connected to the Internet, select the "advanced" label, set to allow sharing, and set the allowed network interface to VMNET1

In my understanding, I want to share the network connections that can be used on your computer to set properties, and then let you select an allowed connection. In addition, there is an unavailable virtual connection. Check the icon and set the interface to allow

2. Let's take a look at the attributes of VMnet1, take a look at the TCP/IP protocol, and find that it has been automatically set to 192.168.0.1/255.255.255.0, set DNS: 192.168.0.1

Click the properties of the virtual connection and follow the above steps.

3. under VMWARE (not running a linux virtual machine), choose VM menu-> setting-> Ethernet-> Custom-> VMnet1. You must first start your virtual machine. The options are gray, unavailable. After the startup, click your linux system. If you do not start the system, the option is black. modify it. If it doesn't work, I will always be gray. I will start linux, and there will be an Nic icon in the lower right corner. Right-click to edit it as Custom-> VMnet1

4. virtual machines 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 Address: 192.168.0.2 (or other addresses on this network segment)

Netmask: 255.255.255.0

Default gateway: 192.168.0.1

DNS: 192.168.0.1

1. Change the ip address to 192.168.0.2 subnet mask 255.255.255.0.

# Ifconfig eth0 192.168.0.2 netmask 255.255.255.0

2. Change the gateway to 192.168.0.1.

# Route add default gw 192.168.0.254

3. Modify dns 192.168.0.1

Modify/etc/resolv. conf

That's it.

Related Article

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.