Containerlab v0.58.0 supports running Cisco IOL images, which is something I was very much looking forward to. IOL nodes are an implementation of Cisco IOS-XE that does not run as a full virtual machine. Therefore, the IOL nodes generally consume much less CPU and memory.
Containerlab already has great documentation on how to use Cisco IOL devices, but I'll cover it here as well for any of my readers who are interested. You can check out the official documentation for more info.
If you are new to Containerlab, feel free to check out my introductory blog post below.
If you have Cisco CML (you may need version 2.7 or later), it should include the IOL images. You'll need to use vrnetlab to convert the binary file into a Docker container, which can then be used within Containerlab like any other container/image.
First, I have downloaded these two Cisco IOL files to the Downloads folder. One for L3 and another one for L2.
x86_64_crb_linux-adventerprisek9-ms
x86_64_crb_linux_l2-adventerprisek9-ms.bin
Next, clone the hellt/vrnetlab
repository to your local machine.
git clone https://github.com/hellt/vrnetlab.git
Then, copy these two images into the vrnetlab/cisco/iol
directory and rename them as follows. (Change the version accordingly)
x86_64_crb_linux-adventerprisek9-ms
tocisco_iol-17.12.01.bin
x86_64_crb_linux_l2-adventerprisek9-ms.bin
tocisco_iol-l2-17.12.01.bin
vrnetlab/cisco/iol$ ls
cisco_iol-17.12.01.bin cisco_iol-l2-17.12.01.bin docker Makefile README.md
Finally, run make docker-image
command and wait for it to complete. It usually takes a few seconds. Once done, if you run docker images
, you should see the two images for IOL.
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
vrnetlab/cisco_iol l2-17.12.01 bbf110969808 7 seconds ago 607MB
vrnetlab/cisco_iol 17.12.01 a5f109e61e9d 13 minutes ago 704MB
Now you can create your lab as usual with Containerlab. One thing to note is that when using IOL-L2, remember to set the type
to l2
, as shown below (Line #21)
---
name: multicast_01
mgmt:
network: mgmt
ipv4-subnet: 192.168.100.0/24
topology:
nodes:
iol-1:
kind: cisco_iol
image: vrnetlab/cisco_iol:17.12.01
mgmt-ipv4: 192.168.100.31
iol-2:
kind: cisco_iol
image: vrnetlab/cisco_iol:17.12.01
mgmt-ipv4: 192.168.100.32
iol-3:
kind: cisco_iol
image: vrnetlab/cisco_iol:l2-17.12.01
type: l2
mgmt-ipv4: 192.168.100.40
links:
- endpoints: ["iol-1:Ethernet0/1","iol-2:Ethernet0/1"]
Once the nodes are up, you can SSH to them by using the default credentials admin/admin
iol-1#show version
Cisco IOS Software [Dublin],
Linux Software (X86_64BI_LINUX-ADVENTERPRISEK9-M),
Version 17.12.1, RELEASE SOFTWARE (fc5)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2023 by Cisco Systems, Inc.
Compiled Thu 27-Jul-23 22:33 by mcpre