9
Brezular's Technical Blog My worthless personal blog about networking Cisco CSR 1000v Installation on Qemu Virtual Machine AUGUST 18, 2013 5 COMMENTS (HTTP://BREZULAR.WORDPRESS.COM/2013/08/18/CISCOCSR1000VINSTALLATIONON QEMUVIRTUALMACHINE/#COMMENTS) The Cisco IOS XE Release 3.10 (http://software.cisco.com/download/release.html? mdfid=284364978&flowid=39582&softwareid=282046477&release=3.9.1S&relind=AVAILABLE&rellif brings support (http://www.cisco.com/en/US/docs/routers/csr1000/software/configuration/csr1000vswcfg.pdf) for Kernel Based Virtual Machine (KVM (http://www.linuxkvm.org/page/Main_Page) ) hypervisor (http://en.wikipedia.org/wiki/Hypervisor) . Thanks to the this awesome enhancement, Cisco CSR 1000v running IOS XE 3.10 can be easily connected to devices running inside GNS3 (http://www.gns3.net/) topology. The goal of this tutorial is to install CSR 1000v IOS XE 3.10 on a virtual machine that is run by Qemu (http://wiki.qemu.org/Main_Page) hypervisor. As the both Guest (http://searchservervirtualization.techtarget.com/tip/HostandguestvirtualmachineDefinitions) and Host (http://searchservervirtualization.techtarget.com/tip/HostandguestvirtualmachineDefinitions) 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 (http://www.cisco.com/en/US/prod/collateral/routers/ps282/product_data_sheet09186a008009203f.html) both running inside GNS3. R EQUIREMENTS 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 P rocessor with builtin hardware virtualization (http://en.wikipedia.org/wiki/Hardware assisted_virtualization) support ( VTx (http://en.wikipedia.org/wiki/X86_virtualization#Intel_virtualization_.28VTx.29) or AMDV (http://en.wikipedia.org/wiki/X86_virtualization#AMD_virtualization_.28AMDV.29) )

Cisco CSR 1000v Avec GNS3

  • Upload
    reno51

  • View
    566

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Cisco CSR 1000v Avec GNS3

Brezular's Technical Blog

My worthless personal blog about networking

Cisco CSR 1000v Installation on QemuVirtual Machine

