IOU images are 32-bit linux images, you can use them only in 64-bit Linux, when it supports 32-bit binaries. Furthermore IOU needs some 32-bit libraries.

So what is needed to add 32-bit support?

Each dynamically linked linux binary includes the name of the needed loader in it’s header. The linux OS just reads the ELF header and starts the loader, who does the rest.

The 64-bit binaries use a loader located in /lib64, see here an example from Fedora 24:

[test@localhost ~]$ file /usr/bin/ls
/usr/bin/ls: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked,
interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=933b40c55153099b60036844a722f1557ac5694c, stripped

In contrast the loader for 32-bit binaries, like the IOUs, is located in /lib:

[test@localhost ~]$ file i86bi-linux-l3-adventerprisek9-15.4.1T.bin
i86bi-linux-l3-adventerprisek9-15.4.1T.bin: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked,
interpreter /lib/ld-linux.so.2, for GNU/Linux 2.2.5, stripped

So all what’s needed to support the 32-bit IOUs is the 32-bit loader and the 32-bit dynamic libraries.

The prefered way to install them is to use packages supplied by the distribution.

For example in Debian Jessie you can install them by:

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libssl1.0.0:i386
sudo ln -s libcrypto.so.1.0.0 /usr/lib/i386-linux-gnu/libcrypto.so.4

In Fedora 24 you can use:

sudo dnf install openssl-libs.i686
sudo ln -s libcrypto.so.10 /usr/lib/libcrypto.so.4

But there may be some distributions, where this doesn’t work.

  • The distribution doesn’t offer the necessary 32-bit packages.
  • IOU requires GNU libc, some distributions (like Alpine Linux) use musl libc.
  • The libraries from the distribution are incompatible with IOU
    For example OpenSSL V1.1 has changed the API, that my result in issues using that with IOU.

In those situation you have to install libraries from other sources. But as alien packages are a risk to the stability of the system, this should used only as a last resort.

This procedure is tested on Fedora 24. As Fedora offers the required libraries, this is only meant as a demonstration.

For using IOUs in Alpine I’ve created an archive of the nessesary files, libc-i386.tar.gz in https://github.com/ehlers/gns3-docker-images/tree/master/iou-base.

So first, we should check, if the 32-bit loader is really not installed:

[test@localhost ~]$ ls /lib/ld*
ls: cannot access '/lib/ld*': No such file or directory

If the 32-bit loader is already there, but IOUs are not running, you have a different issue. You should not continue following this receipt.

But on my installation the 32-bit loader is really missing. So I downloaded the libc-i386.tar.gz and extracted it:

[test@localhost ~]$ sudo tar xvvfz libc-i386.tar.gz -C /
[sudo] password for test:
drwxr-xr-x root/root         0 2016-10-06 10:49 lib/
drwxr-xr-x root/root         0 2016-10-06 10:49 lib/i386-linux-gnu/
-rw-r--r-- root/root   1964696 2016-09-23 20:37 lib/i386-linux-gnu/libcrypto.so.1.0.0
lrwxrwxrwx root/root         0 2016-09-05 08:20 lib/i386-linux-gnu/libpthread.so.0 -> libpthread-2.19.so
-rw-r--r-- root/root    114964 2014-12-26 23:44 lib/i386-linux-gnu/libgcc_s.so.1
-rwxr-xr-x root/root    134380 2016-09-05 08:20 lib/i386-linux-gnu/ld-2.19.so
-rw-r--r-- root/root    275988 2016-09-05 08:20 lib/i386-linux-gnu/libm-2.19.so
-rwxr-xr-x root/root    130260 2016-09-05 08:20 lib/i386-linux-gnu/libpthread-2.19.so
-rw-r--r-- root/root     13856 2016-09-05 08:20 lib/i386-linux-gnu/libdl-2.19.so
-rwxr-xr-x root/root   1516996 2016-09-05 08:20 lib/i386-linux-gnu/libc-2.19.so
lrwxrwxrwx root/root         0 2016-10-06 10:49 lib/i386-linux-gnu/libcrypto.so.4 -> libcrypto.so.1.0.0
lrwxrwxrwx root/root         0 2016-09-05 08:20 lib/i386-linux-gnu/libm.so.6 -> libm-2.19.so
lrwxrwxrwx root/root         0 2016-09-05 08:20 lib/i386-linux-gnu/libc.so.6 -> libc-2.19.so
lrwxrwxrwx root/root         0 2016-09-05 08:20 lib/i386-linux-gnu/ld-linux.so.2 -> ld-2.19.so
lrwxrwxrwx root/root         0 2016-09-05 08:20 lib/i386-linux-gnu/libdl.so.2 -> libdl-2.19.so
lrwxrwxrwx root/root         0 2016-09-05 08:20 lib/ld-linux.so.2 -> i386-linux-gnu/ld-2.19.so
drwxr-xr-x root/root         0 2016-10-06 10:49 usr/
drwxr-xr-x root/root         0 2016-10-06 10:49 usr/share/
drwxr-xr-x root/root         0 2016-10-06 10:49 usr/share/doc/
drwxr-xr-x root/root         0 2016-10-06 10:49 usr/share/doc/libc-i386/
drwxr-xr-x root/root         0 2016-10-06 10:49 usr/share/doc/libc-i386/libssl1.0.0/
-rw-r--r-- root/root      6547 2016-05-01 23:53 usr/share/doc/libc-i386/libssl1.0.0/copyright
drwxr-xr-x root/root         0 2016-10-06 10:49 usr/share/doc/libc-i386/libc6/
-rw-r--r-- root/root     25633 2016-09-03 22:39 usr/share/doc/libc-i386/libc6/copyright
drwxr-xr-x root/root         0 2016-10-06 10:49 usr/share/doc/libc-i386/gcc-4.9-base/
-rw-r--r-- root/root     31347 2014-12-25 21:09 usr/share/doc/libc-i386/gcc-4.9-base/copyright

Now my IOU sucessfully starts:

[test@localhost ~]$ ./i86bi-linux-l3-adventerprisek9-15.4.1T.bin
***************************************************************
IOS On Unix - Cisco Systems confidential, internal use only
Under no circumstances is this software to be provided to any
non Cisco staff or customers. To do so is likely to result
in disciplinary action. Please refer to the IOU Usage policy at
wwwin-iou.cisco.com for more information.
***************************************************************

 IOURC: Could not open iourc file
[test@localhost ~]$

The next step is to install iouyap. Furthermore you need to obtain a valid IOU license.