Sunday, June 3, 2012

Having Two VM's and Real PC connected to GNS3 using VMware Player

The Goal

The main purpose is to show how to have three fully functional PCs to emulate some setup with GNS3 for free by using VMware player.

Requirements

This setup consists of the following:
  • IBM personal Machine with 8GB RAM and Win7.
  • GNS3 0.7.4 installed
  • VMware Player 4.0.3 installed.
  • Operating Systems for Virtual Machines (in my case I installed Ubuntu10.04 and 11.10).

For Whom

Network guy with good skills using GNS3 and VMware Player or other Virtualization products.

Before we start:

After installing VMware player 4.0, you need to extract that tools to help you configure your VMware player network adapters. So we need to do as follow:

The vmnetcfg.exe is included in the installer, but won’t be installed.
1. Run the installer with /e option. For example:
VMware-player-3.0.0-197124.exe /e .\extract
All contents will be extracted to “extract” folder.
2. Open “network.cab” and copy vmnetcfg.exe to your installation folder,
typically “C:\Program Files\VMware\VMware Player\”.

Also, you need to install two MS loopback adapters if you don’t have them installed.

Let’s do it:

Configuring the VMware Player  network adapters:


  •           Go to VMware player installation folder.
  •           Find and run vmnetcfg.exe.
  •           Set VMware0 to be bridged to that MS loopback adapter
  •           Set VMware1 to host only
  •           And set VMware8 as natted port.

vmnetcfg.exe
vmnetcfg.exe

Virtual Machine Setting:

During creating or after that make sure that the first machine network adapter setting is set to be bridged interface. Please note that  I really mean the word "first"  because the first machine run will use the VMware0 interface.For the second machine, select host-only setting for its network adaptor.





Configuring Network interfaces:

After booting both Virtual Machines, lets configure their NIC cards with the proper IP addresses:

On the host machine (real PC) assign IP address, Network Mask, and the Default Gateway (DG) for both MS loopback interfaces; one for the real PC as the third machine, and the second one for the bridging of the first VM (the same MS loopback interface associated to VMWare0 using vmnetcfg.exe)


NIC card
IP;Mask;DG
MS loopback #1 for Phy_PC
192.168.40.100;24;192.168.40.200
MS loopback #2 for 1st VM
192.168.30.100;24;192.168.30.200


For VMware1, don’t set any IP address. From the IP address setting window select Obtain an IP address automatically.

On the 1st VM, set an IP address from the same subnet as of the IP address of that MS loopback used for bridging (in our case, it should be 192.168.30.xxx) plus the network mask and DG.

 On the 2nd VM, set the proper IP, Mask, and the DG that fit your setup.

NIC card
IP;Mask;DG
1st VM - eth0
192.168.30.101;24;192.168.30.200
2nd VM - eth0
192.168.100.100;24;192.168.100.200

Now both VM’s and the real PC are ready to be connected to the emulated network created by GNS3.

GNS Setup

I have two 7200 routers configured as follow:

Router
# of Interfaces
interface
IP address
Connected to
R1
4 port (fast)
Fas 0/0
192.168.200.200/24
Connected to R2
Fas 0/1
192.168.100.200/24
Connected to 2nd VM (VMware1)
Fas 1/1
192.168.40.200/24
Connected to the Real PC (MS loopback  #1)
R2
2 port (Fast)
Fas 0/0
192.168.200.100/24
Connected to R1
Fas 0/1
192.168.30.200
Connected to 1st VM (MS loopback #2)

Running EIGRP as the routing protocol.


Also I have three clouds represent the PCs and their NIO Ethernet configured based on the following:

Cloud #
Machine
NIO Ethernet
C3
2nd VM
VMware1
C4
1st VM
MS loopback #2
C5
Real PC
MS loopback #1




Setting NIO Ethernet window

Final Setup




Good Luck…

No comments:

Post a Comment