Following on from part one where we downloaded and installed the CSR1000v router in VirtualBox, it would be great if we can use it in GNS3. We can do thanks to GNS3s integration with VirtualBox.
I have switched from my 4GB Windows laptop to my 32GB Mac now (we'll see why later on), but the steps are all the same.
Fire up GNS3 and head into the preferences. Firstly make sure that GNS3 can talk to VirtualBox, the details should already be configured for you, so click on "Test Settings", and hopefully you should get the green OK message as shown below:
If thats all good then head into the VirtualBox Guest tab. Click on "Refresh VM List", and then hopefully you'll be able to select your VirtualBox VM from the VM List above:
Give it a name and click on "Save"
Then click on OK to return to the main screen.
Click on the "End Devices" icon on the left hand side, it looks like a PC. In there will be a VirtualBox guest icon, which you can drag onto your topology, and you'll see a prompt to select a VirtualBox guest to use:
Once you select the CSR1000v VM and press OK you'll see it on the topology. Personally I like to change the icon to something more router looking. Before we fire it up we need to make a couple of minor edits. Firstly right click on the router and select "Configure", then select the router.
If "Reserve first NIC for VirtualBox NAT to host OS" is ticked, then untick it, and make sure that "Enable console support" is ticked:
Click ok, and now switch it on. The router light in the topology window should turn green. Give it a few moments and you should be ready to rock:
You can connect the CSR1000v to native GNS3 routers, and the two will communicate happily:
If you try an add another CSR1000v router though you will find that you cant. You can only have as many instances from VirtualBox running as there are instances, so in order to have two CSR1000v routers running in GNS3, we'll need to have two CSR1000v VMs in VirtualBox.
Shut down your existing router for the moment, and back over in VirtualBox, select the CSR1000v VM and right click on it, and then select "Clone".
A new window should pop up, and you can give it a new name, and reinitialize the MAC addresses of the cards (if you want).
Choose "Full Clone", and then click on "Clone".
Repeat this as many times as you want to have as many routers as you need. Remember though that each router takes about 2.5GB of memory, so memory can be used up pretty quickly running CSR1000v routers! This is why I switched to a more powerful machine!
Once you have created as many VMs as you need head back into GNS3. We'll need to rescan the VirtualBox VM list for it to be picked up, but this is just the same as following the first couple of steps we did to get the first CSR into GNS3. You can also choose to untick the "reserve" button here and tick the console button, then save the VM:
You can then add it to GNS3 and start connecting your topology up:
At the moment with a few normal apps running and the above routers memory and CPU usage is quite low:
With enough memory you could run a whole stack of CSR1000v routers and have them play happily together. Fun, fun, fun!