VIP Virtual Machine (zz)

Source: Internet
Author: User

 

[Original] NAT for VIP Virtual Machine Access

VM home Virtual original reprinted please indicate the source Thank you

After mixing up on the forum for so long, I found that the most frequently asked question was how the VM accessed the Internet.
I personally understand virtual machines and talk to you about the most convenient and hard-to-understand NAT Method for virtual machines to access the Internet. Because it is a big talk NAT, it will be a bit cool, but it mainly takes care of new people. :)
Let's fly.

Let's talk about something else as an introduction.

Assume that teacher R has three students: Class a, Class B, and class c. Now there are two communication methods:

1st communication methods:
For example, if a student in class a wants to communicate with another student, he can directly call the name of the student in the class. This is the communication method-broadcast to the computer in the same network segment in the computer.

2nd communication methods:
The communication between the class and the class. At this time, it is useless to directly call the name of the Class B in the Class a, because it is impossible to hear it through the wall. This computer similar to different network segments cannot communicate. At this time, if the students in the two classes want to communicate with each other, they must use the R teacher as the speaker. This is similar to the Gateway in the network. The students in Class a will tell the students in Class R and the students in Class B.

We will link this example to network learning for your convenience.

School = Internet
Shift = CIDR Block
Student = computer
Instructor (speaker) = Virtual NAT Server

Sorry, my girlfriend told me to go to the streets. Write it here first, and write it next time.
For more information about virtual machines, see the following description.

Sorry, I'm late for writing.

The NAT method used by virtual machines to access the Internet is similar to the 2nd communication methods in my example.

Bridging is very consistent with the 1st communication methods.

For example, if you have installed a virtual system and selected the NAT mode, the virtual Nat server serves the same purpose as the r instructor. Responsible for communication between virtual machines (Class A) and computers on the Internet (Class C.

Draw a small figure 1.

It is much more convenient to use the graph.

Features of NAT Internet access

1. You do not need to set the virtual network card of the host (automatically obtained by default)
2. You do not need to set the NIC in the Virtual System (automatically obtained by default)
The premise of these two implementations is that the virtual DHCP server works normally. Figure 2

See figure 3 about Nat.

After reading the three figures, you will basically understand them. However, this is unconvincing. Let me explain it again.

192.168.2.2 is equivalent to the position of the r instructor. In Figure 1, it is marked with a virtual Nat server.

Figure 3 specifies the nat ip address.

Figure 4

Figure 5 of Virtual Machine ipconfig

Now, use the trcert command to indicate that the VM accesses the Internet through the NAT server 192.168.2.2.

The tracert command is used to display the path through which data packets arrive at the target host and the time when data packets arrive at each node. The command function is similar to the ping command, but the information obtained is much more detailed than the ping command. It displays all the paths of data packets, the IP addresses of nodes, and the time spent. This command is applicable to large networks.

We are now trcert on the Virtual Machine Baidu to see how the virtual machine data packet book arrived at Baidu.com
Check whether there is 192.168.2.2 (Virtual Nat server) in it)

Figure 6

 

Knowledge about VMWare virtual networks

1. Virtual Bridge
Connect the virtual network card of the virtual machine to the physical network card of the host machine through the virtual bridge. The VM can be connected to the external network of the host. If there is more than one physical network card on the host machine, use custom configuration to create another virtual bridge to connect to other physical network cards on the host machine.

2. Host virtual Nic
After the virtual machine is installed, right-click "Network Neighbor"/properties/the two NICs are displayed in the "Network Connection" window, by default, "VMware Network Adapter VMnet1" is used only by the host machine Network; "VMware Network Adapter VMnet8" is used by the NAT Network. Right-click the attributes of these two NICs and we can see the full name of the virtual Nic under the regular tab. Of course, you can also enter ipconfig in the "command prompt" of the host to learn the details of the host's virtual Nic.

3. NAT device
NAT is short for network address translation. When the host machine has only one IP address, the virtual machine can connect to the external network using the NAT device. We open the "service" in the "Management Tools" on the host machine ", it can be found that there is an additional "VMware NAT Service" Service, indicating that the system has installed it as a system Service.

4. VMware DHCP service
DHCP is short for Dynamic Host Configuration Protocol. The DHCP Service provides IP addresses for virtual machines that are not connected to an external network. The Virtual Machine IP address in the bridging network mode is directly provided by the DHCP server in the external network of the host.

 

 

[Original] virtual network card icons provided by VMware
Some beginners have made three diagrams on the meanings of each Nic in VMware for bridging, VMnet1 (host mode only), and VMnet8 (NAT mode) in the vmwarevm. I hope this will help you.
The display is incomplete. Please save it for viewing.


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.