The Cisco IOS XE Release 3.10 brings support for Kernel Based Virtual Machine (KVM) hypervisor. Thanks to the this awesome enhancement, Cisco CSR 1000v running IOS XE 3.10 can be easily connected to devices running inside GNS3 topology. The goal of this tutorial is to install CSR 1000v IOS XE 3.10 on a virtual machine that is run by Qemu hypervisor. As the both Guest and Host CPU are the same x86 architecture, Qemu can use kvm for hardware assisted virtualization. In a last part of the tutorial we will configure GNS3 to support CSR 1000v Qemu Virtual machine and test connection between CSR 1000v and Cisco 3725 both running inside GNS3.
1. Hardware Requirements
- Computer with at least 6 GB RAM
- Each CSR 1000v Virtual machine consumes 4 GB RAM plus 2 GB RAM for OS and installed applications e.g. GNS3, Dynamips
- Processor with built-in hardware virtualization support (VT-x or AMD-V)
2. Software Requirements
- Linux Fedora 17 x86-64 (or any other x86 or x86-64 Linux) with working KVM and Qemu installation
- KVM installed on Fedora Linux
- Qemu installed on Fedora Linux
- GNS3 0.8.4 or later
- Qemu 1.6.0 or later and compiled for i386 or x86_64 support (Qemu 0.12 is officially supported)
- Dynamips 0.2.8-RC7-x86_64.bin or later
- CSR 1000v IOS XE Release 3.10.0S or later - Download Page
Cisco CSR 1000v Installation on Qemu Virtual Machine
1. Create Qemu Virtual Machine
$ /usr/local/bin/qemu-img create -f qcow2 ./CSR_1000v.img 8G
2. Start Qemu Virtual Machine
$ /usr/local/bin/qemu-system-i386 -boot d CSR_1000v.img -enable-kvm -m 4096M -cpu Nehalem -smp 4,sockets=4,cores=1,threads=1 -device virtio-net-pci,mac=00:00:ab:c1:bd:02 -device virtio-net-pci,mac=00:00:ab:2c:41:03 -cdrom ~/csr1000v-universalk9.03.10.00.S.153-3.S-ext.iso
The command start a Qemu Virtual machine with attached CSR installation ISO image. Qemu 32 bit binary may be used to run a Virtual machine but CPU model Nehalem must be explicitly configured. Also be aware of RAM requirement. If less than RAM 4096 MB is assigned to a Virtual machine, installation fails. Finally, CSR 1000v IOS XE Release 3.10 only supports virtio-net-pci NIC model for kvm hypervisor.
Picture 1 - CSR 1000v Grub Menu Window
CSR 1000v is installed automatically. Once finished, it will restart and finally the router prompt appears.
Picture 2 - Booting CSR 1000v
License Activation and Output to Serial Port
In order to redirect output to serial port use the following command:
CSR_1000v(config)#platform console serial
Cisco CSR 1000v license model and benefits of activation an evaluation license is explained here in more details. To activate evaluation license for Cisco IOS XE 3.12S and earlier, us the following command:
CSR_1000v(config)#license boot level premium
Save configuration and reboot a router with the reload command.
1. License Activation for Cisco IOS XE 3.13S and later
Unlicensed Cisco IOS XE 3.13S and later has throughput limited to 100 kbps. Comparing to release Cisco IOS XE 3.12S and earlier, evaluation license is not bundled in software. The license is valid for 60 days and it is available at the Cisco Licence Portal.
The following evaluation licenses are available:
- AX technology package license with 50 Mbps maximum throughput
- PPX technology package license with 10 Gbps maximum throughput
If you need an evaluation license for the Security technology package, or for an AX technology package with higher throughput, you must contact your Cisco service representative.
Perform the following steps after the Cisco CSR 1000V first boots:
1.1 Enter the following command to obtain the UDI
Router#show license udi
Picture 3 - Getting License UDI
1.2 Log on to the Cisco Software Licensing portal to obtain the evaluation license
Click on Continue to Product Registration and navigate to Get Other Licenses and select Demo and Evaluation. Under Product Family, select Router & Switches. Under Product , select Cisco Cloud Services Router 1000V and click Next.
Select the evaluation license and a standalone deployment. Select Cisco CSR1000V Maximum throughput AppX Evaluation License. In the UDI Serial Number field, enter the 11-character UD we obtained in a previous step.
Picture 4 - License Registration
Note The UDI is case-sensitive, and should be entered in all capital letters.
Now you can download the evaluation license. The license was also sent to your email address.
1.3 Install license
In a default Qemu NAT mode, an installed guest (Cisco IOS XE) have direct access to the host and its IP address of the guest is obtained from the default built-in Qemu DHCP server. Assuming that you downloaded the evaluation licence file to host with OS Linux, you can upload and install license to your base IOS XE image with following commands:
Router(config)#interface gigabitEthernet 1
Router(config-if)#ip address dhcp
The interface GigabitEthernet 1 should have assigned IP address 10.0.2.15/24 and can reach the IP address of the default gateway 10.0.2.2. Now, we can both download a license file from the Linux and install it with the single command:
Router#license install scp://email@example.com:/92UTSI4VLIZ_20141214141756172.lic
As we installed the APPX feature set evaluation license, we should configure license level appx.
Router(config)#license boot level appx
% use 'write' command to make license boot config take effect on next boot
Router(config)#interface gigabitEthernet 1
Router(config-if)#no ip address
Save configuration and reload a router.
The Cisco CSR 1000V reloads with the evaluation license activated. The evaluation license expires 60 days from when it is activated. You can check the license with the commad:
Router#show license detail
Picture 5 - License Detail
Use the following command to check the allowed throughput:
Router#show platform hardware throughput level
Picture 6 - Platform Hardware Throughput Level
GNS3 Qemu Guest Virtual Machine Configuration
Navigate to Edit-> Preferences -> Qemu-> General Settings. Assuming that you Qemu installation is working configure GNS3 Qemu settings as following:
Picture 7 - Qemu General Settings
Click on the Test button to check if you finshed Qemu General settings configuration. If you settings are correct GNS3 displays the message All components have successfully started.
Navigate to Edit-> Preferences-> Qemu-> Qemu Guest and configure your Qemu guest settings as following.
Picture 8 - Qemu Guest Settings
Testing Connection between Cisco CSR 1000v and 3725 routers
Drag and drop both routers on the GSN3 desktop. Start routers and configure them according the network diagram.
Picture 5 - Network Topology
Be aware that CSR 1000v reserves interface GigabitEthernet 0 for management purpose so use interface GigabitEthernet 1 instead for connection to the Cisco 3725 router. As we previously configured CSR 1000v to direct IOS output to serial port, you can use the serial console. Right click on the device and select option Console.
1. Configure the Hostname, CDP Protocol and the IP Address for the Interface GigabitEthernet 1 of the Cisco CSR 1000v
CSR_1000v(config)#interface GigabitEthernet 1
CSR_1000v(config-if)#ip address 10.10.10.2 255.255.255.252
2. Configure the Hostname and the IP Address for the Interface FastEthernet 0/0 of the Cisco 3725 Router
c3725(config)#interface FastEthernet 0/0
c3725(config-if)#ip address 10.10.10.1 255.255.255.252
3. Check if the Layer 2 and 3 Connection is Established between the Routers
If the Layer 2 connection is established between routers and CDP protocol is enabled on CSR 1000v, it should appear in the output of show cdp neigbours command issed on the Cisco 3725. Similarly, if Layer 3 connection is established between routers, we should be able to successfully ping ip address of CSR 1000v GigabitEthernet interface 10.10.10.2
Picture 9 - Checking Connection between the Routers