Internet access on VM's without NAT Interface
Description:- This document describes steps to enable internet access on all VM’s (workstation 😎 which is installed on laptop (without lan connectivity) with a wireless usb internet connection on win7.
Infrastructure:-
Host os :- Win7
VMware product :- Vmware workstation 8
Internet :- 7.2Mbps 3g usb dongle
Requirement:-
Get internet access to all VM’s without NAT interface on each VM.
How to:-
1. Create two VM networks on workstation without DHCP enabled.
vmnet1 (192.168.0.1 / 24 -- optional), vmnet2 (no ip)
2. Create one linux vm (router) with two vNIC.
Connect First vNIC to vmnet1 and second to vmnet2
3. Install linux OS and configure the eth0 interface ip as 192.168.0.2 /24
Donot configure any ip address on the eth1 interface, but leave the configuration with DHCP option.
4. Configure the linux box as a router by making the necessary configuration on the sysctl.conf
5. On the host os (win7) enable ICS on the internet connection.
While enabling ICS, select vmnet2 as the private network connection. This will automatically provide an ip address to the vmnet2.
6. Connect to internet on the host os.
7. Do a ifdown and ifup for eth1 interface on the linux vm (router).
8. Check the ip address of the eth1 interface. It should be on the same range of the vmnet2 interface on the host os.
9. Edit the resolve.conf file on the linux vm(router) and add the name server entry as 8.8.8.8
10. Check the internet connectivity on the linux vm(router) by using the command “ping google.com”
If everything went ok you should get the ping response from google.com
11. At this point we will check the internet connectivity of another VM’s. expect we already have an another linux VM (vm01) is already installed and the eth0 is connected to vmnet1 and having an ip in the 192.168.0.0 / 24 range.
12. On the linux vm (vm01) edit the resolve.conf file and add the nameserver entry as 8.8.8.8
13. Configure the eth0 interface gateway as 192.168.0.2.
14. Check the routing table and confirm the default gateway (192.168.0.2) is up.
15. Check the internet connectivity on the linux vm(vm01) by using the command “ping google.com”
Enjoy....