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.
Bridge way
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.
Nat way
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.
Hostonly way
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 “hostonly”.
By default, a dhcp service will be loaded to vmnet1. Then, the virtual machine linked to vmnet1 also can be setted as dhcp, and this makes the configuration of system easy.
Is this way can not link to outer network?
No. In fact, it is more suitable as you can use your own way to get the best configuration.
Examples:
1. Use your own dhcp service. First, you should stop the dhcp service of vmware, and make dhcp service more uniform.
2. Use your own Nat, and add firewall easily. There are many ways to do Nat with windows host. The Internet sharing of window XP
is a simple one, and the Nat service of windows server is a complicated one.
3. Use your own firewall. As you can totally control vmnet1, you can add (or try) a firewall between vmnet11 and outer network.
As stated above, you can see that this way is similar to that common Nat server link to outer network with the whole internal network. So you can do related experiments easily. For example, the setting of firewall.