The content in this post is intended for educational and informational purposes only. All software rights belong to their respective owners.
Cisco recently made the IOS on Linux (IOL) images available through the Cisco Modeling Labs (CML) Free Tier . IOL is an implementation of Cisco IOS-XE that operates as an executable binary on Linux. This post will guide you through the process of creating Cisco IOL container images using Containerlab on macOS.
Prerequisite
macOS
-
Point your web browser to the CML Software Download page.
-
Click the Download icon for Cisco Modeling Labs reference platform ISO file (October 2024).
-
Log in with your Cisco.com (CCO ID) credentials when prompted.
-
Save the
refplat-20241016-freetier-iso.zipfile to your Downloads folder. -
Open your favorite terminal emulator, and change to the
Downloadsdirectory.
cd ~/Downloads
- Create the
cml28-refplatdirectory.
mkdir -p cml28-refplat
- Uncompress the
refplat-20241016-freetier-iso.zipfile into thecml28-refplatdirectory.
unzip refplat-20241016-freetier-iso.zip -d cml28-refplat
- Attach the
refplat-20241016-freetier.isofile.
open cml28-refplat/refplat-20241016-freetier.iso
- Copy the IOL L2 image to the
imagesdirectory on theclabLinux machine.
orb push -m clab /Volumes/REFPLAT/virl-base-images/ioll2-xe-17-15-01/x86_64_crb_linux_l2-adventerprisek9-ms.iol ~/images/
- Copy the IOL image to the
imagesdirectory on theclabLinux machine.
orb push -m clab /Volumes/REFPLAT/virl-base-images/iol-xe-17-15-01/x86_64_crb_linux-adventerprisek9-ms.iol ~/images/
- Detach the
refplat-20241016-freetier.isofile from Finder.
Containerlab
- Log in to the
clabLinux machine.
orb -m clab
- Change to the
imagesdirectory.
cd ~/images
- Clone the hellt/vrnetlab repo from GitHub.
git clone https://github.com/hellt/vrnetlab.git
- Copy (and rename) the IOL L2 image to the
ioldirectory.
cp x86_64_crb_linux_l2-adventerprisek9-ms.iol vrnetlab/cisco/iol/cisco_iol-L2-17.15.01.bin
- Copy (and rename) the IOL image to the same
ioldirectory.
cp x86_64_crb_linux-adventerprisek9-ms.iol vrnetlab/cisco/iol/cisco_iol-17.15.01.bin
- Change to the
ioldirectory.
cd vrnetlab/cisco/iol
- Build the Cisco IOL container images.
DOCKER_DEFAULT_PLATFORM=linux/amd64 make docker-image
- Verify the Cisco IOL container images are now listed.
docker images vrnetlab/cisco_iol
output:
REPOSITORY TAG IMAGE ID CREATED SIZE
vrnetlab/cisco_iol L2-17.15.01 4a8722ba46cb 5 seconds ago 613MB
vrnetlab/cisco_iol 17.15.01 45a779babe46 6 seconds ago 710MB
Lab
- Change to the
ioldirectory.
cd ~/labs/iol
- Deploy the lab.
clab deploy
- Test SSH connectivity to the management interface of each node.
Give the nodes some time to complete the Cisco boot process.
for i in r sw; do sshpass -padmin ssh clab-iol-${i}1 'show version | in Ver'; done
- Destroy the lab.
clab destroy -c