Cisco CSR1000v – Part 2: Connecting to GNS3

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:

CSR1000v and GNS3

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:

CSR1000v and GNS3

Give it a name and click on “Save”

CSR1000v and GNS3

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:

CSR1000v and GNS3

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:

CSR1000v and GNS3

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:

CSR1000v and GNS3

You can connect the CSR1000v to native GNS3 routers, and the two will communicate happily:

CSR1000v and GNS3

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).

CSR1000v and GNS3

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:

CSR1000v and GNS3

You can then add it to GNS3 and start connecting your topology up:

CSR1000v and GNS3

At the moment with a few normal apps running and the above routers memory and CPU usage is quite low:

CSR1000v memory usage

With enough memory, you could run a whole stack of CSR1000v routers and have them play happily together. Fun, fun, fun!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.