Unetlab – Setting up vIOS and ASAs

More fun with UnetLab today!

I am back to running it on the ESXi server, so have plenty of memory and CPU cores. It should be nice and fast!UNetLab on ESXi

Yesterday was fun, I added IOL images and XRv, so today let’s add vIOS, and, if I can, an ASA!

vIOS on UnetLab

I am going to try and get the vIOS images from the OnePK (all in one image) running. Andrea already has a guide to this, so it shouldn’t be too hard. The original documentation is here.
Firstly you can see the amount of space I have free, I then copy (using FileZilla) the OVA file onto the VM, and again you can see the space taken up. I then follow Andrea’s steps (though I did play with the folder name…)
UNetLab on ESXi

Following the documentation through (or so I thought), I then created a lab, added a network, and tried to add a vIOS node.

But the list was empty.

So, I read through the doc again, and some of the comments. Andrea tells us what the image name should be, so I created a folder to match the version, and moved the HDA file into there:

UNetLab on ESXi
Now we are good!

Adding UNetLab nodes

Topology

The topology looks like this: Running vIOS on UNetLab

So let’s try configuring the routers!

Router(config)#ho vIOS-1
vIOS-1(config)#int gi 0/0
vIOS-1(config-if)#ip add 10.1.1.1 255.255.255.0
vIOS-1(config-if)#no shut
vIOS-1(config-if)#cdp enable 
vIOS-1(config-if)#exit
vIOS-1(config)#cdp run 
vIOS-1(config)#exit
vIOS-1#sh ip int bri
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0     10.1.1.1        YES manual up                    up      
GigabitEthernet0/1     unassigned      YES unset  administratively down down    
GigabitEthernet0/2     unassigned      YES unset  administratively down down    
GigabitEthernet0/3     unassigned      YES unset  administratively down down    
vIOS-1#

Router(config)#ho vIOS-2
vIOS-2(config)#int gi 0/0
vIOS-2(config-if)#ip add 10.1.1.2 255.255.255.0
vIOS-2(config-if)#no shut
vIOS-2(config-if)#cdp en 
vIOS-2(config-if)#exit
vIOS-2(config)#cdp run
vIOS-2(config)#exit
vIOS-2#s
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0     10.1.1.2        YES manual up                    up      
GigabitEthernet0/1     unassigned      YES unset  administratively down down    
GigabitEthernet0/2     unassigned      YES unset  administratively down down    
GigabitEthernet0/3     unassigned      YES unset  administratively down down    
vIOS-2#sh cdp neigh
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone, 
                  D - Remote, C - CVTA, M - Two-port Mac Relay 

Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
vIOS-1           Gig 0/0           150              R B   IOSv      Gig 0/0

Total cdp entries displayed : 1
vIOS-2#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/5/12 ms
vIOS-2#

Easy.

I took the first screenshot at 13:22, it’s now 13:58, and I have written this whilst setting it all up. 30 minutes or less!

ASA on UNetLab

Not sure how this will go. There isn’t a guide for it, so It’s going to be a lot of guess work!

I start by copying the two VMDK files I have to the /tmp directory:

root@iou:/# ls /tmp
ASA-8.42-1.vmdk  ASA-8.42.vmdk
root@iou:/#

Then I convert them:

root@iou:/tmp# qemu-img convert -f vmdk -O qcow2 ASA-8.42.vmdk hda.qcow2
root@iou:/tmp# qemu-img convert -f vmdk -O qcow2 ASA-8.42-1.vmdk hdb.qcow2
root@iou:/tmp#

I then move to the right directory, and move the files there:

root@iou:/opt/unetlab/addons/qemu# mkdir ASA-8.42
root@iou:/opt/unetlab/addons/qemu# mv /tmp/hda.qcow2 ASA-8.42/
root@iou:/opt/unetlab/addons/qemu# mv /tmp/hdb.qcow2 ASA-8.42/
root@iou:/opt/unetlab/addons/qemu# /opt/unetlab/wrappers/unl_wrapper -a fixpermissions
root@iou:/opt/unetlab/addons/qemu#

Surprisingly… There is nothing there when I try and add a node:

UNetLab missing node

At this point I started reading some of the other documents. I went through all of them until I got to the F5 BIG-IP document. Here we have another example of a 2 part system. I was happy that I had named the files hda and hdb, but then I thought – let’s just try making the folder name lower case. So I edited it in FileZilla:

root@iou:~# ls /opt/unetlab/addons/qemu/
asa-8.42  vios-adventerprisek9-m15.4-1.2.0-173  xrv-k9-5.2.2
root@iou:~#

All of a sudden, I have the option for ASAs!

Running ASAs in UNetLab
So. let’s create a new lab and connect everything up!
Running ASAs in UNetLab
This has all been a bit of a shot in the dark. Not knowing if I could get them running, I thought I would give it a go. But here is the thing…. are they usable?
There is a moment of wonder, as I sit staring at a blank telnet session, then suddenly…
Running ASAs in UNetLabLet’s just prove we can run them, and have connectivity between them:
ciscoasa(config)# hostname ASA1
ASA1(config)# int gi 0  
ASA1(config-if)# ip add 10.1.1.1 255.255.255.0
ASA1(config-if)# nameif Outside
INFO: Security level for "Outside" set to 0 by default.
ASA1(config-if)# 
ASA1(config-if)# no shut
ASA1(config-if)# 

ciscoasa(config)# hostname ASA2
ASA2(config)# int gi 0
ASA2(config-if)# ip add 10.1.1.2 255.255.255.0
ASA2(config-if)# no shut
ASA2(config-if)# nameif Outside
INFO: Security level for "Outside" set to 0 by default.
ASA2(config-if)#  

ASA1# ping 10.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/10 ms
ASA1# 

ASA2# ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/10 ms
ASA2#

Wow!

So, in two days, with a total of about three hours, I now have one environment that will run IOL routers, XRv routers, vIOS routers and ASAs.

Now that is impressive!

I might even try and add Titanium to UNetLab as well! But not today.

38 Comments

  1. Anonymous February 23, 2015
  2. Stuart Fordham February 23, 2015
  3. Anonymous March 15, 2015
  4. Stuart Fordham March 15, 2015
  5. Anonymous March 27, 2015
  6. Stuart Fordham March 27, 2015
  7. Anonymous April 2, 2015
  8. Anonymous May 6, 2015
  9. Anonymous June 10, 2015
  10. Stuart Fordham June 10, 2015
  11. Anonymous June 17, 2015
  12. Anonymous June 17, 2015
  13. Anonymous August 23, 2015
  14. Stuart Fordham August 23, 2015
  15. Anonymous September 15, 2015
  16. Stuart Fordham September 15, 2015
  17. Unknown September 16, 2015
  18. Hector Cedeno September 16, 2015
  19. Hector Cedeno September 16, 2015
  20. Anonymous October 1, 2015
  21. Trentahedron November 6, 2015
  22. Anonymous December 27, 2015
  23. Stuart Fordham December 27, 2015
  24. Zed January 15, 2016
  25. Stuart Fordham January 15, 2016
  26. Zed February 11, 2016
  27. Zed February 11, 2016
  28. Zed February 12, 2016
  29. Alex Moon April 1, 2016
  30. Anonymous May 20, 2016
  31. Stuart Fordham May 20, 2016
  32. Lazy's World June 23, 2016
  33. Stuart Fordham June 23, 2016
  34. Fanie van Vuuren September 22, 2016
  35. Fanie van Vuuren September 22, 2016
  36. Javed April 13, 2017
  37. venerzky June 9, 2017

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.