AUGUST 18, 2013  5 COMMENTS(HTTP://BREZULAR.WORDPRESS.COM/2013/08/18/CISCO­CSR­1000V­INSTALLATION­ON­QEMU­VIRTUAL­MACHINE/#COMMENTS)

The  Cisco  IOS  XE  Release  3.10  (http://software.cisco.com/download/release.html?mdfid=284364978&flowid=39582&softwareid=282046477&release=3.9.1S&relind=AVAILABLE&rellifecycle=ED&reltype=latest)brings  support(http://www.cisco.com/en/US/docs/routers/csr1000/software/configuration/csr1000vswcfg.pdf)  for  KernelBased  Virtual  Machine  (KVM  (http://www.linux­kvm.org/page/Main_Page))  hypervisor(http://en.wikipedia.org/wiki/Hypervisor).  Thanks  to  the  this  awesome  enhancement,  Cisco  CSR  1000vrunning  IOS XE   3.10  can be  easily  connected  to  devices  running  inside GNS3  (http://www.gns3.net/)topology.  The goal of this tutorial is to install CSR 1000v IOS XE 3.10 on a virtual machine that is run byQemu  (http://wiki.qemu.org/Main_Page)  hypervisor.  As  the  both  Guest(http://searchservervirtualization.techtarget.com/tip/Host­and­guest­virtual­machine­Definitions)  and  Host(http://searchservervirtualization.techtarget.com/tip/Host­and­guest­virtual­machine­Definitions)CPU  arethe  same  x86  architecture, Qemu  can  use  kvm  for  hardware  assisted  virtualization.  In  a  last  part  of  thetutorial  we  will  configure  GNS3  to  support  CSR  1000v  Qemu  Virtual  machine  and  test  connectionbetween  CSR  1000v  and  Cisco  3725(http://www.cisco.com/en/US/prod/collateral/routers/ps282/product_data_sheet09186a008009203f.html) both running inside GNS3.

REQUIREMENTS

1. Hardware Requirements

 Computer with at least 6 GB RAMEach CSR 1000v Virtual machine consumes 4 GB RAM plus 2 GB RAM for OS and installedapplications e.g. GNS3, DynamipsProcessor with built­in hardware virtualization (http://en.wikipedia.org/wiki/Hardware­assisted_virtualization)support (VT­x(http://en.wikipedia.org/wiki/X86_virtualization#Intel_virtualization_.28VT­x.29) or AMD­V(http://en.wikipedia.org/wiki/X86_virtualization#AMD_virtualization_.28AMD­V.29))

Page 2: Cisco CSR 1000v Avec GNS3

2. Software Requirements

 Linux Fedora 17 x86­64 (or any other x86 or x86­64 Linux) with working KVM and Qemuinstallation KVM installation (http://brezular.wordpress.com/2012/11/07/%EF%BB%BFkvm­installation­on­fedora/)on Fedora Linux  Qemu installation (http://brezular.wordpress.com/2012/02/12/installation­solaris­sparc­2­6­sunos­5­6­on­qemu­part­1­qemu­installation/) on Fedora LinuxGNS3 0.8.4 configured for Qemu and Dynamips hypervisor supportDynamips installation (http://brezular.wordpress.com/2011/03/14/dynamips­0­2­8­rc3­installation­from­source­on­linux­fedora/) on Fedora Linux Qemu 1.6.0 compiled for i386 support (Qemu 0.12 is oficially supported in a CSR 1000v  software configuration guide(http://www.cisco.com/en/US/docs/routers/csr1000/software/configuration/csr1000Vswcfg.html)) Dynamips 0.2.8­RC7­x86_64.bin CSR 1000v IOS XE Release 3.10.0S  ­ Download Page(http://software.cisco.com/download/release.html?mdfid=284364978&flowid=39582&softwareid=282046477&release=3.9.1S&relind=AVAILABLE&rellifecycle=ED&reltype=latest)

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 ­smp4,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  bitbinary may be used to run a Virtual machine but CPU model Nehalem must be explicitly configured. Alsobe aware of RAM requirement. If less than RAM 4096 MB is assigned to a Virtual machine, installationfails.  Finally,  CSR  1000v  IOS  XE  Release  3.10  only  supports  virtio­net­pci  NIC  model  for  kvmhypervisor.

Page 3: Cisco CSR 1000v Avec GNS3

(http://brezular.files.wordpress.com/2013/08/picture1.jpeg)

Picture 1 – CSR 1000v Boot Window

CSR 1000v is installed automatically. Once finished, it will restart and finally the router prompt appears.

(http://brezular.files.wordpress.com/2013/08/picture21.jpeg)

Picture 2 – Prompt Window

3. After Install Tasks – License Activation and Direct IOS output to a Serial Port

Page 4: Cisco CSR 1000v Avec GNS3

Cisco  CSR  1000v  license  model  and  benefits  of  activation  an  evaluation  license  is  explained  here(https://brezular.wordpress.com/2013/08/11/managing­cisco­csr­1000v­installed­on­vmware­player/)  inmore details. To activate evaluation license, us the following command:

CSR_1000v(config)#license boot level premium

Save configuration and reboot a router with the reload command. In order to  direct IOS output to serialport use the following command:

CSR_1000v(config)#platform console serial

Save configuration with the write command:

CSR_1000v(config)#do write

GNS3 Qemu Guest Virtual Machine Configuration

Navigate  to  Edit­>  Preferences­>  Qemu­>  General  Settings.  Assuming  that  you  Qemu  installation  isworking configure GNS3 Qemu settings as following:

Page 5: Cisco CSR 1000v Avec GNS3

(http://brezular.files.wordpress.com/2013/08/picture4.jpeg)

Picture 3 – Qemu General Settings

Click on the Test button to check if you configured Qemu General settings properly. If yes, GNS3 willshow the message All components have successfully started.

Navigate to Edit­> Preferences­> Qemu­> Qemu Guest and configure your Qemu guest settings asfollowing.

Page 6: Cisco CSR 1000v Avec GNS3

(http://brezular.files.wordpress.com/2013/08/picture3.jpeg)

Picture 4 – Qemu Guest Settings

Testing Connection between Cisco CSR 1000v and 3725routers

Drag and drop both routers on the GSN3 desktop. Start routers and configure them according the networkdiagram.

Page 7: Cisco CSR 1000v Avec GNS3

(http://brezular.files.wordpress.com/2013/08/picture510.jpeg)

Picture 5 – Network Topology

Be aware that CSR 1000v reserves interface GigabitEthernet 0 for management purpose so use interfaceGigabitEthernet  1  instead  for  connection  to  the  Cisco  3725  router.  As  we  previously  configured  CSR1000v  to direct  IOS output  to  serial  port,  you  can use  the  serial  console. Right  click on  the device  andselect option Console.

1. Configure the Hostname, CDP Protocol and the IP Address for the Interface GigabitEthernet 1of the Cisco CSR 1000v

Router>enableRouter#conf tRouter(config)#hostname CSR_1000vCSR_1000v(config)#cdp runCSR_1000v(config)#interface GigabitEthernet 1CSR_1000v(config­if)#ip address 10.10.10.2 255.255.255.252CSR_1000v(config­if)#cdp enableCSR_1000v(config­if)#no shutdownCSR_1000v(config­if)#do write

2. Configure the Hostname and the IP Address for the Interface FastEthernet 0/0 of the Cisco 3725Router

Router>enableRouter#conf tRouter(config)#hostname c3725c3725(config)#interface FastEthernet 0/0c3725(config­if)#ip address 10.10.10.1 255.255.255.252c3725(config­if)#no shutdownc3725(config­if)#do write

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, itshould appear in the output of show cdp neigbours command issed on the Cisco 3725. Similarly, if Layer 3connection is established between routers, we should be able to successfully ping ip address of CSR 1000vGigabitEthernet interface 10.10.10.2

Page 8: Cisco CSR 1000v Avec GNS3

(http://brezular.files.wordpress.com/2013/08/picture6.jpeg)

Picture 6 –  Checking Connection between the Routers

FILED UNDER CSR 1000V  TAGGED WITH 3.10.0S, CSR 1000V, GNS3, IOS XE, QEMU

About brezular"True freedom is an inner thing. It is a state of mind. It is a deliberate exercise of choice. Thus, if we thinkwe are bound by external forces, we are deceiving ourselves. It is our willing acquiescence to these outerdemands that imprisons. Free yourself today. Take control of your thoughts."

5 Responses to Cisco CSR 1000v Installation on QemuVirtual Machine

Pingback: Cisco CSR 1000v and VMware fusion howtos ­ GNS3

Ozone007 says:September 27, 2013 at 9:19 amExcellent as Always

Replymaxim40 says:September 28, 2013 at 3:03 pmHi brezular,

I tried it on ubuntu 12.04 64bit but i when i tried to start virtual machine i had the following error. Itried everything with SDL with no success

No protocol specifiedNo protocol specifiedCould not initialize SDL(No available video device) – exitingis it possible to help me?

About these ads (http://en.wordpress.com/about­these­ads/)

Page 9: Cisco CSR 1000v Avec GNS3

Thank you

Replybrezular says:September 29, 2013 at 7:39 pmWhat is the exact command syntax you use to start your image?

Replymaxim40 says:September 30, 2013 at 9:01 pmHi brezular,

Now it is working without changing anything. I run again the command to send it to you and itis working.

Thank you very much

Blog at WordPress.com.

The Enterprise Theme.