Welcome Guest, Not a member yet? Create Account  




Howto make all-in-one VM with IOSv and L2IOU for INE RSv5 topology

#1
Offer 

Here is a guide how to prepare VM with INE RSv5 Topology using IOSv and L2 IOU.

I use VMware Player and prefer Ubuntu Server 14.04 LTS x86_64, you may use whatever you'd like. You are responsible for any damage that could be result of following this guide.

1. Setup VM:

Create a new clean VM with 2 virtual core CPU and at least 2 Gig RAM. In the processor settings mark "Virtualize Intel VT-x/EPT or AMD-V/RVI". Remove anything from VM devices exept Memory, Processor, Harddisk, Network Adapter, Display and CD-ROM. Specify installation image of your Linux in CD-ROM settings. Set Network Adapter to "NAT" mode. I recommed you should allocate 10G for Harddisk. VMware VM preparation wizard will ask you some questions to simplify setup process, like user name, password  (I use cisco/cisco) and so on.

2. Install Ubuntu Linux:


Power up the VM and proceed with Ubuntu installation. It will pass almost without any additiona questions. Do not forget to mark for setup "SSH server". After finish of the setup remove cdrom from the configuration of VM.

3. Update Ubuntu and install required soft:


$ sudo nano /etc/apt/source.list

comment out or remove anything exept following enties:


deb
Hidden Content:
You must reply to see links
trusty main restricted
deb
Hidden Content:
You must reply to see links
trusty-updates main restricted
deb
Hidden Content:
You must reply to see links
trusty universe
deb
Hidden Content:
You must reply to see links
trusty-updates universe
deb
Hidden Content:
You must reply to see links
trusty-security main restricted

as we going to run some x86 binaries add them to selection:
$ sudo dpkg --add-architecture i386

do update apt cache and install latest fixes:

$ sudo apt-get update && apt-get upgrade

install necessary binaries:

$ sudo apt-get install qemu-systems-x86 libssl1.0.0:i386

make symlink for missing shared libraries:

$ sudo ln -s /lib/i386-linux-gnu/libcrypto.so.1.0.0 /lib/i386-linux-gnu/libcrypto.so.4

Power down VM and change Network Adapter mode to 'Host-only'. Start it again.

4. Find and copy to VM binaries of L2IOU:


You need 'wrapper-linux' (could be found in iou-web package, under /bin
Hidden Content:
You must reply to see links
), iouyap (
Hidden Content:
You must reply to see links
), L2IOU binaries, and license key. I can't provide you with links for download, use this forum or google them. Once you get them, copy them to ~/lab/ with WinSCP. Make them executable:

