Pages

UNL aka UNetLab aka Unified Networking Lab, Setup issues


UNL aka UNetLab aka Unified Networking Lab
http://www.unetlab.com/


==== URL Telnet/SSH/VNC Integration On Windows
http://www.unetlab.com/2015/03/url-telnet-ssh-vnc-integration-on-windows/
UNetLab is currently using two console types:
textual: using the telnet:// URL
graphic (included non-serial textual consoles): using the vnc:// URL

On Windows the VNC viewer suggested is UltraVnc.
 * PuTTY
 * UltraVnc
 * additional file from UNetLab repository

Install UltraVnc using default settings. By default destination path is C:\Program Files\uvnc bvba . Unpack the Windows 64bit Url Integration.zip file, move the vnc_wrapper.bat file in the same folder of UltraVnc C:\Program Files\uvnc bvba.
The vnc_wrapper.bat parses vnc:// URL and starts UltraVnc using UNetLab server and port:
@ECHO OFF
SET S=%1
SET S=###%S%###
SET S=%S:"###=%
SET S=%S:###"=%
SET S=%S:###=%
SET S=%S:vnc://=%
start "VNCViewer" "C:\Program Files\uvnc bvba\UltraVNC\vncviewer.exe" -connect %S% -disableclipboard -shared
Install the win7_64bit.reg in the Windows registry. This reg file configures bind the vnc:// URL and UltraVnc:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\telnet]
@="URL:Telnet Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\telnet\shell]
[HKEY_CLASSES_ROOT\telnet\shell\open]
[HKEY_CLASSES_ROOT\telnet\shell\open\command]
@="\"C:\\Program Files (x86)\\PuTTY\\putty.exe\" %1"
[HKEY_CLASSES_ROOT\ssh]
@="URL:SSH Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\ssh\shell]
[HKEY_CLASSES_ROOT\ssh\shell\open]
[HKEY_CLASSES_ROOT\ssh\shell\open\command]
@="\"C:\\Program Files (x86)\\PuTTY\\putty.exe\" %1"
[HKEY_CLASSES_ROOT\vnc]
@="URL:VNC Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\vnc\shell]
[HKEY_CLASSES_ROOT\vnc\shell\open]
[HKEY_CLASSES_ROOT\vnc\shell\open\command]
@="\"C:\\Program Files\\uvnc bvba\\UltraVNC\\vnc_wrapper.bat\" %1"
Now both telnet:// and vnc:// URLs should be openable using browser on Windows.



==== UNL Update
apt-get update
apt-get -o Dpkg::Options::="--force-overwrite" install unetlab
....
unetlab is already the newest version.
==== Add some IOS
SCP to folder /opt/unetlab/addons/iol/bin
/opt/unetlab/wrappers/unl_wrapper -a fixpermissions

==== iourc
# cat /opt/unetlab/addons/iol/bin/iourc
[license]
unl01 = 0123456789abcdef;

==== test
# cd /opt/unetlab/addons/iol/bin
# touch NETMAP
# LD_LIBRARY_PATH=/opt/unetlab/addons/iol/lib /opt/unetlab/addons/iol/bin/L3-i86bi_linux-adventerprisek9-ms.154-1.T_AntiGNS3  100

==== And yes, because IOL uses half duplex, we expect a musmatch error:
*Mar  1 00:02:54.535: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not half duplex), with R3 Ethernet0/0 (half duplex).

===== Idle-PC  and 100% CPU for dynamips
http://www.unetlab.com/2014/11/adding-dynamips-images/
$ dynamips -P 7200 -t 7200 /opt/unetlab/addons/dynamips/c7200-adventerprisek9-mz.124-24.T5.image

Wait for the following line on the console:
Would you like to enter the initial configuration dialog? [yes/no]:
After few more seconds press CTRL + ] then i. Dynamips will show suggested Idle PC values:
Please wait while gathering statistics...
Done. Suggested idling PC:
   0x606e0000 (count=64)
   0x60210c60 (count=51)
   0x606de3f0 (count=63)
   0x606df838 (count=60)
Restart the emulator with "--idle-pc=0x606e0000" (for example)

0x6160dec4
Modify this in
/opt/unetlab/html/templates/c7200.php

Select one and restart dynamips with the IDle PC value:
dynamips -P 1700 -t 1710 --idle-pc 0x80369ac4 /opt/unetlab/addons/dynamips/c1710-bk9no3r2sy-mz.124-23.image

If CPU usage is lower, then a good Idle PC value has been found:
  PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND
 3598 root      20   0  346700 125328 109828 S  5.3 25.3   0:03.98 dynamips

If CPU is still busy, then another value must be tested.

==== RAM used by different IOS
http://www.unetlab.com/2014/11/create-the-first-lab/
http://www.unetlab.com/2014/11/adding-cisco-iouiol-images/
http://habrahabr.ru/post/262027/



=====Test run simultanious:
 + 10 IOS Routers (Dynamips)
 + 10 IOL L2 SWITCHs
 + 10 IOL L3 Routers

VM:
CPU: 2x4 Xeon x5650  (2.66 GHz)
RAM: 6GB
$ top
top - 10:45:48 up 53 min,  1 user,  load average: 2.37, 2.29, 1.67
Tasks: 382 total,   1 running, 381 sleeping,   0 stopped,   0 zombie
%Cpu(s): 28.1 us,  0.2 sy,  0.0 ni, 71.6 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:   6105644 total,  5185072 used,   920572 free,    19360 buffers
KiB Swap:   999420 total,        0 used,   999420 free.  1952448 cached Mem