2014年3月22日 星期六

Running IOS XRv on VMware Workstation

Cisco IOS XRv Router

The Cisco IOS XRv Router is a Virtual Machine (VM) based platform running 32-bit IOS XR software with the QNX microkernel. This VM contains a single route processor (RP) with control plane functionality, and line card (LC) network interfaces with their associated functionality. It is a representation of the IOS XR software and operating system, including manageability, control plane features, routing and forwarding functionality. The Cisco IOS XRv Router is not an emulation of any physical router or hardware component.

實驗架構類似下圖,只是ESXi 改成 VMware workstation。

1. 下載 IOS XRv (5.1.1) Demo Image
2. 修改 .vmx 增加下列設定
因為IOS XRv沒有顯示畫面,所以將console導到9001。

serial0.present = "TRUE"
serial0.fileType = "network"
serial0.fileName = "telnet://127.0.0.1:9001"
serial0.startConnected = "TRUE"
serial0.yieldOnMsrRead = "TRUE"

如需增加網路埠,複製所有ethernet0,並改為 ethernet X即可。

3.  telnet localhost 9001

登入後設定帳號密碼,之後也可以用 cisco/ cisco登入。
這部分請不要用WIN cmd 登入,請使用putty,不然你會錯誤如下。

Password: RP/0/0/CPU0:Mar 23 04:32:37.779 : exec[65709]: %SECURITY-login-4-AUTHE
N_FAILED : Failed authentication attempt by user 'cisco' from 'console' on 'con0
_0_CPU0'


4. 設定網路
這邊我設定snmp來測試,g0/0/0/0設定vmnet 的網路,g0/0/0/1 使用LAN segment。

RP/0/0/CPU0:ios#conf t
RP/0/0/CPU0:ios(config)#int g0/0/0/0
RP/0/0/CPU0:ios(config-if)#ip add 192.168.1.2/24
RP/0/0/CPU0:ios(config-if)#exit
RP/0/0/CPU0:ios(config)#int g0/0/0/1
RP/0/0/CPU0:ios(config-if)#ip add 10.1.1.2/24
RP/0/0/CPU0:ios(config-if)#exit
RP/0/0/CPU0:ios(config)#snmp-server community public RO
RP/0/0/CPU0:ios(config)#commit

設定完,config如下。

Building configuration...
!! IOS XR Configuration 5.1.1
!! Last configuration change at Sun Mar 23 03:50:32 2014 by cisco
!
snmp-server community public RO
snmp-server community private RW
interface MgmtEth0/0/CPU0/0
 shutdown
!
interface GigabitEthernet0/0/0/0
 ipv4 address 192.168.1.2 255.255.255.0
!
interface GigabitEthernet0/0/0/1
 ipv4 address 10.1.1.2 255.255.255.0
!
end

測試SNMP來取得網路埠資訊,結果如下圖:

目前還無法設定 SSH,也還不知道如何將console 導出,而不是侷限在local,因為想寫個程式來控制網路,不然就只能使用SNMP控制了。

參考
Cisco IOS-XRv (V as in Virtual!)
Running IOS XRv on VMware Fusion/Workstation
Connecting IOS-XRv to dynamips through vmware
Cisco IOS XRv Router Overview
INTRODUCTION TO CISCO IOS XR