----------------------- Understanding VMware networking - NAT vs. Bridged ----------------------- -Ian! D. Allen - idallen@idallen.ca When you install VMware Workstation, on the "Network Type" dialog screen you need to make a choice between Network Address Translation (NAT) or Bridged networking: * Bridged networking (preferred) will put your new virtual machine on the local network as an independent IP address. Ubuntu will use DHCP; or, you will have to give the new machine a static IP. Any VPN, tunnelling, or routing done by your host O/S will not apply to the virtual machine; you will need to start up your own VPN or tunnel on the virtual machine. Bridged networking will *not* work automatically unless your local network is running a DHCP server somewhere that will give your machine an IP address when it asks for one. Bridged networking will allow you to log in to your new virtual machine using ssh (PuTTY) using its independent IP address. The virtual machine behaves exactly as if you just plugged new, independent hardware (with an independent IP address) into your local network. * NAT networking (avoid) will hide the IP address of the virtual machine behind the IP address of your host O/S, using NAT. Both machines will share the same IP address, same routing, same VPN, and same tunnelling. If your host machine has network access, your virtual machine will automatically share it. You will not be able to connect to the virtual machine from the local host or network unless you set up mechanisms to cross the NAT boundary. The virtual machine will be "hidden" from the local network, and from the local host itself (unless you configure routing on the local host). Protocols that require public IP addresses will not work. - In the T108 Lab, select Bridged Networking (which will have the Network Manager try DHCP). - At home, you may need to reconfigure for NAT Networking if you want to share the host VPN with your local host machine. The preferred way to use the VPN is to run the "vpnc" client in the virtual machine. Avoid NAT if possible. Select Use bridged networking (preferred) -OR- Use network address translation (NAT) and then Select: Next. You can always change the networking type later. Changing Network Type between NAT and Bridged --------------------------------------------- You can reconfigure your virtual machine to change network types, using the Settings tab of the machine or by clicking on the active Ethernet icon in the lower-left of your VMware window. Reconfiguring the virtual machine won't automatically cause the O/S running in the machine to reconfigure - you have to have the O/S reset its network state as well. The Network Manager program inside Ubuntu may not notice that you have changed the networking type of your virtual machine. You may have to manually request DHCP (or static) networking inside Ubuntu. See the section on "Manual Networking vs. the Network Manager". Manual Networking vs. the Network Manager ----------------------------------------- Ubuntu uses a Network Manager program that tries to automatically figure out the right thing to do with networking and "just work". The Network Manager icon is a pair of screens toward the right in the top menu bar; it is also available under System | Administration | Network. The Network Manager prevents you from having any manual control over network settings. To gain manual control of your network, you must turn off the Network Manager by selecting "Manual Configuration | Wired connection | Properties", turn off "Roaming", and select the type of manual networking you want. You can explicitly ask for DHCP or static routing this way. If you disable the Network Manager and explicity ask for DHCP or static networking, an entry will be made in your manual network configuration file "/etc/network/interfaces". Here are sample entries for DHCP and for static networking; only one will be used: # if using DHCP ... iface eth0 inet dhcp auto eth0 # if using static networking ... iface eth0 inet static address 192.168.9.248 netmask 255.255.255.0 gateway 192.168.9.254 auto eth0 The "auto eth0" tells the system to start this interface at boot time. If you have interface entries in this file, you can control those interfaces manually using the network commands (as root): "ifup eth0" and "ifdown eth0". You can only control interfaces listed in this file. [... more to come ...]