温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

在Qemu上安装Cisco CSR 1000v

发布时间:2020-07-12 22:36:23 来源:网络 阅读:2467 作者:Mark_L_Zhang 栏目:移动开发

Cisco CSR 1000v Installation on Qemu Virtual Machine

AUGUST 18, 2013 5 COMMENTS

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.

REQUIREMENTS

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 installation on Fedora Linux 
  • Qemu installation on Fedora Linux
  • GNS3 0.8.4 configured for Qemu and Dynamips hypervisor support
  • Dynamips installation on Fedora Linux
  •  Qemu 1.6.0 compiled for i386 support (Qemu 0.12 is oficially supported in a CSR 1000v  software configuration guide)
  •  Dynamips 0.2.8-RC7-x86_64.bin
  •  CSR 1000v IOS XE Release 3.10.0S  - 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.

在Qemu上安装Cisco CSR 1000v

Picture 1 – CSR 1000v Boot Window

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

在Qemu上安装Cisco CSR 1000v

Picture 2 – Prompt Window

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

Cisco CSR 1000v license model and benefits of activation an evaluation license is explained here in more 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 serial port 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 is working configure GNS3 Qemu settings as following:

在Qemu上安装Cisco CSR 1000v

Picture 3 – Qemu General Settings

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

Navigate to Edit-> Preferences-> Qemu-> Qemu Guest and configure your Qemu guest settings as following.

在Qemu上安装Cisco CSR 1000v

Picture 4 – 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.

在Qemu上安装Cisco CSR 1000v

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

Router>enable
Router#conf t
Router(config)#hostname CSR_1000v
CSR_1000v(config)#cdp run
CSR_1000v(config)#interface GigabitEthernet 1
CSR_1000v(config-if)#ip address 10.10.10.2 255.255.255.252
CSR_1000v(config-if)#cdp enable
CSR_1000v(config-if)#no shutdown
CSR_1000v(config-if)#do write

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

Router>enable
Router#conf t
Router(config)#hostname c3725
c3725(config)#interface FastEthernet 0/0
c3725(config-if)#ip address 10.10.10.1 255.255.255.252
c3725(config-if)#no shutdown
c3725(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, 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

在Qemu上安装Cisco CSR 1000v

Picture 6 –  Checking Connection between the Routers

转自:http://brezular.wordpress.com/2013/08/18/cisco-csr-1000v-installation-on-qemu-virtual-machine/

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

sr 00
AI