How VMware is Online

Source: Internet
Author: User
Tags nameserver

VMware Internet Settings

vmware Virtual machine Internet settings
Some of my experiences are as follows:
How do I enable the operating system in a VMware virtual machine to surf the internet?

First case:
Host using PPPoE dial-up Internet

Method One: Nat mode

1, first shut down the operating system in the virtual machine, back to the virtual machine main interface
Double-click "Ethernet" in the upper right of the main interface to bring up the "Network Adapter" dialog and select "NAT"

2, start the virtual machine operating system, set the IP for dynamic acquisition, which is obtained through DHCP.

at this time the operating system in the virtual machine with the host's IP, the host can access the Internet, then the virtual machine can.

method Two: Host-only way

1, first shut down the operating system in the virtual machine, back to the virtual machine main interface
Double-click "Ethernet" in the upper right of the main interface to bring up the "Network Adapter" dialog and select "Host-only"

2. Right-click the dial-up connection, open the PPPoE connection properties, select Advanced, and select Allow other network users to connect through this computer's Internet connection
In the Home Network drop-down box, select VMware Network Adapter VMnet1
The IP of the VMware network Adapter VMNET1 Virtual network card is automatically changed to 192.168.0.1
At this time ping 192.168.0.1 can pass.

3. Enter VMware to start the Linux operating system
With the Netconfig command.
Set IP to 192.168.0.2 (same network segment as virtual network card)
The gateway is the IP address of 192.168.0.1, the VMware network Adapter VMnet1 virtual network card
DNS is set to the DNS of the ISP, such as 61.147.37.1

4. Restart the network:
#service Network Restart

At this point, as long as the host dial-up Internet access, the virtual machine system can surf the Internet, and no longer dial

method Three: Bridge Way

this way, the virtual machine is closest to a real machine

1, first shut down the operating system in the virtual machine, back to the virtual machine main interface
Double-click "Ethernet" in the upper right of the main interface to bring up the "Network Adapter" dialog box and select "Bridge"

2. Install proxy server such as Sygate or Wingate in host

3, set the virtual machine Proxy server for the host's IP

second case:
within the unit LAN


"Ethernet" to choose "Bridge" mode
In this way, the virtual machine is the same as a real machine, when the IP is set to another available IP in the LAN
Gateway: The address of the LAN gateway server (or the address of the router)
DNS: Set the DNS server address for the ISP

ubuntu resolves a problem after a restart resolv.conf emptying after each reboot

/etc/resolv the nameserver set inside the. conf is emptied.

/etc/resolv.conf is actually a link, it is actually pointing to the/run/resolvconf/resolv.conf. Ubuntu has a resolvconf service, if you restart it, then/etc/resolv.conf content will be modified to the default appearance, so you can not directly modify the/etc/resolv.conf.

If you want to define nameserver yourself, there are 2 ways to do this:

In the configuration file of the network card add:

Iface eth0 inet Static

Address 192.168.3.3

Netmask 255.255.255.0

Gateway 192.168.3.1

Dns-nameservers 192.168.3.45 192.168.8.10

Dns-search foo.org bar.com

Modify the configuration file for the resolvconf service:/etc/resolvconf/resolv.conf.d/base

    1. echo "Search test.com" >>/etc/resolvconf/resolv.conf.d/base

    2. echo "NameServer 202.106.0.20" >>/etc/resolvconf/resolv.conf.d/base

This ensures that the configuration will be written to/etc/resolv.conf in the case of a machine restart or a resolvconf service restart

How VMware is Online

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.