$ chmod +x ~/lab/*

Pur you IOU license to ~/.iourc and /root/.iourc:

$ nano ~/.iourc

add

[license]
<hostname_here> = <key>;

the same for '/root/.iourc', replace <hostname_here> with actual name of your VM.

prevent some undesired communications:

$ sudo echo "127.1.0.1 xml.cisco.com" > /etc/hosts

5. Download and copy to the VM image of IOSv:


Download all-in-one VM image of onePK devkit from developer.cisco.com (free registration) and extract IOSv image or just use one of shared here. Unzip obtained vios-adventerprisek9-m.ova. We need only vios-adventerprisek9-m.vmdk.

Lets make our work directory for that:

$ mkdir ~/lab

use WinSCP to copy 'vios-adventerprisek9-m.vmdk' from your host machine to the VMs' ~/lab/

6. Prepare NETMAP topology for L2:


I use four switches and following NETMAP file to connect them together and further to IOSv:

$ nano ~/lab/NETMAP

20:0/1  100:0/1
20:0/2  40:0/2
20:0/3  40:0/3
20:1/0  50:1/0
20:1/1  50:1/1
20:1/2  30:1/2
20:1/3  30:1/3
30:0/2  50:0/2
30:0/3  50:0/3
30:1/0  40:1/0
30:1/1  40:1/1
40:1/2  50:1/2
40:1/3  50:1/3

7. Make 10 copies of IOSv: 


IOSv is a virtual machine itself so you have to make 10 copies to prepare INE RSv5 topology:

$ cd ~/lab;
$ copy vios-adventerprisek9-m.vmdk R1-vios-adventerprisek9-m.vmdk
...
$ copy vios-adventerprisek9-m.vmdk R10-vios-adventerprisek9-m.vmdk

At this moment you must have all binaries (wrapper-linux, iouyap, L2IOU image) in ~/lab and 10 copies of 'vios-adventerprisek9-m.vmdk'

8. Make a start and stop script:


! Replace <L2IOU_name_here>, <IOSv_name_here> below with actual names of your images. !

Lets make a script to start our topology:

$ nano ~/lab/start

and put following there:

# start our L2IOU

./wrapper-linux -m ./<L2IOU_name_here> -p 1200 -- -e 2 -s 0 20 2>&1 > /dev/null & sleep 10
./wrapper-linux -m ./<L2IOU_name_here> -p 1300 -- -e 2 -s 0 30 2>&1 > /dev/null & sleep 10
./wrapper-linux -m ./<L2IOU_name_here> -p 1400 -- -e 2 -s 0 40 2>&1 > /dev/null & sleep 10
./wrapper-linux -m ./<L2IOU_name_here> -p 1500 -- -e 2 -s 0 50 2>&1 > /dev/null & sleep 10

# start qemu with IOSv

qemu-system-x86_64 -name R1 -daemonize -enable-kvm -vga none -vnc none -m 384 -serial telnet:0.0.0.0:1010,server,nowait -drive if=virtio,file=./<IOSv_name_here> -net tap,ifname=tap1010 -net nic,model=e1000,macaddr=52:54:00:00:00:01 2>&1 > /dev/null ; sleep 10
qemu-system-x86_64 -name R2 -daemonize -enable-kvm -vga none -vnc none -m 384 -serial telnet:0.0.0.0:1020,server,nowait -drive if=virtio,file=./<IOSv_name_here> -net tap,ifname=tap1020 -net nic,model=e1000,macaddr=52:54:00:00:00:02 2>&1 > /dev/null ; sleep 10
qemu-system-x86_64 -name R3 -daemonize -enable-kvm -vga none -vnc none -m 384 -serial telnet:0.0.0.0:1030,server,nowait -drive if=virtio,file=./<IOSv_name_here> -net tap,ifname=tap1030 -net nic,model=e1000,macaddr=52:54:00:00:00:03 2>&1 > /dev/null ; sleep 10
qemu-system-x86_64 -name R4 -daemonize -enable-kvm -vga none -vnc none -m 384 -serial telnet:0.0.0.0:1040,server,nowait -drive if=virtio,file=./<IOSv_name_here> -net tap,ifname=tap1040 -net nic,model=e1000,macaddr=52:54:00:00:00:04 2>&1 > /dev/null ; sleep 10
qemu-system-x86_64 -name R5 -daemonize -enable-kvm -vga none -vnc none -m 384 -serial telnet:0.0.0.0:1050,server,nowait -drive if=virtio,file=./<IOSv_name_here> -net tap,ifname=tap1050 -net nic,model=e1000,macaddr=52:54:00:00:00:05 2>&1 > /dev/null ; sleep 10
qemu-system-x86_64 -name R6 -daemonize -enable-kvm -vga none -vnc none -m 384 -serial telnet:0.0.0.0:1060,server,nowait -drive if=virtio,file=./<IOSv_name_here> -net tap,ifname=tap1060 -net nic,model=e1000,macaddr=52:54:00:00:00:06 2>&1 > /dev/null ; sleep 10
qemu-system-x86_64 -name R7 -daemonize -enable-kvm -vga none -vnc none -m 384 -serial telnet:0.0.0.0:1070,server,nowait -drive if=virtio,file=./<IOSv_name_here> -net tap,ifname=tap1070 -net nic,model=e1000,macaddr=52:54:00:00:00:07 2>&1 > /dev/null ; sleep 10
qemu-system-x86_64 -name R8 -daemonize -enable-kvm -vga none -vnc none -m 384 -serial telnet:0.0.0.0:1080,server,nowait -drive if=virtio,file=./<IOSv_name_here> -net tap,ifname=tap1080 -net nic,model=e1000,macaddr=52:54:00:00:00:08 2>&1 > /dev/null ; sleep 10
qemu-system-x86_64 -name R9 -daemonize -enable-kvm -vga none -vnc none -m 384 -serial telnet:0.0.0.0:1090,server,nowait -drive if=virtio,file=./<IOSv_name_here> -net tap,ifname=tap1090 -net nic,model=e1000,macaddr=52:54:00:00:00:09 2>&1 > /dev/null ; sleep 10
qemu-system-x86_64 -name R10 -daemonize -enable-kvm -vga none -vnc none -m 384 -serial telnet:0.0.0.0:1100,server,nowait -drive if=virtio,file=./<IOSv_name_here> -net tap,ifname=tap1100 -net nic,model=e1000,macaddr=52:54:00:00:00:0a 2>&1 > /dev/null ; sleep 10
# prepare network and connec all together

ip tuntap add dev tap1200 mode tap 2>&1 > /dev/null
ip link set dev tap1200 up  2>&1 > /dev/null

ip link add br100 type bridge 2>&1 > /dev/null

ip link set tap1010 master br100 2>&1 > /dev/null
ip link set tap1020 master br100 2>&1 > /dev/null
ip link set tap1030 master br100 2>&1 > /dev/null
ip link set tap1040 master br100 2>&1 > /dev/null
ip link set tap1050 master br100 2>&1 > /dev/null
ip link set tap1060 master br100 2>&1 > /dev/null
ip link set tap1070 master br100 2>&1 > /dev/null
ip link set tap1080 master br100 2>&1 > /dev/null
ip link set tap1090 master br100 2>&1 > /dev/null
ip link set tap1100 master br100 2>&1 > /dev/null
ip link set tap1200 master br100 2>&1 > /dev/null

ip addr add 150.0.0.100/24 dev br100
ip link set br100 up 2>&1 > /dev/null

~./iouyap -d -q -c -t tap1200 100:0/1 2>&1 > /dev/null

Lets make a script to stop our topology:

$ nano ~/lab/stop

and put following there:

killall <L2IOU_name_here>
killall wrapper-linux
killall qemu-system-x86_64
killall iouyap

ip link set br100 down 2>&1 > /dev/null

ip link set tap1010 nomaster 2>&1 > /dev/null
ip link set tap1020 nomaster 2>&1 > /dev/null
ip link set tap1030 nomaster 2>&1 > /dev/null
ip link set tap1040 nomaster 2>&1 > /dev/null
ip link set tap1050 nomaster 2>&1 > /dev/null
ip link set tap1060 nomaster 2>&1 > /dev/null
ip link set tap1070 nomaster 2>&1 > /dev/null
ip link set tap1080 nomaster 2>&1 > /dev/null
ip link set tap1090 nomaster 2>&1 > /dev/null
ip link set tap1100 nomaster 2>&1 > /dev/null
ip link set tap1200 nomaster 2>&1 > /dev/null

ip link delete br100 2>&1 > /dev/null

ip link set dev tap1200 down 2>&1 > /dev/null
ip link delete dev tap1200 2>&1 > /dev/null

9. We are ready:


Make our script executable and bring up our topology:

$ chmod +x ~/lab/start ~/lab/start
$ cd ~/lab && ./start

to kill all instances and remove virtual interconnections use:

$ ~/lab/stop

10. Connect to the topology:


Use Putty to connect to virtual topology from your host machine:

R1: <VM_IP> port 1010
R2: <VM_IP> port 1020
R3: <VM_IP> port 1030
R4: <VM_IP> port 1040
R5: <VM_IP> port 1050
R6: <VM_IP> port 1060
R7: <VM_IP> port 1070
R8: <VM_IP> port 1080
R9: <VM_IP> port 1090
R10: <VM_IP> port 1100
SW1: <VM_IP> port 1200
SW2: <VM_IP> port 1300
SW3: <VM_IP> port 1400
SW4: <VM_IP> port 1500

All IOSv instances are connected to the same 'virtual bridge' as well as L2IOU via SW1 E0/1, accordingly to INE topology. You can configure instances all together as per INE's design and use SW E0/1. All works. IOSv instances can easily communicate with (or via) L2IOU.

Done.

PS of course it is only bones, you could make it with any flavor you'd like. Such a way you could build almost any topology (but only with ethernet interfaces). This topology requires 10-15% of i5 CPU and 2Gig RAM during labbing. 


.txt   Download link.txt (Size: 10.04 KB / Downloads: 67)
Hidden Content:
You must reply to see attachments
Reply

#2
REQ 

thanks
Reply

#3

thank you
Reply

#4

thanks!
Reply

#5

thanks
Reply

#6

thank you
Reply

#7

thanks Smile
Reply

#8

thanks
Reply

#9

Thank you
Reply

#10

Thanks
Reply





Users browsing this thread:
1 Guest(s)