Network connection ways of debugging web report
When developing web report, many developers use VMware to simulate different operating systems on a same server. Then, they can realize cross-platform deployment and debug of web report. According to real application of web report, I will discuss three network setting ways of VMware with all of you.
This is the simplest way as it bridges the virtual network card to a physical network card directly. It is similar to a network card binding with two different addresses in linux. In fact, it sets the network card as promiscuous mode, and then the card can sniff several IP addresses.
In this mode, the internal network card of virtual machine(eth0 under linux is an example) is linked to the network of physical network card directly, and you can imagine that virtual machine and host machine have equal status in network relation.
To use this way, you need to get more than one IP address.
This way is not suitable for those who want to do network experiments, because you can not control the network of virtual machine.
In this way, a virtual network card vmnet8(by default) appears in the host machine. If you have experiences of Nat server, you can imagine that vmnet8 is equal to the network card linked to internal network, while the virtual machine is equal to the machine running in internal network, and the internal network card(eth0) of virtual machine is independent of vmnet8.
You can find that the own dhcp of vmware will be loaded to the interface of vmnet8 by default. Then, virtual machine can use dhcp service. More important, vmware has its own Nat service which provides address transformation from vmnet8 to outer network.
Therefore, there is a real running Nat server, but only used for virtual machine.
Obviously, if you have only one Outer network address, this way is quite suitable.
This is the most flexible way, and you can do all kinds of network experiments. The only difference with Nat way is that it has no address transformation service. Therefore, virtual machine only has access to host machine by default. This is the meaning of the name