Three modes of network connectivity for virtual machines

Source: Internet
Author: User

Virtual machines typically have three network connection modes available
1. Bridging
2.NAT
3.host-only
Attached: custom (no special requirements generally not used)


Use examples to explain:
There are two machines in my virtual machine: Linuxclient and Linuxserver, respectively.
My Physics machine ip:192.168.236.119
A's physical machine ip:192.168.236.124
B's Physical machine ip:192.168.236.118
(episode: 118 can Ping, 124 can not ping, the reason is to open a firewall)
The following 118 other machines are used as actual LAN.


Premise: Use DHCP to assign IP, use our school's DNS (automatically assign also line)
General: These three modes can ping each other from my physical machine.


1. Bridge connection
Linuxclient on: inet addr:192.168.236.146
Linuxserver on: inet addr:192.168.236.147
Result: Be able to ping the inside and outside network, can surf the internet, and with the physical machine in the same network segment, the actual LAN router more than two machines
Principle: Share the actual router in the same position as the physical machine, which is equivalent to more than two computers in the side ...


2.NAT
Premise: Start the VMware DHCP service and VMware NAT Service in My Computer---management--services
Linuxclient on: inet addr:192.168.70.153
Linuxserver on: inet addr:192.168.70.130
Result: Can ping the inside and outside network, can surf the net, but with the physical machine no longer the same network segment, and 192.168.236.118 and 192.168.236.124 can not ping linuxclient and linuxserver (except my physical machine), there will be no unknown two machines on the actual router.
Principle: Virtual machine virtual out of the network, can through their own host Unicom extranet, but in this local area network cannot find two units to seek your device


3.host-only
Linuxclient on: inet addr:192.168.197.128
Linuxserver on: inet addr:192.168.197.129
Result: Only two nets in the virtual machine can ping each other, and no other IP is ping, (except my physical machine) naturally also can not surf the Internet.
Principle: Castrated version of the NAT, in addition to network functions, completely closed in the virtual network, so only virtual network machine mutual Ping








Three modes of network connectivity for virtual machines

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.