In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Everyone uses VMWare Workstation as a virtual machine. I have encountered three confusing problems myself.
A) what do the three modes of network host, bridging and NAT mean.
B) how can two network cards, VMnet1 and VMnet8, be automatically added to the windows?
C) Why in NAT mode, the virtual machine is the IP of the 192.168.137.0 network segment.
* * the first problem that is easy to be confused: three modes of network hosts, bridging and NAT. **
Virtual machines in VMware also have network cards and need to communicate with other open virtual machines, real computers (the one on which VMware is installed), or other real computers or websites on internet. Then VMware sets up three scenarios according to different needs.
* * 1) Host mode * *. If the virtual machine only needs to boot up, the network only needs to do an experiment with the real computer to communicate with each other, that is, to ping each other. Then the network card of the virtual machine adopts the host mode. In this mode, virtual machine IP can ping real computers and other open virtual machines, but cannot ping other real computers in the office and IP on Internet. A real computer, like the door of a room, does not allow virtual machines in the room to go out and communicate with other computers.
* * 2) Bridge mode * *. If you want the network card of the virtual machine to be in the ping other virtual machines, in addition to your own real computer, but also want to connect with other real computers in the office, then use the virtual machine network card bridging mode. Bridge mode is also called switch mode. In a network, bridging has the same meaning as a switch. VMware seems to take out the virtual machine separately, connecting the virtual machine's network card to the switch port on the real computer, so the virtual machine communicates with other real computers on the switch and ping each other. At this time, virtual machines and real computers are on an equal footing. The IP used in the virtual machine is also the IP of the real computer network segment.
Of course, if your office network allows computers on the switch to access the Internet. At this time, your real computer can access the internet to browse the web, and the virtual machine can also access the Internet to browse the web. In other words, at this time, the virtual machine can connect to whatever network the real computer can connect to.
* * 3) NAT mode. * * if the virtual machine does not want to be seen by other real computers (ping), and the virtual machine makes a network that the real computer can connect to, or wants to connect to internet, then you can use NAT mode. In this scenario, the real computer is like the door of a room, and the virtual machine in the room is not allowed to communicate directly with other computers using its own IP. Instead, you have to use the IP of a real computer to communicate with other computers or Internet (if the network allows the Internet).
For example, the virtual machine ping office other colleagues' computers, colleagues see on the computer is my real computer IP address sent the ping packet.
The second problem that is easy to be confused is that two VMnet1 he VMnet8 network cards are automatically added to computers with VMware.
Virtual machines and real computers need to communicate through their respective network cards. For example, the name of the network card on the virtual machine is eth0, so which network card is the real computer?
For simplicity and convenience, VMware defined two network cards for real computers.
If the virtual machine network card eth0 is in host mode, then the real computer uses VMnet1 and virtual machine docking. Assuming that the virtual machine eth0 IP address is 192.168.1.2, then the VMnet1 is 192.168.1.1, and the IP of the real computer defaults to the first IP of the address field. They are in the same IP address range and can Ping each other. The IP address field can also be other address fields, according to your own habits. The address segment is edited in the VMware menu bar and can be manually set in the virtual network editor.
If the virtual machine network card eth0 adopts NAT mode, the real computer uses VMnet8 and virtual machine docking. Similarly: assuming that the virtual machine eth0 IP address is 192.168.2.2, then the VMnet1 is 192.168.2.1, and the IP of the real computer defaults to the first IP of the address field. They are in the same IP address range and can Ping each other. The IP address field can also be other address fields, according to your own habits. The address segment is edited in the VMware menu bar and can be manually set in the virtual network editor.
In fact, VMware also defines a network card for real computers, VMnet0. If the virtual machine network card eth0 adopts bridging mode, the real computer uses VMnet0 and virtual machine docking. Because in bridge mode, both the virtual machine and the real computer obtain the allowed IP address field on the switch, there is already an IP on the physical network card of the real computer, so there is no need to regenerate into this VMnet0.
As to why VMware arranges the names of VMnet0,1,8 in this way, instead of VMNet0,1,2 arranging them in order. I speculate that it has no other practical significance. Dozens of network cards can be added to the virtual machine (without detailed confirmation, one number is 32). The network card is free to choose three modes, corresponding to the VMnet X network card on the real computer.
The third confusing question is why in NAT mode, the virtual machine is the IP of the 192.168.137.0 network segment.
It is mentioned earlier that the virtual machine network card uses the bridging mode, corresponding to the VMnet0, the virtual machine obtains the IP address used on the switch, either automatically or manually.
The virtual machine network card adopts the host mode, corresponding to VMnet1, the virtual machine obtains the IP address, edit the options in the VMware menu bar, and select the virtual network editor to set it manually.
The virtual machine network card adopts NAT mode, corresponding to VMnet8, the virtual machine obtains the IP address, edit the options in the VMware menu bar, and select the virtual network editor to set it manually. But in this mode, sometimes the real computer outside ping is not successful. However, if the network address field is set to 192.168.137.0, it will succeed.
According to known information, this is a bug of VMware. There is no official information to explain, I based on the information obtained for reasoning.
In the NAT network mode defined by Window, window automatically defines a pool of DHCP addresses 192.168.137.0 (see the pool defined by windows through the windows registry). If the windows address pool is inconsistent with the VMware address, there will be two DHCP servers working at the same time. This will cause IP address confusion and affect the normal operation of the virtual machine network card.
The solution is divided into two steps:
As a first step, VMware changes the DHCP IP address field on VMnet8 to 192.168.137.0.
In the second step, the real computer Windows will share its physical network card to VMnet8 (figure 2 below, figure 3).
Reference link: https://florianlr.wordpress.com/2009/07/09/5/
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.