Network Connection knowledge

Source: Internet
Author: User

Network Connection knowledge
After the virtual machine is installed, two virtual NICs, VMnet1 and VMnet8, are installed by default. Others are not installed (you can also manually install others ). VMnet1 is the host Nic used to connect to the network in the host mode. VMnet8 is a NAT Nic used to connect to the network in NAT mode. Their IP addresses are randomly generated. If you want to use virtual machines for experiments, you 'd better remove the IP addresses from VMnet1 to vmnet8. Traditionally, the network segment used by the VMware Virtual Network Card is "fixed". The following principle is used: the network segment of VMnet1 is 192.168.10.0, and the network segment of VMnet2 is 192.168.20.0. Others are similar. Of course, you don't need to change it if you just use it. You can just access the internet.
VMware network connections include: Bridged, NAT, and Host-Only ).
1. Use bridged networking (using a bridge network) (can communicate with the outside world)
Note: If you use A VMnet0 vswitch, the virtual machine has an independent IP address, which is equivalent to an independent computer and host on the network. As shown in network topology 1,, a1, A2, and B can communicate with each other.


Figure 1 topology diagram of Bridging Mode
2. Use network address translation (NAT) (the host and the VM on the host can communicate with each other to access the outside world and cannot be accessed by the outside world)
Note: If you use a Vmnet8 vswitch, you can use another workstation on the one-way network of the VM. Other workstation cannot access the VM. The network topology 2 shows,
In NAT mode, A1 and A2 can access B, but B cannot access A1 and A2. However, A, A1, and A2 can communicate with each other.
Figure 2 topology of NAT Mode
3. Use Host-Only networking (using the Host network)
Note: when using the Vmnet1 vswitch, the virtual machine can only communicate with the Virtual Machine and host. That is, you cannot access the Internet, as shown in Network Topology 3,
The Host mode allows mutual access between A, A1, and A2, but A1 and A2 cannot access B or B. Only the VM on the host can communicate with each other. Figure 3 topology of the host network mode shows the actual application: The most common use of bandwidth is now. If the bridge mode is used, the host must be able to access the Internet, however, the operating system on the virtual machine cannot access the Internet. At this time, your host is equivalent to A, and the virtual machine is equivalent to A1. Unless you apply for an IP address from the carrier (such as China Telecom or China Netcom), this is obviously not desirable. If you have a vro, you can use the bridging method to access the Internet, because the IP address you applied for is written on the vro, not on your machine. This includes your host, virtual machine, other machines connected to the vro can access the Internet and use the IP address automatically allocated by the vro. The IP address is generally 192.168.0.XXX. It seems that the operator is not happy with you to use the vro. What you say will damage the interfaces of their vswitches. Of course, as long as your host can access the Internet and use the NAT method, virtual machines can always access the Internet (of course, not when you modify IP, gateway, DNS, and other information randomly ).
Manual instance setting: assume that the network segment address of VMnet1 is 192.168.10.0, the network segment address of VMnet8 is 192.168.80.0, And the gateway address is 192.168.80.254 (that is, the NAT router address, which can be set by yourself, on VMnet8), the host NIC address is 192.168.1.1.
I. Using the bridging method, the IP address of Virtual Machine A1 can be set to 192.168.1.5 (the IP address of the VM can be the same as the IP address of the host Nic), other such as the gateway address, DNS, the subnet mask is the same as that of the host.
2. In NAT mode, the IP address of Virtual Machine A1 can be set to 192.168.80.5 (the same network segment as VMnet8). The Gateway is a NAT router address, that is, 192.168.80.524.
3. In host-only mode, the IP address of Virtual Machine A1 can be set to 192.168.10.5 (the same network segment as VMnet1)
Note: Generally, you do not need to manually set it. You can choose to automatically obtain it or enable the DHCP service.

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.