In a Linux system, it is possible to share a physical machine with a virtual machine network

Source: Internet
Author: User

Purpose of writing: The process of configuration is still a bit complicated for beginners, and it is recorded as a share for easy reading.

Prerequisites: The virtual machine system is already installed VMWare Tools.

How to use: Customize Nat Mode (or custom NAT mode) to share virtual machines online.

1. turn on the virtual machine's Nic VMnet1 and VMnet8 Nic

2. Set up network card sharing

the first thing to do is to turn on local network sharing, local network settings -- Properties - - share tick Allow other network users - - Home network VMnet8.

3. set the virtual machine custom NAT connection mode

Select Menu Edit in VMware-- Virtual Network editor - - Add networks

4. Virtual machine NIC Mode

Select the default NIC

or customize the NIC

5. Modify the virtual machine's IP address (permanently changing the IP address) and execute the command in liunx .

6. Modifications

edit The configuration file for the NIC eth0 with "vi/etc/sysconfig/network-scripts/ifcfg-eth0" . If DHCP is set to obtain an IP address automatically, then ipaddr,NETMASK and the Gatway can not write.

7. Configure NDSfor Linux, confident command vi/etc/resolv.conf

8. Restart the NIC service

9. Testing

Note: If you ping the network exception, you can restart the liunx. Then, re - ping the network address.

Summarize:

four modes of LIUNX system network links:

1) NAT: The virtual machine computer is connected to the Internet via an external host computer, but the virtual machine does not have a separate IP address, only the external host computer can connect to the virtual machine, and the external host cannot actively connect the virtual machine

(external host can surf the Internet, the virtual machine will be able to surf the internet )

2) Bridging: Virtual machine computer, will and external host in the LAN register a physical opportunity and host on the LAN has the same network segment IP , mutual access, Virtual machine Internet access via LAN switch (also known as router) for Internet access (external (other DI computers) available)

3) Host-only: Virtual opportunity to generate a virtual IP, and the host to communicate with each other, when the virtual machine can only communicate with the host, the external computer can not access the virtual machine , Virtual machine cannot surf the internet! (For internal (native) access only)

4) Custom: Defines the specified network connection mode.

Nic One: Nat

Nic Two: Bridge Connection

Nic Three: Host-only

With the above configuration, it is possible to share the physical network with the virtual machine network.

<p> Thank you for reading, such as the question of this article, I hope you can give some suggestions and comments </p>

In a Linux system, it is possible to share a physical machine with a virtual machine network

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.