블로그 이미지
LifeisSimple

calendar

1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

Notice

2011. 3. 15. 10:27 Brain Trainning/가상화

출처 : http://beyondtop.egloos.com/10631914
 

VMware Workstation networking Virtualization

Virtual Switch
Like a physical switch, a virtual switch lets you connect other networking componets together. VIrtual switches are created as needed by VMware Workstation, up to a total of 10 virtual switches on Windows and 255 on Linux. You can connect one or more virtual machines to a switch. By default, a few of the virtual switches are mapped to specific networks.

DHCP server
DHCP server provides IP network addresses to VMs in configurations that are not bridged to an external network. For example, host-only and NAT configurations use the DHCP server.


There are 9 virtual Ethernet switches, designated as VMnet0, .., VMnet8.
By default, some of the VMnet switches have specific functions
  - VMnet0 is dedicated to bridged mode
  - VMnet1 is dedicated to Host Only mode
  - VMnet8 is for NAT(Network Address Translation) mode

The others, from VMnet2 to VMnet7, are available to be used by the VM when using Custom networking mode.

Bridged Networking Mode
This allows your VM to talk to the outside world via your host machines' network card. VMnet0 connects your virtual network card of guest to the physical network card of host. While the VM shares the host's Ethernet connection, it appears as an entirely separate machine on the local Ethernet with its own MAC and TCP/IP address. For TCP/IP connections you can either set an IP address, or get a dynamic address from an outside DHCP server. If you can't allot more than one IP address for a physical machine(host machine), then you should use the NAT mode. Bridged mode by default connects the VM with VMnet0 which maps to the first available NIC automatically. If you have more than one physical network card in your host machine, it is recommended to manually map your virtual switches to physical adapters.
(Bridged networking connects a virtual machine to a network by using the host computer’s network adapter. If your host computer is on a network, this is often the easiest way to give your virtual machine access to that network. The virtual network adapter in the virtual machine connects to the physical network adapter in your host computer, allowing it to connect to the LAN the host computer uses. 
Bridged networking configures your virtual machine as a unique identity on the network, separate from and unrelated to its host. It makes the virtual machine visible to other computers on the network, and they can communicate directly with the virtual machine. Bridged networking works with both wired and wireless physical host network cards.
Setup Requirements for IP addresses
If you use bridged networking, your virtual machine must have its own identity on the network. For example, on a TCP/IP network, the virtual machine needs its own IP address. Your network administrator can tell you whether IP addresses are available for your virtual machine and which networking settings you should use in the guest operating system. Generally, your guest operating system can acquire an IP address and other network details automatically from a DHCP server, or you might need to set the IP address and other details manually in the guest operating system.
If you use bridged networking, the virtual machine is a full participant in the network. It has access to other machines on the network and other machines on the network can contact it as if it were a physical computer on the network.
Users who boot multiple operating systems often assign the same
)
(Wireless LAN cards have a problem in a Bridged mode network setup and do not work in old version of VMware workstation)
In bridged mode, the packets are created in the VM, and sent through the switch to the physical network card of host machine. Since a VM has its own MAC address for each virtual NIC, the wireless adapter will not send packets other than those generated on the physical wireless card. However, the workaround for using a wireless network card is to use NAT mode.(This is because of a security specification in the IEEE Ethernet 802.11 protocol that says a wireless adapter cannot send packets that have a different MAC address than its own)
Select Replicate physical network connection state if you use the virtual machine on a laptop or other mobile device.

Host Only Networking mode
For this mode, VMware installs a virtual ethernet adapter in the host OS that communicates with the VMnet1 switch. The host believes this is just aonther Ethernet adapter, and can be viewed from the standard windows(host) network properties panel. VMware Workstation also runs a virtual DHCP server connected to the VMnet1 switch. In this mode, the DHCP service will assign addresses to the VM's virtual ethernet adapters(and actually the host OSs virtual ethernet adapter as well) that are connected to the VMnet1 switch. This allows communication between a virtual machine and the host OS, but it is not routed to the outside world. Multiple VMs can talk to each other as well. Host Only networking also allows connection of VMs to outside networks through the host OS. This is done by configuring networking routing, or even a firewall, on the host between a physical network and the Host Only virtual ethernet adapter in the host.
(Host‐only networking creates a network that is completely contained within the host computer. Host‐only networking provides a network connection between the virtual machine and the host computer, using a virtual network adapter that is visible to the host operating system. This approach can be useful if you need to set up an isolated virtual network. In this configuration, the virtual machine cannot connect to the Internet.)

NAT(Network Address Translation) Networking Mode
If you select the Typical setup path in the New Virtual Machine wizard, the wizard sets up NAT for the VM. NAT allows the VMs to share the IP address of the host. The VMware workstation DHCP server assigns IP addresses to the vitual network cards, and the NAT system translates packets between the host's NIC and the ones of the guest OS. VMs using NAT connect via the VMnet8 switch. VMware Workstation configures a separate NAT service that runs on the host OS and connects between the VMnet8 switch and a TCP/IP socket on the host OS. The host routes traffic from the socket to wherever needed, such as an Ethernet, Token Ring, or dialup connection. With the NAT service, the wireless Ethernet adapter just sees normal TCP/IP traffic from the host OS and no special bridge software trying to send packets with other MAC addresses.
(NAT configures a virtual machine to share the IP and MAC addresses of the host. The virtual machine and the host share a single network identity that is not visible outside the network. NAT can be useful when your network administrator lets you use a single IP address or MAC address. If cannot give your virtual machine an IP address on the external network, you can use NAT to give your virtual machine access to the Internet or another TCP/IP network. NAT uses the host computer’s network connection. NAT works with Ethernet, DSL, and phone modems.
If you select NAT, the virtual machine can use many standard TCP/IP protocols to connect to other machines on the external network. For example, you can use HTTP to browse Web sites, FTP to transfer files, and Telnet to log on to other computers. NAT also lets you to connect to a TCP/IP network by using a Token Ring adapter on the host computer.
In the default configuration, computers on the external network cannot initiate connections to the virtual machine. That means, for example, that the default configuration does not let you use the virtual machine as a Web server to send Web pages to computers on the external network. This configuration protects the guest operating system from being compromised before you have a chance to install security software.
)

Custom mode
In this mode, you can directly specify the connection between a virtual switch and virtual ethernet adapter. VMs connected through the unused virtual ethernet switches(VMnet2 through VMnet7) are completely isolated from the host or any local physical networks. This mode can be helpful in testing code that you want to isolate from a production or corporate network. You can create a complete network environment on a single machine, and neither the corporate network, nor your test setup knows the other exists.

The VMware Workstation DHCP capability is a modified DHCP server that can only serve IP addresses to the VMnet switches. The DHCP server assigns IP addresses from a class C non-routable subnet. This is configured automatically at VMware Workstation install time, and the installer checks to make sure the subnet is not already used by the host. The DHCP server normally only serves IP addresses to virtual machines connected to VMnet1(Host Only) or VMnet8(NAT), but can also be configured to serve IP addresses to the other virtual switches.

Deciding which networking mode is basically a matter of whether you want the physical network to see the virtual network, or not. If you want the physical network to see the virtual network, use the Bridged mode. If you want an isolated virtual network withoug outside connectivity, use Host Only mode. And if you need outside connectivity, but want the virtual network invisible to the physical world, use NAT mode.
posted by LifeisSimple