GNS3 simulator allow to interconnect GNS3 topology with VirtualBox hosts (for example those running Win or Linux OSs) and allows to make interesting topologies and scenarios testing with real traffic and services.
Installed VirtualBox application with installed and running virtual host operating system inside of it.
- You may use one of pre prepared virtualbox appliances from our site.
Installed GNS3 simulator with set of Cisco IOs.
- Note: this guide is for older version of GNS3 (<1.x)
Note: I'm using Win 7 64bit Pro as the main operating system from which I'm running GNS3 and VBox.
Prepare your VirtualBox
To interconnect GNS3 with VirtulaBox host we should find several ways. I tried using:
- real network adapter,
- using emulated virtualbox host only adapter,
- using MS loopback adapter.
Alternatively we may use tunnel TAP adapter (TUNTAP). But this options looks simplier for linux based systems as for windows. Some guide how to install TUNTAP adapter is here.
Therefore, if we have installed a virtualized host with running OS inside of VirtualBox, before starting the virtualized host, we should check its network settings inside of VirtualBox (VB). Next steps are similar, does not matter which setting we choose.
Interconnection using an real net adapter
As a first option I will use for interconnection of gns3 with VB my PCs´ real net adapter.
Open Settings of a VB host
and then choose Networks, as we may see on following image. My setting is using network adapter in a bridge mode using my real Realtek Gigabit Ethernet net adapter.
Before we run the GNS3 simulator we should display the list of network adapters available for GNS3 on a particular PC. For this we should use utility Network device list available from GNS3 menu. Displayed information will be suitable in next configuration steps, when we will realize the interconnection.
The Network device list tool lists available adapters:
Then we may run GNS3 and start bulding simulated topology. I will use a simple scenario with one router and a cloud through which gns3 will be connected to a VB host. So drag and drop one router from left menu and then one cloud.
Double click on a cloud icon inside of gns3 working space now, a node configuration dialog window should appear, then click on Clouds or cloud name inside of the left column, main configuration will apear. Choose NIO Ethernet tab and from the list menu under choose your real network adapter (the adapter is named or should be identified using win device ID).
Then click on the Add button.
and Apply configuration. The dialog window will close itself.
Interconnecting router with VB host (cloud)
Now manually interconnect the router interface (for example fa0/0) with the cloud:
when moving the cursor with line over the cloud an line with previously configured network adapter will appear.
Note: If we have previously configured several adapters for the cloud there will be several lines available.
Now we should boot the router and the VB host. Configure them with right IP addreses for their network interfaces and finally check the interconnectivity. In my case the router IP address is 192.168.10.196 and PC address is 192.168.10.197:
Ping from the router:
and subsequently ping from the VB host:
Interconnection using an Virtualbox host adapter
As second option I will use for interconnection of gns3 with VB through VB virtual host adapter. We may again use utility Network device list to dispaly the list of net adapters recognized by GNS3:
First, open Settings of a VB host and then choose Networks, as we may see on following image. My setting is using network adapter in a bridge mode using my real Realtek Gigabit Ethernet net adapter.
Then start gns3 and build similar topology as we made for previous scenario. So place an router and a cloud into working space of GNS3, then click on the cloud and select virtualbox only adapter through Ethernet tab:
add it and apply changes:
Now manually interconnect the router ethernet (fastethernet) interface with the cloud:
Now start VB host, in my case Win 7, and after booting setup inside of it correct IP address:
similarly boot cisco router and configure its IP address. Subsequently we may check interconnectivity:
and from VB host