Cisco Modeling Labs Practice

Information on my work with Cisco Modeling Labs

Project Overview

Once I passed the CCNA, I wanted to keep on practicing what I had learned and I wanted to try out network automation. Initially I continued doing labs on Cisco Packet Tracer, but Packet Tracer only simulates device behavior and supports only some IOS commands, which was fine for when I studied for the CCNA, but not for automation or production environments. I was told about Cisco Modeling Labs, which runs the same IOS images that run on actual Cisco hardware, so its devices sit on my own network and can be configured over SSH from my host computer the way a production router would be. That is what made it possible to practice automation by deploying Ansible playbooks to configure multiple routers.

Status: in progress, last updated August 2026. Two routers are up with an OSPF adjacency between them, one configured by hand and one configured with Ansible.

Objectives

  • Get Cisco Modeling Labs running and set up a lab to connect to my LAN
  • Write and practice Infrastructure as Code and Network Automation

Progress So Far

Step 1: Getting CML running and building the topology

I set up my Cisco Modeling Labs instance and built a small topology with two routers. The outer router is called ExtRouter, and it connects out to my home LAN through CML's external connector on G0/0, so the lab is reachable from my real network rather than being sealed off inside the CML network. R1 sits behind it, connected only to ExtRouter over a link between their G0/1 interfaces. Keeping the lab reachable from my LAN is what makes the automation work possible, since Ansible has to be able to reach the devices it configures.

CML topology: ExtRouter connected to an external connector on G0/0 and to R1 on G0/1, 
                        forming a two-router lab bridged to my home LAN
A screenshot of my current Cisco Modeling Labs topology.

Step 2: Configuring OSPF by hand on R1

I configured R1 manually through the CLI, assigning its interface addresses and bringing up OSPF by hand. As I was planning to automate ExtRouter with Ansible, I wanted to use R1 as a model to make sure that I had a template to base ExtRouter's configuration on.

Step 3: Automating ExtRouter with Ansible

With a manual configuration to model off of, I wrote Ansible playbooks to configure ExtRouter instead of typing it in. The playbooks assign the interface IP addresses and enable OSPF on the interface facing R1. Once my playbooks ran successfully, the two routers formed an OSPF adjacency and exchanged routes, with one side configured by hand and the other configured by Ansible playbooks.

What's Next

  • Expand the topology beyond two routers so OSPF has more than a single adjacency to work with
  • Move the remaining manual configuration on R1 into playbooks
  • Build the playbooks into reusable roles rather than one-off files
  • Add a playbook that captures the running configuration off each device for backup