Virtual Linux in VMware Workstation Shares the Internet through NAT

Source: Internet
Author: User

Virtual Linux in VMware Workstation Shares the Internet through NAT

Under the VMware Workstation Virtual Machine, Linux virtual machines need to access the Internet, which is usually in the bridging mode. However, my computer has different Internet access environments, and I am too lazy to always configure the Linux Nic information, set to NAT mode to share the network card of the real machine to access the Internet.

There are errors or other problems, big and small.
The premise is that your virtual machine is created through vmware workstation. When installing vmware workstation, two NICS will be added to your system, one VMware Network Adapter VMnet1; VMware Network Adapter VMnet8 is used here.
Steps:
1. Change the NIC VMware Network Adapter VMnet8 to DHCP to automatically obtain the IP address.
2. Connect the NIC of the Linux virtual machine to the VMnet8 Nic of the VMware Network Adapter. For example:
3. Share the Network card (wired or wireless Network card) that you are currently surfing the Internet with the VMware Network Adapter VMnet8 Network card. enable the Network card attributes and share them with you. For example:
4. Check the connection details of the VMware Network Adapter VMnet8 Nic. The NIC has automatically obtained an IP address of 192.168.137.1/24 and changed it to manual, set the DNS to the DNS used by the physical machine to access the Internet, for example:

5. At this time, you can configure the nic ip address of the Linux virtual machine to the IP address range 192.168.137.x/24. The Gateway is configured as 192.168.137.1, And the DNS is configured as the DNS address of the VMware Network Adapter VMnet8 Nic, in this case, the Linux virtual machine can ping the physical machine and the Internet.
At this point, the configuration of the Internet on the Linux virtual machine is complete !!!

Vmwarevm Linux accesses the Internet through NAT

This article permanently updates the link address:

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.