Virtual Machine Linux Internet problem

Source: Internet
Author: User

Three different settings for virtual machine networks in VMware

1, Bridge (bridged) (set up the internet is cumbersome, but in the embedded development of more useful)
2. NAT (Internet is relatively simple, but not for embedded development)
3. Host only (this mode only hosts can surf the Internet, the virtual machine cannot surf the internet)

How to 1:nat the virtual machine in Internet mode

Setup steps:
First step: on the right-hand side, select NAT mode on the network adapter, hardware, and Settings, menu bar virtual machine
Step Two: vi/etc/network/interfaces, open the file and edit the content into:
Auto Lo
Iface Lo inet Loopback

Auto Eth0
Iface eth0 inet DHCP
Address 192.168.1.141
Netmask 255.255.255.0
Gateway 192.168.1.1

Step three: perform/etc/init.d/networking restart restart NIC

Virtual machine access Mode 2: Bridging mode

First step: bridging. On the menu bar, settings, hardware-and network adapter, select Bridge mode on the right.
The second step: Bridge to connect to the Internet network card. On the menu bar edit, virtual network Editor, choose to Bridge to your own windows in the Internet network card (usually WiFi network or wired network)
Step three: set up DHCP and restart the NIC.
Vi/etc/network/interfaces, open the file and edit the content into:
Auto Lo
Iface Lo inet Loopback

Auto Eth0
Iface eth0 inet DHCP
Address 192.168.1.141
Netmask 255.255.255.0
Gateway 192.168.1.1

Save exit. The command line then executes the/etc/init.d/networking restart restart the NIC

Virtual Machine Linux Internet problem

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.