VMware Network Setting
Part I: Setting VMware Newtork/Switches
There are 4 types of Network in VMware, you can assume that VMware creating 4 types of switches for you.
1.Bridged Network Switch
One of the real NICs on your host will be connected to this switch. NIC on Virtual Machine (VM) connected to this switch will be in the same subnet with this real NIC.
VM will be equal to Host and they are on the same Ethernet!
Note from Frank:
If the host itself is accessing internet behind a router. The VM should be bridged to your host's NIC, and set it to using DHCP, so it can be at the position of your host. You should not using NAT NIC on your VM under this situation.
2.NAT Network Switch
If you want to create a NAT network switch, your host should have a public IP address(gateway address). VMs connected to this switch will use this IP to access internet. You can also set up a VM DHCP server for this network, and this network can has it's DNS setting, incomming IP port forwarding also supported so you can host an HTTP server on one of VMs connected to this switch.
Note from Frank:
If your host does not have a public IP address, you may not need a NAT network.
3.Switch know to host (Private Network Shared with Host)
Both VM and host can be connected to this switch. In fact, after this switch is added, a virtual NIC will be added on the host and it is connected to this switch. So VMs connected to this switch can communicate each other and also with host.
Please note if a virtual router bridged to the virtual NIC on the host, it will be connected to this switch either.
4.Switch not know to host
Only VMs can be connected to this switch. Host can NOT connect to this switch.
Setting method under VMware workstation 5.5
1.Adding virtual host NIC(virtual host adapter)
Before setting up a 'Switch know to host', you need to add a virtual host NIC first. Without this NIC on the host, the host will have no ability to connect to this switch. This NIC will shown on the host something likes 'VMware Network Adapter VMnet1'.
Menu path:Edit-Virtual Network Settings-Host Virtual Adapters
2.setting VM switches
Menu path: Edit-Virtual Network Settings-Host Virtual Network Mapping
There are 9 possible switches listed here. You can map (bridge) them to any of NICs on your host.
----"Switch not know to host"(Vmnet2): If no host NIC are mapped, this switch will be a "Switch not know to host".
----"Bridged Network Switch"(Vmnet0): If a real NIC are mapped, this switch will be a "Bridged Network Switch"
----"Switch know to host"(Vmnet1):If a virtual NIC on the host are mapped, this switch will be a "Switch know to host"
It is weird that there is a small arrow at the end of each switch, you can assign subnet network address to this switch. I don't know whethere VM will check the NICs setting against this subnet for you or not.
----"NAT Network Switch": This is the most complex switch you can set in VM.
Which switch will be a NAT switch?
This is decided by the setting in Edit-Virtual Network Settings-NAT (Vmnet8 will be a NAT switch)
Gateway IP address will be the global IP that has access to Internet. You can change the setting by click on the edit button. It also brings out new settings which you will not need if you merely want your VMs access internet.
3. Setting DHCP server for network/switches
You can add Vmware DHCP server to any switch (Of cause, you can run a DHCP server on any VM or the host connected to this switch.)
Menu Path: Edit-Virtual Network Settings-DHCP
If you want to create a new DHCP for a switch, please click Add, and then remember to click on the Apply button.
You should know what DHCP is, if not, you may not need it.
4. NAT setting for advanced users.
Following is really for NAT switch for advanced users.
If you want the outside world access a server hosted on your virtual machine, you will need Port Forwarding. If you are a CCNA, you should know that NAT can map a local IP to a global IP, so the outside could access your server farm behind a NAT device (F/W).
OK, this is port forwarding, all traffic from the internet sending to 52.47.6.23:80 will be forward to your http server hosted in your VM 192.168.0.3. This is cool.
That Active FTP will be useful if you host FTP server on your VM.
Part II: Configuring your VM
This part will be much easier and intuitive. Part I has set up network/switches for the whole VMware, this part you just need to connect to your Virtual Machine to the network as your need.
Here I assume you already created virtual machine. If not, it doen’t matter what networking setting you choose when you creating the VM, you can always changed if after you created them.
Menu path: VM-Setting… (or click on Edit Virtual Machine Setting)
If you want to add a NIC to your VM, just click next and select Network card, and then select witch network to connect. You can always select the last option “Custom Specific virtual network” and select the network you set up in part I.
Comment: VMware is a great software, but the interface for networking setting is kind of complex and there must be a way to simplify it. I have it and may recommend it to VMware.
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment