If you are studying for your CCNA SP exam, or work with IOS XR and would like to learn more about the way IOS XR works you can now install IOS XRv in VirtualBox and integrate it with GNS3 version 1.1. In the following post I will describe the steps of setting up VirtualBox and GNS3 version 1.1 to use IOS XRv on Ubuntu 14.0.4.
Download the IOS XRv Image
First we need to get the Virtual Machine image from the Cisco Website. Note, you will need to have a Cisco CCO login to download the demo image.
Download the .ova version of your prefered release, I have tested iosxrv-k9-demo-5.2.0 and the iosxrv-k9-demo-5.1.3. Once you select the version you want to download you will be redirected to the software licence, accept the terms and the download will begin.
Create the IOS XRv VM
Once you have downloaded the software you will need to import the ova into VirtualBox.
- Select File -> Import Appliance from the toolbar menu:
- Click on the File icon and select the .ova image you just downloaded.
- Click Next:
- Change the values of the number of CPU’s and the amount of RAM used for the VM to suite you system, remove the DVD from the VM as it will not be used.
- Click Import.
Once you have clicked Import, the IOS XRv VM will show up in your list of Virtual Machines:
Configure the IOS XRv VM
Now that we have an IOS XRv VM, we need to modify some of the settings so that it will run correctly ing GNS3.
- Right click on the IOS XRv VM and click settings:
- Under the System menu remove the floppy and CD/DVD from the boot order:
- Under the Network menu select Enable Network Adapter for each interface you want to use in GNS3.
- Select Host Only Adapter for each interface you want to use in GNS3.
- Select the Serial Ports menu.
- Select Enable Serial Port
- Select COM1
- Select Host Pipe as the Port Mode
- Set the port part using /tmp/pipe_<image_name>
Add IOS XRv VM to GNS3
Next we need to add the IOS XRv VM to GNS3.
- Select Edit -> Preferences from the toolbar menu
- Select VirtualBox VM’s Preferences from the menu on the right hand side,
- Click New:
- Select the IOS XRv VM from the dropdown menu:
- Click Finish:
- Select the IOS XRv VM and click edit:
- Under the General Settings enable Start VM in Headless mode:
- Select the number of Network Adapters to use for the VM.
- Click ok
In order to console into the IOS XRv VM from Ubuntu using gnome terminal we must first install socat, which is a command line based utility that establishes two bidirectional byte streams and transfers data between them.
sudo apt-get update && sudo apt-get install -y socat
Run IOS XRv in GNS3
Now you will be able to drag you IOS XRv VM into your GNS3 work space and connect it to other IOU and dynamips devices.
If you start up the IOS XRv VM and you only see a null interface when running “show interface summary”, stop the device in GNS3 and check that all the interfaces are set to host only in VirtualBox before starting the device again (this is a know issue).
Another know issue is that if at first you can not ping the remote interface from the IOS XRv VM you need to delete the link and re add it and everything should be able to work. Also sometimes the interface numbering is a bit out so you may have to delete the link and add it on another interface, for example the test bellow had inter gig 0/0/0/0 on interface eth2 on the VM, so it takes a bit of trial and error to get everything up and running.